Forum Discussion
bvy
Helper V
5 years agoHow to UNION Tables containing a Measure using DAX or other
Given a typical Sales table with dimensions of Product and Customer (joined in the traditional way, one-to-many on ProductID/CustomerID), suppose I have a measures on the Sales table called SalesOver...
smpa01
Community Champion
4 years agobvy please adapt the following to your scenario and see if it gives what you were hoping for
UNION
(
Selectcolumns(
ADDCOLUMNS(VALUES(Customer[CustomerName]),"SalesOverLastWeek",[SalesOverLastWeekMeasure])
,"CAT",[CustomerName],"SalesOverLastWeek",[SalesOverLastWeek]
),
Selectcolumns(
ADDCOLUMNS(VALUES(Product[ProductName]),"SalesOverLastWeek",[SalesOverLastWeekMeasure])
,"CAT",[ProductName],"SalesOverLastWeek",[SalesOverLastWeek]
)
)