问题
I have three tables whose structure is as follows-
Table 1-
Table 2-
Table 3-
I wanted to have a table like this -
I tried this particular formula for creating a calculated table-
Table = UNION(SELECTCOLUMNS(Table1,"Table1", Tables[Table1]), SELECTCOLUMNS(Table2, "Table2 Totals", Table2[Totals]), SELECTCOLUMNS(Table3, "Table3 Totals", Table3[Totals]))
The result I am getting is like this:-
I have no idea why this is happening. What to do in this scenario? Do calculated columns not come in merge query?
回答1:
I would create 2 new tables and then join them based on Table1 Column1.
The 2 new tables I would create are inner joins of NewTable1: Table1 Col2 and Table2 Col1 NewTable2: Table1 Col3 and Table3 Col1
Afterwards, create merge queries as new on Table1Col1 and NewTable1 Then one more time with NewTable2.
Let me know if you'd like me to clear it up, hoping the process is explained well enough to give a general idea/direction.
来源:https://stackoverflow.com/questions/46342340/power-bi-combine-multiple-tables-into-one