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,
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
Hisham
7 years agoFrequent Visitor
Great answere ! very usfull.