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
Anonymous
Not applicable

Two different sets of conditional formatting in gauge visual based on slicer selection

Hi,

 

I am using a gauge visual to display the on-time carrier performance. This performance is divided into gross and net performance, where gross includes uncontrollable cirucmstances why a carrier has arrived late. I added gross and net in a slicer with a dynamic target. Gross target = 95% and net target = 97%.

 

Now I am running into a problem with the conditionnal formatting.

 

Gross = If value is lower than 95% turn gauge red, if between 95 and 100% turn green.

Net = If value lower than 97% turn gauge red, if between 95 and 100% turn green.

 

With standard conditionnal formatting in rules it seems I can only add a rule based on one value instead of setting separate formatting rules when slicer hits Net or Gross. See example below.

 

Sofien1234_0-1650455388417.png

 

Hope someone could help me out with this one. Maybe @amitchandak ?

 

Kind Regards,

 

Sofiën

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , I am assuming slicer switches gross and net

 

Create a color measure  , and use that is conditional formatting using field value option

Switch(selectedvalue(slicer[Measure]),

"Gross", Switch ( True() , [Gross PD] < .95 "Red", "Green")

"Net", Switch ( True() , [Net PD] < .97 "Red", "Green")

)

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , I am assuming slicer switches gross and net

 

Create a color measure  , and use that is conditional formatting using field value option

Switch(selectedvalue(slicer[Measure]),

"Gross", Switch ( True() , [Gross PD] < .95 "Red", "Green")

"Net", Switch ( True() , [Net PD] < .97 "Red", "Green")

)

Anonymous
Not applicable

Brilliant! Thanks a lot!

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.