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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

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
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.

Top Kudoed Authors