Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Tom_Y
Advocate II
Advocate II

Using a LIST in Column Header/ Expand Table

This code is working, and generate the table I need. But when I replace {"Project", "SURVEY DATE", "Measure", "Count"} by {ListOfColumns} then it fails. Can anyone help? Thank you very much.

 

 

let
    Source = #"List of Project",
    #"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    #"Expanded Column1" = Table.ExpandTableColumn(#"Converted to Table", "Column1", {"Project", "SURVEY DATE", "Measure", "Count"}, {"Project", "SURVEY DATE", "Measure", "Count"})
in
    #"Expanded Column1"

 

 

This is the query for ListOfColumns and it's working on its own.

 

let
    Source = {"Project", "SURVEY DATE", "Measure", "Count"}
in
    Source

 

 

Tom_Y_0-1701606219452.png

 

1 ACCEPTED SOLUTION
AlienSx
Super User
Super User

@Tom_Y don't use curly brackets. Plain ListOfColumns should work.

View solution in original post

2 REPLIES 2
Tom_Y
Advocate II
Advocate II

Wow, magical!

AlienSx
Super User
Super User

@Tom_Y don't use curly brackets. Plain ListOfColumns should work.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.