Forum Discussion
Expanding ListColumns within Nested Tables
- 4 years ago
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 TransformColumnHope it helps,
Artur
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"- JamesMcEwan4 years agoHelper I
Hi SolomonovAnton,
Almost - I want this result without having expanded the table TypeID table. So it should look like this:
The query table:
The TypeID table for record [Bob]:
Thanks!
- Anonymous4 years agoNot 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:
The TypeID table for record [Bob]:
- Anonymous4 years agoNot 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:
The TypeID table for record [Bob]:
- JamesMcEwan4 years agoHelper I
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