Forum Discussion

WLFRD's avatar
WLFRD
Icon for Helper III rankHelper III
5 years ago
Solved

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 ...
  • aj1973's avatar
    5 years ago

    Count OH=

    Hi WLFRD 

    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.