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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
JamesMcEwan
Helper I
Helper I

Expanding ListColumns within Nested Tables

Hi all, 

I am looking to expand a ListColumn within a nested table, however I would like to so this without adding a new column. Is there a way to expand the list without adding a new column to the table or the nested table?

 

Here is an example close to how my data would look:

 

 

let
    Source =  
        Table.FromRecords(
            {
                [Name = "Bob",  Color = "Blue"],
                [Name = "Jim",  Color = "Yellow"],
                [Name = "Paul", Color = "Green"]
            }
        )
in 
    Table.AddColumn (Source, "TypeID", each 
        Table.FromRecords(
            {
                [Type= "Small",     ID = {1,2,3}],
                [Type = "Medium",   ID = {2,4,6}],
                [Type = "Large",    ID = {1,3,6}]
            }
        )
    )

 

 

 

 

 

1 ACCEPTED SOLUTION
artpil
Resolver II
Resolver II

Hi,

 

So you probably want something like this:

 

let
    Source =  
        Table.FromRecords(
            {
                [Name = "Bob",  Color = "Blue"],
                [Name = "Jim",  Color = "Yellow"],
                [Name = "Paul", Color = "Green"]
            }
        ),
#"AddTab;e"=
    Table.AddColumn (Source, "TypeID", each 
        Table.FromRecords(
            {
                [Type= "Small",     ID = {1,2,3}],
                [Type = "Medium",   ID = {2,4,6}],
                [Type = "Large",    ID = {1,3,6}]
            }
        )
    ),
    TransformColumn = Table.TransformColumns(#"AddTab;e",{"TypeID", each Table.ExpandListColumn(_, "ID")})
in
    TransformColumn

 

 

Hope it helps,

Artur

View solution in original post

7 REPLIES 7
artpil
Resolver II
Resolver II

Hi,

 

So you probably want something like this:

 

let
    Source =  
        Table.FromRecords(
            {
                [Name = "Bob",  Color = "Blue"],
                [Name = "Jim",  Color = "Yellow"],
                [Name = "Paul", Color = "Green"]
            }
        ),
#"AddTab;e"=
    Table.AddColumn (Source, "TypeID", each 
        Table.FromRecords(
            {
                [Type= "Small",     ID = {1,2,3}],
                [Type = "Medium",   ID = {2,4,6}],
                [Type = "Large",    ID = {1,3,6}]
            }
        )
    ),
    TransformColumn = Table.TransformColumns(#"AddTab;e",{"TypeID", each Table.ExpandListColumn(_, "ID")})
in
    TransformColumn

 

 

Hope it helps,

Artur

 

Hi @artpil,

 

This is great and worked a treat. I also had just figured out my own solution - so will copy below, in case there is a use case for either. 

 

Thanks!

 

 

let
    Source =  
        Table.FromRecords(
            {
                [Name = "Bob",  Color = "Blue"],
                [Name = "Jim",  Color = "Yellow"],
                [Name = "Paul", Color = "Green"]
            }
        )
in 
    Table.AddColumn (Source, "TypeID", 
        each 
            let 
                _usertable = 
                    Table.FromRecords(
                        {
                            [Type= "Small",     ID = {1,2,3}],
                            [Type = "Medium",   ID = {2,4,6}],
                            [Type = "Large",    ID = {1,3,6}]
                        }
                    )   
            in 
                Table.ExpandListColumn(
                    _usertable,"ID"
                )
    )

 

SolomonovAnton
Super User
Super User

hello 

 

if I correctly understood you below result which you want

let
    Query1 = let
    Source =  
        Table.FromRecords(
            {
                [Name = "Bob",  Color = "Blue"],
                [Name = "Jim",  Color = "Yellow"],
                [Name = "Paul", Color = "Green"]
            }
        )
in 
    Table.AddColumn (Source, "TypeID", each 
        Table.FromRecords(
            {
                [Type= "Small",     ID = {1,2,3}],
                [Type = "Medium",   ID = {2,4,6}],
                [Type = "Large",    ID = {1,3,6}]
            }
        )
    ),
    #"Expanded TypeID" = Table.ExpandListColumn(Table.ExpandTableColumn(Query1, "TypeID", {"ID"}, {"ID"}), "ID")
in
    #"Expanded TypeID"




Hi @SolomonovAnton,

 

Almost - I want this result without having expanded the table TypeID table. So it should look like this:

The query table:

JamesMcEwan_0-1659542113953.png

The TypeID table for record [Bob]:

JamesMcEwan_1-1659542221215.png

Thanks!

 

Anonymous
Not applicable

Hi James,

 

Did you get the result you wanted? I'm trying to find out how to do the exact same type of issue

The query table:

Leroy_0-1660864488694.png

 

The TypeID table for record [Bob]:

Leroy_1-1660864488504.png

 

 

Hi @Anonymous ,

 

I did get this to work - if you look at my last reply above - I copied in the the solution to my reply to @artpil 

 

Anonymous
Not applicable

Hi James,

 

Did you get the result you wanted? I'm trying to find out how to do the exact same type of issue

The query table:

Leroy_0-1660864488694.png

 

The TypeID table for record [Bob]:

Leroy_1-1660864488504.png

 

 

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.