Forum Discussion
vyny17
4 years agoFrequent Visitor
Create a reference table from three tables
Hi there, Power BI enthusiasts and specialists! Here is the trouble: I have three different tables, each table has the same three columns, these columns tell the respective client, the client...
- 4 years ago
Hi vyny17,
Here's a solution:
Create a new table Table4, with the following DAX formula:
Table4 =Var Tablea=SelectColumns('Table1',"Client",[Client],"Department",[Department],"Salesman",[Salesman])Var Tableb=SelectColumns('Table2',"Client",[Client],"Department",[Department],"Salesman",[Salesman])Var Tablec=SelectColumns('Table3',"Client",[Client],"Department",[Department],"Salesman",[Salesman])Var UnionTable = union (Tablea,Tableb,Tablec)Var finalTable = SUMMARIZE(UnionTable,[Client],[Department],[Salesman])return finalTableNote that I've assumed that your first table is called Table1, that your second table is called Table2, and that your third table is called Table3.If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.Manguilibe KAO
ManguilibeKAO
4 years agoResolver I
Hi vyny17,
Here's a solution:
Create a new table Table4, with the following DAX formula:
Table4 =
Var Tablea=SelectColumns('Table1',
"Client",[Client],
"Department",[Department],
"Salesman",[Salesman]
)
Var Tableb=SelectColumns('Table2',
"Client",[Client],
"Department",[Department],
"Salesman",[Salesman]
)
Var Tablec=SelectColumns('Table3',
"Client",[Client],
"Department",[Department],
"Salesman",[Salesman]
)
Var UnionTable = union (Tablea,Tableb,Tablec)
Var finalTable = SUMMARIZE(UnionTable,[Client],[Department],[Salesman])
return finalTable
Note that I've assumed that your first table is called Table1, that your second table is called Table2, and that your third table is called Table3.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Manguilibe KAO