Forum Discussion
Anonymous
4 years agoNot applicable
Sum by grouped fields
Hello guys, I have two tables (Model and Ocurrencies) and I wish to create two measures which sum the mileages of models by the unit field. In addition, these two tables have a relationship. How...
- 4 years ago
Hi, Anonymous ;
You could create a measure as follows:
Measure = IF(ISINSCOPE('Model'[Model]), CALCULATE( SUM('Model'[Mileage]),FILTER('Ocurrencies',[Month]=MAX('Ocurrencies'[Month]))), SUMX(SUMMARIZE('Ocurrencies',[Model],[Month],"1",SUM('Model'[Mileage])),[1]))The final output is shown below:
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-yalanwu-msft
Community Support
4 years agoHi, Anonymous ;
You could create a measure as follows:
Measure =
IF(ISINSCOPE('Model'[Model]),
CALCULATE( SUM('Model'[Mileage]),FILTER('Ocurrencies',[Month]=MAX('Ocurrencies'[Month]))),
SUMX(SUMMARIZE('Ocurrencies',[Model],[Month],"1",SUM('Model'[Mileage])),[1]))
The final output is shown below:
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.