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
JusticeBaird
Frequent Visitor

Field has List values and type ABC123 values.

I am unable to expand a field/column, which contains [List], null, and type ABC123 records.  I would appreciate a quick custom column / code and/or tips.  Thank you! J

 

JusticeBaird_0-1666108842622.png 

JusticeBaird_1-1666108897892.png

 

 

1 ACCEPTED SOLUTION
edhans
Super User
Super User

See this example:

 

 

let
    Source = List.Zip({{1..10}, {21..30}}) & {1},
    #"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    #"Added Custom" = 
        Table.AddColumn(
            #"Converted to Table", 
            "Custom", 
            each 
            if Value.Is([Column1], List.Type) 
                then Text.Combine(List.Transform([Column1], Text.From), ",")
            else 
            [Column1]
        )
in
    #"Added Custom"

 

 

I added a 2nd column to either expand the list or pull the raw value.

edhans_0-1666111386242.png

How to use M code provided 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
5) See this article if you need help using this M code in your model.

 



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

View solution in original post

2 REPLIES 2
edhans
Super User
Super User

@JusticeBaird was this of any help?



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting
edhans
Super User
Super User

See this example:

 

 

let
    Source = List.Zip({{1..10}, {21..30}}) & {1},
    #"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    #"Added Custom" = 
        Table.AddColumn(
            #"Converted to Table", 
            "Custom", 
            each 
            if Value.Is([Column1], List.Type) 
                then Text.Combine(List.Transform([Column1], Text.From), ",")
            else 
            [Column1]
        )
in
    #"Added Custom"

 

 

I added a 2nd column to either expand the list or pull the raw value.

edhans_0-1666111386242.png

How to use M code provided 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
5) See this article if you need help using this M code in your model.

 



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

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.

Top Solution Authors