Forum Discussion
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?
Anonymous , 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-numbers-in-the-column
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values
4 Replies
- amitchandakSuper User
Anonymous , 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-numbers-in-the-column
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values - AnonymousNot applicable
To create a Gauge that dynamically changes colour based on the current value, use conditional formatting.
To learn how check out the YouTube demo: https://youtu.be/oEL36Fp3TU0.
- AnonymousNot applicable
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
- Ashish_MathurSuper User
Hi,
You can compare to a measure. To get specific help, share some data to work with and show the expected result.