Forum Discussion
Anonymous
4 years agoNot applicable
Sum by two groups
Hi experts, Would you please help me sum the total by both type and class End result should be HS--> 1000 TM --> 1520 Class Type Total A HS 500 A HS 500 Z H...
- 4 years ago
Anonymous So tweak your measure like below:
Measure = CALCULATE(SUM('Table'[Total]),ALLEXCEPT('Table','Table'[Class]))
selimovd
4 years agoMost Valuable Professional
Hey Anonymous ,
you can just create a matrix and put the Type in the rows and the total in the values. Then it will sum by Type.
Otherwise you could create measures:
Sum HS =
CALCULATE(
SUM( myTable[Total] ),
myTable[Type] = "HS"
)
and for TM:
Sum TM =
CALCULATE(
SUM( myTable[Total] ),
myTable[Type] = "TM"
)
The measures set the filter of the type to HS or TM and for that reason you will always get the sum for the corresponding type.
If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
Best regards
Denis
Blog: WhatTheFact.bi
Follow me: twitter.com/DenSelimovic
Anonymous
4 years agoNot applicable
This won't work as it will return 3000 for HS as it is not considering the Class in the equation.
HS should be 1000