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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

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

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors