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
-
Dejé que una IA organizara toda mi agenda de la semana y esto pasó - ¿Y si durante dos semanas completas no organizas ni una sola reunión, ni una tarea, ni tu calendario? Eso fue […] The post Dejé que una IA organizara tod...Hace 1 día
-
EXPERIMENTANDO CON AZURE FUNCTIONS: TRES FORMAS DE VISUALIZAR TEXTO EN NUBES DE PALABRAS - Hola a todos, Siguiendo con este post: GENERAR NUBE DE PALABRAS CON AZURE FUNCTIONS EN POWER APPS he decidido crear dos nuevos códigos para generar … La...Hace 3 días
-
Dynamic array update and the @ operator - Many of the user defined functions (UDF’s) presented in this blog return an array rather than a single value. Options for displaying arrays in Excel have c...Hace 4 días
-
Automatiza tareas con Power Automate de Microsoft - Automatiza tareas con Power Automate es facil usando esta herramienta de Microsoft (dentro de Power Platform) puedes automatizar tareas repetitivas para ...Hace 6 días
-
PA4 - Grados de parentesco familiar - Ocultar grados de parentesco Grado de parentesco familiar 3er GRADO Bisabuelos paternos Bisabuelos maternos Bisabuelos paternos Bisabuelos maternos 2º G...Hace 1 semana
-
😱 Tabla dinámica con error #¡DESBORDAMIENTO!? Así lo solucionas en segundos - Cómo solucionar el error #¡DESBORDAMIENTO! en una tabla dinámica de Excel Al actualizar una tabla dinámica en Excel, es posible encontrarse con el error #¡...Hace 1 semana
-
Funciones definidas para tipos de números (3) - Esta entrada cierra el estudio de funciones definidas para ciertos tipos de números, así como de sus funciones inversas. En esta tercera se estudiarán l...Hace 2 semanas
-
Cómputo Métrico de Vigas en Excel: Planilla Gratis para Hormigón Armado - ¿Necesitas calcular el material exacto de las vigas de tu proyecto en minutos y no en horas? En este artículo te compartimos una planilla Excel gratuita pa...Hace 3 semanas
-
-
Mandatory Trainings: Are we doing them? [Data Analysis Challenge – 002] - This week, let’s try something new. I have a spreadsheet challenge for you. Solve it, post your answers by leaving a comment. No cheating or no AI help o...Hace 1 mes
-
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 5 meses
-
Build a Daily Events Calendar in Excel - Use my Excel events calendar to track meetings and events inside a workbook. Add your upcoming events to a list, set a start date, and then see those items...Hace 5 meses
-
Mostrar datos de dos celdas en un cuadro de texto de Microsoft Excel - En Microsoft Excel es posible vincular el contenido de una celda a un cuadro de texto o a una forma. Vincular contenido de cuadro de texto a valor de cel...Hace 7 meses
-
Cómo hacer gráficos en Excel - Excel es una de las herramientas más potentes y versátiles para el análisis y la presentación de datos. Los gráficos en Excel no solo ayudan a visualizar...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 1 año
-
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 1 año
-
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 1 año
-
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
-
-
-
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 4 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 5 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 6 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 6 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
-
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 8 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 13 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.