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
willij15
New Member

Slicers Change my Conditional Formatting Results

Thank you in advance! 

Background:

  1. Our training department provides an excel spreadsheet with employee training data. 
  2. My job is to take that spreadsheet and use Power BI provide managers a quick look at their employee performance.
  3. Employees above 95% on-time completion are considered to have achieved their goal and above 98% on-time completion are considered to have exceeded their goal.
  4. On-time completion is calculated, values are put in a matrix, and percent on-time is color coded based on the above.

The problem:

  1. The most important slicer is the one by manager name.
  2. If all managers are selected, conditional formatting works.
  3. HOWEVER, if one manager is selected, condtional formatting...breaks?!?!

Here is a screencap of the report and my conditional formatting setup: https://imgur.com/a/ihHJfaS

 

DAX Statements:

To assign a status per assignment: 

=if(isblank(Report[Transcript Completed Date].[Date]),if(date(year(Report[Transcript Due Date]),month(Report[Transcript Due Date]),day(Report[Transcript Due Date]))>=today(),"Open, Not Yet Due","Open, Past-Due"),if(date(year(Report[Transcript Completed Date])-7/24,month(Report[Transcript Completed Date]-7/24),day(Report[Transcript Completed Date]-7/24))>date(year(Report[Transcript Due Date]),month(Report[Transcript Due Date]),day(Report[Transcript Due Date])),"Completed Late","Completed On-Time")))
To calculate the percent on-time:
= if(CALCULATE(counta(Report[Training Status]),Report[Training Status]="Completed On-Time")/(calculate(counta(Report[Training Status]),Report[Training Status]="Open, Past-Due")+CALCULATE(counta(Report[Training Status]),Report[Training Status]="Completed Late")+CALCULATE(counta(Report[Training Status]),Report[Training Status]="Completed On-Time"))=0,0,CALCULATE(counta(Report[Training Status]),Report[Training Status]="Completed On-Time")/(calculate(counta(Report[Training Status]),Report[Training Status]="Open, Past-Due")+CALCULATE(counta(Report[Training Status]),Report[Training Status]="Completed Late")+CALCULATE(counta(Report[Training Status]),Report[Training Status]="Completed On-Time")))

 

1 ACCEPTED SOLUTION
willij15
New Member

I think I solved this! I changed by conditional formatting rules to numbers instead of percentages.

 

For example, "If greater than or equal to 0 'Number' and is less than 0.95 'Number' then 'Color Red.'" 

View solution in original post

1 REPLY 1
willij15
New Member

I think I solved this! I changed by conditional formatting rules to numbers instead of percentages.

 

For example, "If greater than or equal to 0 'Number' and is less than 0.95 'Number' then 'Color Red.'" 

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.