Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello
Im very new to Power Query so I'm sorry if this is silly.
I have a form that outputs data like this:
Is there an easy way for me to transform that data to look like this?
Thank you
Solved! Go to Solution.
Hi @Is-Jacko
Yes, you only need to unpivot columns on the Power Query Editor. To do so, you select all the columns except "Outer number" and go to Transform > Unpivot
Then you will obtain:
So, you remove the column you don't need:
And rename column Value:
Here you have the code:
let
Origen = Excel.Workbook(File.Contents("C:\example.xlsx"), null, true),
Hoja1_Sheet = Origen{[Item="Hoja3",Kind="Sheet"]}[Data],
#"Encabezados promovidos" = Table.PromoteHeaders(Hoja1_Sheet, [PromoteAllScalars=true]),
#"Otras columnas con anulación de dinamización" = Table.UnpivotOtherColumns(#"Encabezados promovidos", {"Outer num"}, "Atributo", "Valor"),
#"Columnas quitadas" = Table.RemoveColumns(#"Otras columnas con anulación de dinamización",{"Atributo"}),
#"Columnas con nombre cambiado" = Table.RenameColumns(#"Columnas quitadas",{{"Valor", "Sample"}})
in
#"Columnas con nombre cambiado"
Hi @Is-Jacko
Yes, you only need to unpivot columns on the Power Query Editor. To do so, you select all the columns except "Outer number" and go to Transform > Unpivot
Then you will obtain:
So, you remove the column you don't need:
And rename column Value:
Here you have the code:
let
Origen = Excel.Workbook(File.Contents("C:\example.xlsx"), null, true),
Hoja1_Sheet = Origen{[Item="Hoja3",Kind="Sheet"]}[Data],
#"Encabezados promovidos" = Table.PromoteHeaders(Hoja1_Sheet, [PromoteAllScalars=true]),
#"Otras columnas con anulación de dinamización" = Table.UnpivotOtherColumns(#"Encabezados promovidos", {"Outer num"}, "Atributo", "Valor"),
#"Columnas quitadas" = Table.RemoveColumns(#"Otras columnas con anulación de dinamización",{"Atributo"}),
#"Columnas con nombre cambiado" = Table.RenameColumns(#"Columnas quitadas",{{"Valor", "Sample"}})
in
#"Columnas con nombre cambiado"
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 17 | |
| 9 | |
| 8 | |
| 7 | |
| 6 |