Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Filter Red, Yellow and Green Conditional Formatting based on slicer selection

 

Hi,

I want to filter Red,Gree,Yellow based on silcer selection.Ihave created below measures but not able to filter out red,green and yellow.

 

 

Green : < 10.5
Yellow : >10.5 and < 12.5
Red : >12.5
 
Change = 'Measure Table'[Last Month Invoice]/'Measure Table'[Last 6 Month Avg]
Color Condition = SWITCH(TRUE(),[Change] < 10.5 , 1 , [Change]> 10.5 && [Change]<12.5 , 2 , [Change] >12.5 ,3 )
SelectedColorTOPNValue = IF(HASONEVALUE('Color Select'[Ranking]),VALUES('Color Select'[Rank Number]),BLANK())
  • Hi Anonymous ,

     

    You need to create a measure similar to this one:

     

    Measure =
    SWITCH (
        HASONEVALUE ( Colours[Colour] ),
        SELECTEDVALUE ( Colours[Colour] ) = "Red"
            && [change] > 12,5, 1,
        SELECTEDVALUE ( Colours[Colour] ) = "Green"
            && [change] < 10,5, 1,
        SELECTEDVALUE ( Colours[Colour] ) = "Yellow"
            && [change] > 10,5
            && [change] < 12,5, 1
    )

     

    Then use this measure to filter out your visualization making the filter = 1.

     

    Check PBIX file attach.

1 Reply

  • Hi Anonymous ,

     

    You need to create a measure similar to this one:

     

    Measure =
    SWITCH (
        HASONEVALUE ( Colours[Colour] ),
        SELECTEDVALUE ( Colours[Colour] ) = "Red"
            && [change] > 12,5, 1,
        SELECTEDVALUE ( Colours[Colour] ) = "Green"
            && [change] < 10,5, 1,
        SELECTEDVALUE ( Colours[Colour] ) = "Yellow"
            && [change] > 10,5
            && [change] < 12,5, 1
    )

     

    Then use this measure to filter out your visualization making the filter = 1.

     

    Check PBIX file attach.