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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
geleigh
Frequent Visitor

How to conditionally format a gauge visual

I have multiple organizations so I want to conditionally format a gauge so that once it is at a certain percentage of the total it changes color. Here is what the gauge looks like now, the number of users enabled and total users changes per organization.

Would there be a measure that could create a gradient?

Capture1.PNG

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@geleigh , You have conditional formatting in gauge visual. You can create a color measure and use that with field value option

 

Switch (True(),

selectedvalues(Table[Organization]) ="M1", [Value] <.6, "Red",

selectedvalues(Table[Organization]) ="M2", [Value] <.8, "Red",

// Add others

)

 

refer for steps

https://radacad.com/dax-and-conditional-formatting-better-together-find-the-biggest-and-smallest-num...
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

View solution in original post

4 REPLIES 4
RohitDesai
New Member

Hello Amit: Question: For conditionally formatting color in gauge chart, instead of .6 and .8 shown in your statement above, I want to use a value of a variable. Is it possible?! Here is the reason: I have a set goal which is different for every day of the month. I want to make color change every day depending upon whether the actual was higher (or lower) than the goal for that day..I have this Goal number as variable but not seeing a way to use it..a hard coded number is not going to help I need to be able to plugin this variable in conditional formatting..Thanks in advance for looking into my issue

 

 

 

Hi,

You can compare to a measure.  To get specific help, share some data to work with and show the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

To create a Gauge that dynamically changes colour based on the current value, use conditional formatting. 

biancagilly_0-1661490607814.png

 

To learn how check out the YouTube demo: https://youtu.be/oEL36Fp3TU0.

amitchandak
Super User
Super User

@geleigh , You have conditional formatting in gauge visual. You can create a color measure and use that with field value option

 

Switch (True(),

selectedvalues(Table[Organization]) ="M1", [Value] <.6, "Red",

selectedvalues(Table[Organization]) ="M2", [Value] <.8, "Red",

// Add others

)

 

refer for steps

https://radacad.com/dax-and-conditional-formatting-better-together-find-the-biggest-and-smallest-num...
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.