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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
BI_Analyticz
Helper V
Helper V

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. 

 

BI_Analyticz_2-1616168030997.png

 

Expected after selecting No in the drop down filter.

BI_Analyticz_3-1616168084989.png

 

4 REPLIES 4
amitchandak
Super User
Super User

@BI_Analyticz ,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

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.

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

BI_Analyticz_0-1616173504789.png

I used Submitted_Flag = IF(Submitted = "Yes",1,0) 

Then used this for conditional formatting. Result is coming as expected. But when I select "NO" in the submitted drop down the table is showing NO but hiding YES. When YES is hidden due to this drop down selection PBI is treating it as BLANK and giving an amber  icon. How to overcome this?

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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