Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Filter off matching rows in Matrix

I have a matrix setup and I'm using the columns to pull out my Prod, QA, and Dev into columns. This is working great. However I only need to see the rows that aren't matching. Can anyone think of a w...
  • DataInsights's avatar
    5 years ago

    Anonymous,

     

    Use this measure as a filter in the matrix:

     

    Environment Match = 
    VAR vDev =
        CALCULATE ( MAX ( Table1[Value] ), Table1[Environment] = "Dev" )
    VAR vQA =
        CALCULATE ( MAX ( Table1[Value] ), Table1[Environment] = "QA" )
    VAR vProd =
        CALCULATE ( MAX ( Table1[Value] ), Table1[Environment] = "Prod" )
    VAR vResult =
        IF ( vDev = vQA && vDev = vProd, 0, 1 )
    RETURN
        vResult