Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

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 way to filter off the matching rows? I have slicer to filter Dev, QA, Prod, and one other. So we can compare up to 4 different systems at once. 

 

cranech_0-1629835851869.png

 

1 ACCEPTED SOLUTION
DataInsights
Super User
Super User

@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

 

DataInsights_0-1629902588150.png

 

DataInsights_1-1629902599698.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

3 REPLIES 3
DataInsights
Super User
Super User

@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

 

DataInsights_0-1629902588150.png

 

DataInsights_1-1629902599698.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Anonymous
Not applicable

This wasn't exactly what I needed but it got me 95% there. Thank you!

I had to had vProd = vQA in the return. The issue was that when I compare all of them like that then it would return results even if I didn't have one selected in the slicer. 

For example: Unit of measure |     Dev Inches/Hour     |     Prod Inch per hour    |    QA Inches/Hour

Becuase it was always comparing all 3, even if I deseltected PROD from my slicer it would still show up in the matrix. 

To solve this I created a measure for each Prod, Dev, QA that looks to see if it's filtered. From there I could plug those values into what you gave me and change my ouput based on it. 

<Code from measure> Wouldn't let me reply if I kept it in here

 

So now based on what I select it changes how to calculate the output. I need to add "BU" as an option still. 

I'm sure this probably isn't the cleanest way to do it but it works!

Couldn't have gotten there without your help, thank you!

Anonymous
Not applicable

Match = 
VAR vDev =
    CALCULATE ( MAX ( 'All'[Value] ),'All'[Source] = "Dev" )
VAR vQA =
    CALCULATE ( MAX ( 'All'[Value] ), 'All'[Source] = "QA" )
VAR vProd =
    CALCULATE ( MAX ( 'All'[Value] ), 'All'[Source] = "Prod" )
VAR vResult =
    if([ProdFiltered] > 0 && [QAFiltered] > 0 && [DevFiltered] > 0, IF(vProd = vQA && vProd = vDev && vQA = vDev,1,0),
        if([ProdFiltered] > 0 && [QAFiltered] > 0, IF(vProd = vQA,1,0),
            if([ProdFiltered] > 0 && [DevFiltered] > 0, IF(vProd = vDev,1,0),
              if([QAFiltered] > 0 && [DevFiltered] > 0, IF(vQA = vDev,1,0),      
            0)
            )    
        )
    )    
RETURN
    vResult

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.