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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
joannasokolowsk
Helper II
Helper II

Conditional formatting - colurs are changing depends on slicer but shouldn't

Dear colleagues,

I would like to ask you for and advice regarding conditional formatting bc it doesn't work as expected. 

 

I have created a measure showing % of R (#or R/ Target) and then add conditional formatting for % of R  (if below 10% but higher than 0 - orange color, if equal or above 10% then pink). It works ok when I have the data in the table but when I use the filter(slicer) which doesn't change values then colors do not work according to the logic. 

 

View in table (color is ok for AQP 1 course Albania and Kosovo) 

no slicer.PNG

When the slicer is applied (course name AQP 1) , then the color is pink while should be orange, and values in the table are not changing as well. with slicer.PNG

 

Please advise!

Thanks

 

 

5 REPLIES 5
joannasokolowsk
Helper II
Helper II

yes, sure! this is the rule I applied: 

 

Capture.PNG

Instead of choosing "Percent" try "Number". Had same problem and this worked for me.

Hi @joannasokolowsk ,

 

You definitely need to create a custom measure for conditional formatting to get it working using filters.

Share some sample data with respective required output.

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

 

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Thansk for the advice! Could you please help me creating such measures? 

 

This is the sample data :

in my project I created measures:

-> To calculate total number of pp: 

_no of people = COUNT(Sheet1[User])+0
-> to calculate people with R:
_no of R = CALCULATE([_no of people],Sheet1[Nomination type]="R")
-> to calculate % of R
_% R = [_no of R]/[_no of people]
 
UserCourseCountryNomination type
JohnAQP 1GermanyN
AnnaAQP 1GermanyR
TomAQP 1GermanyR
KateAQP 1GermanyN
EmilyAQP 1CroatiaN
GeorgeAQP 1CroatiaR
TimithyAQP 1CroatiaN
CecileAQP 1CroatiaR
BobAQP 1CroatiaN
BillyIUCroatiaR
AndrewIUCroatiaN
JimIUGermanyN
RobertIUGermanyR
AnthonyIUGermanyR

 

In the output I would like to see the table as below (where for the column _% R = [_no of R]/[_no of people].  colors are changing bease on % (e.g above 50 % pink, below blue). And if there are slicer for country/course , color rules will work as well. 

 

Thank you!

joannasokolowsk_0-1659702304065.png

 

Pragati11
Super User
Super User

HI @joannasokolowsk ,

 

Can you kindly share the window where you are app;ying conditional formatting based on the rules you mentioned above?

Also in my view, if you want your conditional colors to get modified based on the slicer selection, use should use dynamic measures.

 

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.