Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi,
I have a step where I create a Custom List1 utilizing the equation:
= List.Union(List.Transform(#"Removed Other Columns1"[Data], each Table.ColumnNames(_)))
This give me a list of all the column names in all files (50+) with no duplicates.
My next step I want to expand a table utilizing the list in the Custom List1, but I'm not sure how to call the list. This is definitely wrong, but here is what I used:
= Table.ExpandTableColumn(#"Removed Other Columns1", "Data", List.Union(#"CustomList1"[List]))
Please let me know if there is a solution!
Solved! Go to Solution.
Hi @Anonymous ,
Try this mcode:
let
Source = Table.FromRecords({
[Age = 1, Name = "Bob", Phone = "123-4567", Data = Table.FromList({[Age = 10, ID = "10"],[Age = 20, ID = "20"]}, Record.FieldValues,{"Age", "ID"})],
[Age = 2, Name = "Jim", Phone = "987-6543", Data = Table.FromList({[Age = 20, Email = "Bob@gmail.com"],[Age = 30, Email = "Jim@gmail.com"]}, Record.FieldValues,{"Age", "Email"})],
[Age = 3, Name = "Paul", Phone = "543-7890", Data = Table.FromList({[Age = 30, LastName = "Bob"],[Age = 40, LastName = "Jim"]}, Record.FieldValues,{"Age", "LastName"})]
}),
ListColumns = List.Distinct(List.Union(List.Transform(Source[Data], each Table.ColumnNames(_)))),
Expand = Table.ExpandTableColumn(Source, "Data", ListColumns, List.Transform(ListColumns, each _ & ".1"))
in
Expand
Hi @Anonymous ,
Try this mcode:
let
Source = Table.FromRecords({
[Age = 1, Name = "Bob", Phone = "123-4567", Data = Table.FromList({[Age = 10, ID = "10"],[Age = 20, ID = "20"]}, Record.FieldValues,{"Age", "ID"})],
[Age = 2, Name = "Jim", Phone = "987-6543", Data = Table.FromList({[Age = 20, Email = "Bob@gmail.com"],[Age = 30, Email = "Jim@gmail.com"]}, Record.FieldValues,{"Age", "Email"})],
[Age = 3, Name = "Paul", Phone = "543-7890", Data = Table.FromList({[Age = 30, LastName = "Bob"],[Age = 40, LastName = "Jim"]}, Record.FieldValues,{"Age", "LastName"})]
}),
ListColumns = List.Distinct(List.Union(List.Transform(Source[Data], each Table.ColumnNames(_)))),
Expand = Table.ExpandTableColumn(Source, "Data", ListColumns, List.Transform(ListColumns, each _ & ".1"))
in
Expand
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 10 | |
| 9 | |
| 6 | |
| 5 | |
| 3 |