Forum Discussion
SBell65
6 years agoFrequent Visitor
How to create a measure that sums per attribute value when more than one table is involved
I am trying to create a measure that provides a sum based on each value of a single attribute. In this case, the "Category" column. The grid in question is shown below and contains data from four di...
- 6 years ago
The solution to the measure for this case is as follows:
SumOfSales_Category =
VAR Cat = MAX(Bookings[Category])
VAR SumOfCategory = CALCULATE ([Sales (USD)], FILTER (ALLSELECTED ('Bookings' ), Bookings[Category] = Cat))
Return SumOfSales_Category
SBell65
6 years agoFrequent Visitor
The solution to the measure for this case is as follows:
SumOfSales_Category =
VAR Cat = MAX(Bookings[Category])
VAR SumOfCategory = CALCULATE ([Sales (USD)], FILTER (ALLSELECTED ('Bookings' ), Bookings[Category] = Cat))
Return SumOfSales_Category
StidifordN
Helper III
3 years agoSo happy to have found this response - its taken me a good few hours of different phrases to find the right solution to this problem. 🎉