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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
Employee
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
Employee
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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.