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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello, I cannot figure out where my error lies. Admittedly, I am pretty new to PowerBI... Many thanks in advance!
let
source1 = Master1,
source2 = AAA_Grants,
mappingTable = #"AAA_to_CAF_col_map",
// Step 1: Rename specific columns in Table "AAA_Grants" using the mapping
renamedAAA_Grants = Table.RenameColumns(source2, Table.Transform(Table.ColumnNames(source2), each {_ , Table.First(Table.SelectRows(mappingTable, each [OldColumnName] = _))[NewColumnName]})),
// Step 2: Merge Table "AAA_Grants" with Table "Master1" and keep all columns from both tables
mergedTable = Table.NestedJoin(renamedAAA_Grants, {"CommonColumn"}, source1, {"CommonColumn"}, "NewColumn"),
expandedTable = Table.ExpandTableColumn(mergedTable, "NewColumn", Table.Union(Table.ColumnNames(renamedAAA_Grants), Table.ColumnNames(source1)))
in
expandedTable
Solved! Go to Solution.
Yeah, you are trying to Table.Union two lists, for some reason.
--Nate
Yeah, you are trying to Table.Union two lists, for some reason.
--Nate
Thank you Pat, I am not sure how I can change that? Any advice please?
The issue is likely that Table.ColumnNames returns a list of the column names, not a table.
Pat
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 |
|---|---|
| 11 | |
| 7 | |
| 5 | |
| 5 | |
| 3 |