Forum Discussion
Saxon10
Post Prodigy
4 years agoHow can I convert multiple tables into one table by using DAX code.
I have 4 tables are Table1,2,3 and table4 and it’s contain the following columns are id, result, filter and city code. The tables headers are same but the data is different. How can I get all ...
- 4 years ago
jeroendekk you can do that with ADDCOLUMNS().
Personally I would apply the filter earlier, but it may not matter.
Combined Table = UNION ( ADDCOLUMNS(FILTER(Table1,[Filter]="No"),"Table Reference","Table1"), ADDCOLUMNS(FILTER(Table2,[Filter]="No"),"Table Reference","Table2"), ADDCOLUMNS(FILTER(Table3,[Filter]="No"),"Table Reference","Table3"), ADDCOLUMNS(FILTER(Table4,[Filter]="No"),"Table Reference","Table4") )
lbendlin
Super User
4 years agojeroendekk you can do that with ADDCOLUMNS().
Personally I would apply the filter earlier, but it may not matter.
Combined Table = UNION (
ADDCOLUMNS(FILTER(Table1,[Filter]="No"),"Table Reference","Table1"),
ADDCOLUMNS(FILTER(Table2,[Filter]="No"),"Table Reference","Table2"),
ADDCOLUMNS(FILTER(Table3,[Filter]="No"),"Table Reference","Table3"),
ADDCOLUMNS(FILTER(Table4,[Filter]="No"),"Table Reference","Table4")
)Saxon10
Post Prodigy
4 years agoThanks you so much for your help. it's working fine.