Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago

Conditional Formatting showing wrong colors based on drop down filter

Friends, Need help for conditional formatting.

 

I have attendance data for employees. If Present (Yes) - GREEN, Absent (No) - RED and No data for a date - YELLOW. Yellow is conditoned like if blank then Yellow.  Result came out really well. But...

 

I have a drop down filter to filter this visual quickly. Filter is Attendance Status = Yes / No (Drop down). If i select NO then it is making the visual like below. I have enabled "Show data even if now values". When I select No it is still showing the cells for Rick which is I wanted but the colors all changed to Yellow for all the dates for Rick. From 2-Jan to 4-Jan the colors should disappear. For 5th Jan the color should be RED.

 

What can we do just to make the colors disappear for Rick except for 5 Jan. 

 

 

Expected after selecting No in the drop down filter.

 

4 Replies

  • Anonymous ,Need to check file to find issue

     

    Create a color measure

     

    Switch(True(),
    max(Table[Attendance]) ="Yes", "Green",
    max(Table[Attendance]) ="No", "Red",
    )

     

    and use that in coditional formatting using "Field Value" option

    • Anonymous's avatar
      Anonymous
      Not applicable

      But when I select No in the drop down filter the cells which is having Yes will become blank. I have a condition in conditional formatting like if blank then yellow. So the dates for green changes to yellow.

      • amitchandak's avatar
        amitchandak
        Super User

        Anonymous , can you share your measure/values of matrix and conditional formatting calculation