Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hello,
I'd like to transform "list of records" into row e.g. Media 1, Media 2. See attached image. Any recommendation for the step by step or function? I really appreciate your help, thanks.
Solved! Go to Solution.
See the following M code, which you need to put in a blank query.
1) In Power Query, select New Source, then Blank Query
2) On the Home ribbon, select "Advanced Editor" button
3) Remove everything you see, then paste the M code I've given you in that box.
4) Press Done
let
Source = 0,
#"Converted to Table" = #table(1, {{Source}}),
#"Added Custom" = Table.AddColumn(#"Converted to Table", "Custom", each {[A = 1, B = 2],[A = 4, B = 8]}),
#"Expanded Custom" = Table.ExpandListColumn(#"Added Custom", "Custom"),
#"Expanded Custom1" = Table.ExpandRecordColumn(#"Expanded Custom", "Custom", {"A", "B"}, {"A", "B"}),
#"Unpivoted Other Columns" = Table.UnpivotOtherColumns(#"Expanded Custom1", {"Column1"}, "Attribute", "Value")
in
#"Unpivoted Other Columns"
Turns this:
Into this
Which I then expand and unpivot to get this:
If you need more... How to get good help fast. Help us help you.
How to Get Your Question Answered Quickly
How to provide sample data in the Power BI Forum
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingSee the following M code, which you need to put in a blank query.
1) In Power Query, select New Source, then Blank Query
2) On the Home ribbon, select "Advanced Editor" button
3) Remove everything you see, then paste the M code I've given you in that box.
4) Press Done
let
Source = 0,
#"Converted to Table" = #table(1, {{Source}}),
#"Added Custom" = Table.AddColumn(#"Converted to Table", "Custom", each {[A = 1, B = 2],[A = 4, B = 8]}),
#"Expanded Custom" = Table.ExpandListColumn(#"Added Custom", "Custom"),
#"Expanded Custom1" = Table.ExpandRecordColumn(#"Expanded Custom", "Custom", {"A", "B"}, {"A", "B"}),
#"Unpivoted Other Columns" = Table.UnpivotOtherColumns(#"Expanded Custom1", {"Column1"}, "Attribute", "Value")
in
#"Unpivoted Other Columns"
Turns this:
Into this
Which I then expand and unpivot to get this:
If you need more... How to get good help fast. Help us help you.
How to Get Your Question Answered Quickly
How to provide sample data in the Power BI Forum
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingAdvance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 7 | |
| 5 | |
| 5 | |
| 3 |