Forum Discussion
Anonymous
8 years agoNot applicable
after union two table, data go to wrong column
when I union two same table, most data go to wrong column, who know how to fix this error, thank you
- 8 years ago
Hi Anonymous,
You could modify the DAX for calculated table as:
Result Table = UNION ( SELECTCOLUMNS ( Table1, "Column1", Table1[Column1], "Column2", Table1[Column2], "Column3", Table1[Column3] ), SELECTCOLUMNS ( Table2, "Column1", Table2[Column1], "Column2", Table2[Column2], "Column3", Table2[Column3] ) )That way can keep the same order for columns when you union two tables.
Regards,
Yuliana Gu
v-yulgu-msft
8 years agoMicrosoft Employee
Hi Anonymous,
This problem is caused by the different column orders of two tables.
The displayed column order in table view is not matched with that in the right fields pane. Please see below example:
Best regards,
Yuliana Gu
Anonymous
3 years agoNot applicable
I know this is an old post but this may help others experiencing union problems. I found this tip re re-ordering columns in data view. Apparently the column order is determined by when the columns are added and not necessarily how you see them in Power Query. Tip: How to Change Column Order in Data View - Power BI - Enterprise DNA Forum