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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
answeriver
Helper IV
Helper IV

Reorder columns

Hello,

Can't understand, i need UNION in DAX 3 tables in 1. In query i made reodrder columns, but when i load data to power bi, place of column not change. I dont understand why.

Here is screen shotюCapture.JPGCapture1.JPG

1 ACCEPTED SOLUTION
v-xicai
Community Support
Community Support

Hi @answeriver ,

 

If you use SELECTCOLUMNS function to specific the location of column name like DAX formula1 below, then the result table will return the corresponding location display. Otherwise, if you use formula2 which the three tables have the same data structure, the returned column location will be the same with the original tables. Or you may use Append feature in Query Editor to combine three tables which have the same data structure into one.

 

formula1= UNION(
SELECTCOLUMNS('Table1',"Name1",[Description],"Name2",[Amount]),
SELECTCOLUMNS('Table2',"Name1",[Description],"Name2",[Amount]),
SELECTCOLUMNS('Table3',"Name1",[Description],"Name2",[Amount]))
 
formula2= UNION(Table1,Table2,Table3)

If I misunderstood it, could you please show your DAX formula for further analysis?

 

Best Regards,

Amy

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

3 REPLIES 3
v-xicai
Community Support
Community Support

Hi @answeriver ,

 

If you use SELECTCOLUMNS function to specific the location of column name like DAX formula1 below, then the result table will return the corresponding location display. Otherwise, if you use formula2 which the three tables have the same data structure, the returned column location will be the same with the original tables. Or you may use Append feature in Query Editor to combine three tables which have the same data structure into one.

 

formula1= UNION(
SELECTCOLUMNS('Table1',"Name1",[Description],"Name2",[Amount]),
SELECTCOLUMNS('Table2',"Name1",[Description],"Name2",[Amount]),
SELECTCOLUMNS('Table3',"Name1",[Description],"Name2",[Amount]))
 
formula2= UNION(Table1,Table2,Table3)

If I misunderstood it, could you please show your DAX formula for further analysis?

 

Best Regards,

Amy

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Nathaniel_C
Community Champion
Community Champion

@answeriver ,

Not sure if this is the answer, but try hitting the refresh button.

 

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.
Nathaniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Nathaniel, already make it many time

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.