Traducir el blog
Power Query - multiple slicers (3/4)
In the previous post we saw a generic function that allows you to pivot a table in multiple rows:
In this post we will see a second version of that generic function, as published by Cameron Wallace on GitHub:
Third solution
This solution has its origin in the normalized detail table and, applying the generic function, it becomes a pivoted table with multiple rows if there is more than one location, age or skill per person.
This case cannot be solved with dynamic tables, since they do not admit several rows with the same Name.
The M code in Power Query for the generic function that pivot the table is as follows:
The way to call this function is:
= #"Pivot Duplicates Function"(TableDetails, "Type", "Details")
3 arguments are passed: Source as table, PivotCol as text and ValueCol as text.
The 5 steps applied by the generic function are explained below:
1) Source = Table.Buffer(Source)
//As source table is referenced 3 times, buffers the Source table in memory, isolating it from external changes during evaluation.
2) GroupClustIndex = Table.Group(Source,
List.RemoveItems(Table.ColumnNames(Source),{ValueCol}),
{"ColOfTables",each Table.AddIndexColumn(_,"idx")})
//Groups rows in the table that have the same key with List.RemoveItems function, adding an index column called "ColOfTables".
3) CombineTables = Table.Combine(GroupClustIndex[ColOfTables])
//Combine main table with the tables in the "ColOfTables" column.
4) Pivot = Table.Pivot(CombineTables,
List.Distinct(Table.Column(Source,PivotCol)), PivotCol, ValueCol)
//Pivot Source tabla with the PivotCol adding one column for each "Type" with the ValueCol from "Details" values.
5) RemoveIndex = Table.RemoveColumns(Pivot,{"idx"})
//Remove auxiliar index.
Third solution download
- From this link to Microsoft OneDrive:
- From this link to Sites Google Drive:
With the generic function, you cannot click individual steps and see how the query transforms the data, so a fourth solution is required.
You can read the following post talking about the last fourth solution, without the generic function and with only a few steps applied in Power Query:
Mi lista de blogs
-
ANALISIS DE SENTIMIENTO EN POWER APPS CON MODELOS DE IA - Hola a todos! Ya estamos en Marzo, cómo pasa el tiempo!!. En fin, que estoy trabajando en un proyecto para incluir los modelos de IA … La entrada ANALIS...Hace 4 horas
-
Diferencia de potencias con la misma base es un cuadrado - Existen muchos números con la propiedad de que dos potencias sucesivas de los mismos se diferencian en un cuadrado. Por ejemplo, 2611- 2610=594068802, o...Hace 1 día
-
How to find duplicate values in two columns in Excel using formula - Let’s say you have two lists of values in Excel and want to find out all the common values (ie duplicates) and extract them. In this article, let me expl...Hace 2 días
-
Enviar Mensajes Masivos en WhatsApp desde Excel con Texto y Archivos - Si alguna vez has buscado una forma automatizada de enviar mensajes en WhatsApp con archivos adjuntos (Excel, PDF, imágenes, PowerPoint, […] The post Env...Hace 4 días
-
Cómo imprimir en Excel: Guía completa - Imprimir correctamente en Excel es una habilidad esencial, no solo para generar copias físicas de tus hojas de cálculo, sino también para convertirlas en...Hace 5 días
-
Soporte Técnico de Microsoft OneDrive - 🔝*To translate this blog post to your language, select it in the top left Google box. * Feedback de la Comunidad de OneDrive * Vota para que Micros...Hace 5 días
-
Cómo Usar Microsoft Excel Gratis: Guía Completa - Usar Microsoft Excel Gratis conoce la pantalla de inicio Excel contabilidad y ticHace 6 días
-
5 Ways To Insert Pi Symbol in Microsoft Excel - Follow along to learn how to insert the Pi symbol in Microsoft Excel using tried and tested methods. If you’re creating reports, charts, and tables in math...Hace 1 semana
-
Pivot Table Not Sorting Correctly – Quick Fix - Usually, it’s easy to sort an Excel pivot table, but you might run into one that just won’t sort correctly! For example, employee names are listed alphabet...Hace 1 semana
-
3DFrame-NLGeom - The VBA version of the 3DFrame spreadsheet has now been updated to allow geometric non-linear effects to be included. The new version can be downloaded fro...Hace 2 semanas
-
Fin - Llevo tiempo pensando esta entrada y no sé que decir. Analisis y Decisión nació en 2008 y no ... Leer más »Hace 3 semanas
-
📊🔎 Cómo usar SI y UNIRCADENAS para manejar múltiples resultados en un búsqueda - ¿Cómo buscar múltiples resultados en Excel y unirlos en una sola celda?Si has trabajado con Excel, seguramente conoces la función BUSCARV, que permite enco...Hace 4 semanas
-
Color, Conditions, and Copilot: How to save time using conditional formatting with Copilot in Excel - Hi everyone, this is part 11 in a series of posts to show you some of the things that are possible to do with Copilot in Excel. *What is conditional f...Hace 4 meses
-
4 ejemplos de utilización de validación de datos con fórmulas - Ya sabes que la herramienta de Validación de datos es de gran utilidad para controlar y restringir la introducción de datos y así, asegurarte de…Hace 5 meses
-
How To Predict Bearing Life With Excel - When you work in mechanical engineering, understanding the reliability and performance of bearings under various conditions is crucial. Bearings are the co...Hace 6 meses
-
-
TikTok’s search evolution - 2 in 5 Americans use TikTok as a search engine. Nearly 1 in 10 Gen Zers are more likely to rely on TikTok than Google as a search engine. More than half of...Hace 11 meses
-
Unblocking and Enabling Macros - When Windows detects that a file has come from a computer other than the one you're using, it marks the file as coming from the web, and blocks the file....Hace 1 año
-
Office Scripts: Trabajando con Tablas - [image: Office Scripts: Trabajando con Tablas] Me he dado cuenta que últimamente solo escribo de lenguaje M (es mi pequeño vicio)... pero hay que liberar l...Hace 2 años
-
Hello world! - [image: Hello world!] Welcome to WordPress. This is your first post. Edit or delete it, then start writing!Hace 2 años
-
La importancia de saber mecanografía en 2022 - [image: Resultado de imagen de mecanografía viñeta escribiendo a máquina] Según la RAE, la mecanografía es el arte de escribir a máquina. Hace unos cuantos...Hace 2 años
-
London Excel Meetup Workbooks - The workbooks used in my presentation on “Analytical and Interactive Dashboards in Excel” at the London Excel Meetup, September 3, 2020Hace 4 años
-
Cálculo de jornada que termina al día siguiente (Power Query) y despedida - [image: Cálculo de jornada que termina al día siguiente (Power Query) y despedida] Este blog se ha ocupado de cálculos de tiempo con bastante intensidad, c...Hace 4 años
-
Agenda Perpetua Excel Calendario Perpetuo - Saludos a los ingenieros y a todos los que forman parte de nuestra comunidad de planillas Excel para ingeniería civil, ya se vienen las fiestas navideñas y...Hace 5 años
-
International Keyboard Shortcut Day 2019 - The first Wednesday of every November is International Keyboard Shortcut Day. This Wednesday, people from all over the world will become far less efficient...Hace 5 años
-
Welcome, Prashanth! - Last March, I shared that we were starting to look for a new CEO for Stack Overflow. We were looking for that rare combination of someone who… Read more "W...Hace 5 años
-
Visualize parts and whole - combine clustered column and stacked column charts - *Inga: Disa what?* *Igor: -ppeared.* by The FrankensTeam ------------------------------ Really it was 3 years ago we posted our last article? *Freddy: Th...Hace 5 años
-
Salvador Sostres, analfabeto profesional - Los nuevos tiempos traen nuevas profesiones. Internet, además, ha revolucionado el mundo del periodismo y la palabra escrita. Adaptarse o morir, ese es el ...Hace 6 años
-
Planificación de compras - Realizar una lista con los productos que necesitamos y que formarán parte de nuestra cesta de la compra nos ayuda a *encontrar la combinación de bienes p...Hace 12 años
-
-
-
-
-
-
-
-
-
-
No Response to "Power Query - multiple slicers (3/4)"
Leave A Reply
Indícame las erratas que encuentres y qué es lo que te gustaría ver en los próximos artículos.