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
-
Excel vs Claude vs Power BI: ¿Quién crea mejores dashboards con IA? - Ya no se trata de si puedes crear un dashboard con IA, sino de dónde conviene crearlo. Con el anuncio […] The post Excel vs Claude vs Power BI: ¿Quién cr...Hace 2 días
-
¿Qué promedio uso en Excel? - Hoy te hago una pregunta incómoda: ¿cuál es el ticket medio de tus clientes? Si la fórmula de Excel que usas para calcularlo es =PROMEDIO(), es posible q...Hace 2 días
-
Subconjuntos de algunas matrices triangulares (2) - En la entrada anterior estudiamos algunas propiedades de las filas y columnas en algunas matrices triangulares numéricas. En esta segunda entrada se incl...Hace 3 días
-
py_Integrate update - I recently discovered that changes to how Python handles the locals() function was causing problems with some of the functions in the py_Integrate.xlsb spr...Hace 6 días
-
CREAR UN SISTEMA DE COPIAS DE SEGURIDAD Y RESTAURACIÓN DE LISTAS DE SHAREPOINT CON POWER AUTOMATE - Hola a todos, Hace un tiempo publiqué un post en el que explicaba cómo podíamos programar copias de seguridad de nuestras listas de SharePoint utilizando...Hace 1 semana
-
Convierte a mayúsculas en Excel sin fórmulas con Relleno rápido - Aprende a convertir toda una lista de nombres a MAYÚSCULAS en segundos, sin fórmulas y sin escribir dato por dato, usando la herramienta Relleno rápido d...Hace 2 semanas
-
¿Y si Copilot sabe Excel y contabilidad también? - “Crea una fórmula”, “hazme una tabla dinámica”, “analiza estos datos”… Estas son algunas de las tareas que ya realizamos con modo agente Copilot en Excel...Hace 3 semanas
-
3 Weeks Roadmap to Learn Power BI (with free resources) - Follow this easy and proven roadmap to learn Power BI in just 3 weeks. What you need to Succeed You need, A Windows computer (Power BI Desktop is availa...Hace 1 mes
-
Excel Golf Score Tracker by Player and Course - I made this Excel Golf Score Tracker for anyone who loves Excel, and golf! Set it up at the start of golf season, then record your results after every roun...Hace 3 meses
-
Diseño de Mezclas ACI 211.1-22 en Excel — Dosificación SI - La planilla Excel de diseño deHace 4 meses
-
Relojes de 24 horas y de 12 horas AM/PM - 🔝*To translate this blog post to your language, select it in the top left Google box. * Cómo aprender a usar relojes de 24 horas He visto que quien...Hace 8 meses
-
📒 Cómo separar textos dentro de una misma columna y agrupar fechas y horas con Power Query en Excel 💪🏽 - 📒 Cómo separar textos dentro de una misma columna y agrupar fechas y horas con Power Query en Excel 💪🏽 En muchos escenarios de análisis de datos, especi...Hace 10 meses
-
9 Interesting Examples With PY Function in Microsoft Excel - These are the most interesting PY function tasks in Microsoft Excel that’ll surely make you a fan! The PY function in Microsoft Excel opens up an exciting ...Hace 11 meses
-
Power BI insertar cuadros de búsqueda en segmentacion - Hoy voy a explicaros como añadir un cuadro de búsqueda en una segmentación de power BI Para ello comenzamos con los datos de un excel como el que se mu...Hace 1 año
-
Fin - Llevo tiempo pensando esta entrada y no sé que decir. Analisis y Decisión nació en 2008 y no ... Leer más »Hace 1 año
-
Análisis DAFO (FODA, DOFA) las decisiones con Excel - Para conocer la situación de una empresa, proyecto o persona, recurrimos al análisis DAFO (FODA, DOFA) en la toma de decisiones con Excel. El los años sese...Hace 2 años
-
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 2 años
-
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 2 años
-
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 2 años
-
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 3 años
-
-
-
-
Premio Medialab-UGR - Hace ya más de diez años comenzó mi andanza divulgativa en este humilde blog. No tenía mucha ambición, simplemente me apetecía tener un sitio donde conta...Hace 5 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 6 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]Hace 6 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 7 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 7 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 7 años
-
Previsión de fondos necesarios para financiar obras y construcciones - La realización de obras y construcciones implica la necesidad de fondos para financiar las inversiones realizadas como consecuencia de los desfases entre ...Hace 16 años
-
-
-
-
-
-
-
-
-

No Response to "Power Query - multiple slicers (3/4)"
Leave A Reply
Comenta este artículo, critícalo o avisa si detectas algún error que haya que corregir.