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

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.

Reply
Anonymous
Not applicable

How to union tables with the same field names but different number of column?

Hi,

 

I am new into PowerBi and I am wondering if it possible to union different tables with same fields but different number of columns.  As some tables have additional fields. I know that it is possible in Tableau. Is this possible in PowerBI? If so someone can help me with this?

 

Thank you

2 ACCEPTED SOLUTIONS
Fowmy
Super User
Super User

@Anonymous 

It doesn't allow you to union two tables with different number of columns, however, if you can use SELECTCOLUMNS to select the required column to union the tables like:

New Table= 

UNION(
    SELECTCOLUMNS('Table1',"Col1",'Table'[Column1], "Col2",'Table'[Column1]),
    SELECTCOLUMNS('Table2',"Col1",'Table2'[Column1], "Col2",'Table'[Column2]),
)

________________________

If my answer was helpful, please click Accept it as the solution to help other members find it useful

Click on the Thumbs-Up icon if you like this reply 🙂


Website YouTube  LinkedIn



Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

@Anonymous 

The code that I shared is to create a table, you can go to Modeling Tab, > New Table  and Past the code below:

 

Fowmy_0-1611580475534.png

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

4 REPLIES 4
Fowmy
Super User
Super User

@Anonymous 

It doesn't allow you to union two tables with different number of columns, however, if you can use SELECTCOLUMNS to select the required column to union the tables like:

New Table= 

UNION(
    SELECTCOLUMNS('Table1',"Col1",'Table'[Column1], "Col2",'Table'[Column1]),
    SELECTCOLUMNS('Table2',"Col1",'Table2'[Column1], "Col2",'Table'[Column2]),
)

________________________

If my answer was helpful, please click Accept it as the solution to help other members find it useful

Click on the Thumbs-Up icon if you like this reply 🙂


Website YouTube  LinkedIn



Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Anonymous
Not applicable

 

Hi,

 

I have created the following DAX expression: 

UNION(
SELECTCOLUMNS('GA_Cleansed',"Col1",'GA_Cleansed'[Account], "Col2", GA_Cleansed[Campaign_name]),
SELECTCOLUMNS(GA_MICRO_Cleansed,"Col1",'GA_MICRO_Cleansed'[Account],"Col2",'GA_MICRO_Cleansed'[Campaign_name]))

 

However, I get this error message:

'The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value.'

 

How can I fix this?

 

 

@Anonymous 

The code that I shared is to create a table, you can go to Modeling Tab, > New Table  and Past the code below:

 

Fowmy_0-1611580475534.png

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Anonymous
Not applicable

Thank you for your help

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.