Forum Discussion
Anonymous
5 years agoNot applicable
SUM values filtered by another column
Hello, I have been using Power BI for some time but I now run into an issue I don't know how to solve yet. So I have a table like this: Code OH NOH 125 1 0 125 1 0 125 1 ...
- 5 years ago
Count OH=
Hi Anonymous
VAR _Code = SELECTEDVALUE(TABLE[CODE])
VAR _RESULT = CALCULATE(COUNT(TABLE[OH]), TABLE[CODE] = _Code)
RETURN
_RESULT
do the same for NOH
But i think you want to see the SUM and not the COUNT. if so replace Count by SUM.
aj1973
Community Champion
5 years agoCount OH=
Hi Anonymous
VAR _Code = SELECTEDVALUE(TABLE[CODE])
VAR _RESULT = CALCULATE(COUNT(TABLE[OH]), TABLE[CODE] = _Code)
RETURN
_RESULT
do the same for NOH
But i think you want to see the SUM and not the COUNT. if so replace Count by SUM.