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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
jac88
Helper II
Helper II

Why conditional formatting not working?

Hello, 

 

I have a calendar that conditional format background color based on Duration_Hr, but some of them are not working correctly.  Just one example, on May 16 Brian Buss should be the Brown color background, but it showing Green, could not figure out why is that, I already filtering the category to "b_billable". 

 

Can anybody please let me know what I am doing wrong here? 

 

Duration_Color = 
VAR TotalDuration = SUM(df_ProServUtilizationTracker[Duration_Hr])
VAR BillableColors = CALCULATE(SUM(df_ProServUtilizationTracker[Duration_Hr]), FILTER(df_ProServUtilizationTracker, MIN(df_ProServUtilizationTracker[Primary Categories Order]) = "b_billable"))

RETURN (
    IF(TotalDuration > 8 && 
        MIN(df_ProServUtilizationTracker[Primary Categories Order]) <> "c_pto" && 
        MIN(df_ProServUtilizationTracker[Primary Categories]) <> "OoO" && 
        MIN(df_ProServUtilizationTracker[Primary Categories]) <> "Admin" && 
        MIN(df_ProServUtilizationTracker[Primary Categories]) <> "Unavailable", "#FF7F7F",
    IF(MIN(df_ProServUtilizationTracker[Primary Categories Order]) = "a_hold", "#fdee00", 
    IF(MIN(df_ProServUtilizationTracker[Primary Categories Order]) = "b_billable" && BillableColors >=  8, "#92D050" ,
    IF(MIN(df_ProServUtilizationTracker[Primary Categories Order]) = "b_billable" && BillableColors >=  0, "#C65911" ,
    IF(MIN(df_ProServUtilizationTracker[Primary Categories Order]) = "c_pto", "#1E90FF", 
    IF(MIN(df_ProServUtilizationTracker[Primary Categories Order]) = "f_admin", "#EE82EE", 
    IF([Titles] = "Weekend", "#dde2de",
    IF([Titles] = "iMetaWeekend", "#dde2de"
   
)))))))))

jac88_0-1652262691321.png

 

https://drive.google.com/file/d/1yKEQ60MPq_5wQfzllzGNtFz_iqCZjoz4/view?usp=sharing

 

Thank you so much 

1 REPLY 1
v-yanjiang-msft
Community Support
Community Support

Hi @jac88 ,

According to your description, I download your sample. I create a seperate measure to show the BillableColors in your color measure.

vkalyjmsft_1-1652670662256.png

Then put the measure in the matrix, you can see, for the May 16, the BillableColors of Brian Buss is 35(32+3), not 3. Because the Admin and Billable categories are all in the same cell.

vkalyjmsft_0-1652670560851.png

Best Regards,
Community Support Team _ kalyj

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 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.