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
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
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.