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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
andywil456
Advocate II
Advocate II

union formula column section error

I have 3 sharepoint files all with a number of excel tables. All the tables are in the same format and layout, for each field sale to complete. the 3 sharepoint files cover different periods but the format and layout is consistant throughout. 

I have used the Union formula to create 1 master database to build my dashboard from, however the union formula has mixed up the columns. As per my screenshot in the  date column i have a few dates but also a few postcodes etc.

Is there anyway of redirecting each column so that the correct data is being selected?

Untitled.png

1 ACCEPTED SOLUTION
v-sihou-msft
Microsoft Employee
Microsoft Employee

@andywil456

 

In DAX, when using UNION(), columns are combined by position in their respective tables. And column names in the return table will  just match the column names in table_expression1. So make sure columns in two tables has same order. In your scenario, I suggest you go to Query Editor, "move" columns under Transform tab. 

 

66.PNG

Then you can use "Append Query" to combine two datasets together.

67.PNG

Regards,

 

View solution in original post

1 REPLY 1
v-sihou-msft
Microsoft Employee
Microsoft Employee

@andywil456

 

In DAX, when using UNION(), columns are combined by position in their respective tables. And column names in the return table will  just match the column names in table_expression1. So make sure columns in two tables has same order. In your scenario, I suggest you go to Query Editor, "move" columns under Transform tab. 

 

66.PNG

Then you can use "Append Query" to combine two datasets together.

67.PNG

Regards,

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.