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
I'm trying to combine two tables into a new calculated one. The tables don't have the same amount of columns so I can't use a UNION. They do however have two columns with the same name and sort of data.
Table1 Table2
col1 col1
col2 col2
colA colB
colC
I would now like a Table3 containing col1 and col2 from both tables 1 and 2. Table3 needs to only have those two columns (and not 4 - i.e. not two from each but just a combination).
I still want to keep Table1 and Table2 with all their columns so I can't just remove them in the query and thereafter use UNION either.
Does anyone have an idea of how to proceed?
Solved! Go to Solution.
The following expression should do the trick-
Table3 = UNION( SELECTCOLUMNS(Table1, "col1", [col1], "col2", [col2]), SELECTCOLUMNS(Table2, "col1", [col1], "col2", [col2]) )
The following expression should do the trick-
Table3 = UNION( SELECTCOLUMNS(Table1, "col1", [col1], "col2", [col2]), SELECTCOLUMNS(Table2, "col1", [col1], "col2", [col2]) )
Thanks a lot itayrom!
You're most welcome.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 59 | |
| 43 | |
| 42 | |
| 23 | |
| 17 |
| User | Count |
|---|---|
| 190 | |
| 122 | |
| 96 | |
| 66 | |
| 47 |