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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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