Power bi: combine multiple tables into one

本秂侑毒 提交于 2019-12-11 10:48:29

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!