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

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join 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
Fabric Data Days is here Carousel

Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.