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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.