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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Tom_Y
Helper III
Helper III

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
Helper III
Helper III

Wow, magical!

AlienSx
Super User
Super User

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

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors