Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Measure with condition IF do not summarize

Hello colleagues!   I have a measure that has an IF that checks if the sum of 2 other measures are 0, if they are, it brings the value from a third Measure. If not, then it brings Zero.   ...
  • jdbuchanan71's avatar
    7 years ago

    Hello Anonymous 

    The problem you are seeing with the total row is that it has no concept of the rows in the matrix.  It is calculated as if you took the PN field out of your visual.  What you want to do is add a SUMX to your calculation that will force it to iterate over the PN list.

    Something along these lines.

    No Future Usage =
    SUMX (
        VALUES ( YourTable[PN] );
        IF ( [Requirements] + [ReqsBulk] = 0; [Valid Stock Value]; 0 )
    )

    This will do the base calculation over all the individual PN then sum the result of each of those.