This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
I need to convert the data in the left side table as shown in the dig into right side table. How it can be converted ?
Solved! Go to Solution.
Hi,
you can actually do this with pivot option in the power query. please see below. Code also attached!
let
Source = Excel.Workbook(File.Contents("C:\Users\Dilumd\OneDrive - \help file.xlsx"), null, true),
Sheet1_Sheet = Source{[Item="Sheet1",Kind="Sheet"]}[Data],
#"Promoted Headers" = Table.PromoteHeaders(Sheet1_Sheet, [PromoteAllScalars=true]),
#"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"Date", type date}, {"Time", type time}, {"Price", Int64.Type}, {"Description", type text}}),
#"Reordered Columns" = Table.ReorderColumns(#"Changed Type",{"Date", "Time", "Description", "Price"}),
#"Pivoted Column" = Table.Pivot(#"Reordered Columns", List.Distinct(#"Reordered Columns"[Description]), "Description", "Price")
in
#"Pivoted Column"
Hi,
you can actually do this with pivot option in the power query. please see below. Code also attached!
let
Source = Excel.Workbook(File.Contents("C:\Users\Dilumd\OneDrive - \help file.xlsx"), null, true),
Sheet1_Sheet = Source{[Item="Sheet1",Kind="Sheet"]}[Data],
#"Promoted Headers" = Table.PromoteHeaders(Sheet1_Sheet, [PromoteAllScalars=true]),
#"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"Date", type date}, {"Time", type time}, {"Price", Int64.Type}, {"Description", type text}}),
#"Reordered Columns" = Table.ReorderColumns(#"Changed Type",{"Date", "Time", "Description", "Price"}),
#"Pivoted Column" = Table.Pivot(#"Reordered Columns", List.Distinct(#"Reordered Columns"[Description]), "Description", "Price")
in
#"Pivoted Column"
That works like a champ!
I'm going to invoke @ImkeF for that one.
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 31 | |
| 26 | |
| 23 | |
| 22 | |
| 15 |
| User | Count |
|---|---|
| 62 | |
| 47 | |
| 28 | |
| 24 | |
| 21 |