Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hello all,
I am trying to make a gauge color change from say red to green as the value goes up. The problem is I am forced to hard code minimum and maximum values when defining the colors to use. See the first image below.
Microsoft documentation implies I should be able to give it a color for the minimum value in a column and maximum as seen below. How do I get these choices, because hard coding a maximum is not ideal. That value will change over time. Thank you.
Solved! Go to Solution.
Hi @Kirt1965 ,
The reason for not getting this option is because you are using the GAUGE visual.
The article you are referring to works on other visuals like table chart, bar chart, etc. not on Gauge visual.
If you need information on custom colors in gauge, refer the following article for this:
https://radacad.com/sentiment-colors-for-gauge-visual-in-power-bi
You will have to I think create a DAX expression for the custom colors you are looking for and then use it on your gauge.
Thanks,
Pragati
@Kirt1965 , I doubt you can do that on color scale.
You can create a color measure and use that with "Field Value" Option
Color = if(FIRSTNONBLANK(Table[Year],2014) <=2016 && AVERAGE(Sales[Sales Amount])<170
,"lightgreen",if(FIRSTNONBLANK(Table[Year],2014)>2018,"red","yellow"))
Color sales = if([Sales Today] -[sales yesterday]>0,"green","red")
color =
switch ( true(),
FIRSTNONBLANK(Table[commodity],"NA") ="commodity1" && sum(Table[Value]) >500,"lightgreen",
FIRSTNONBLANK(Table[commodity],"NA") ="commodity2" && sum(Table[Value]) >1000,"lightgreen",
// Add more conditions
"red"
)
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
Hi @Kirt1965 ,
You need to select the FIELD VALUE option while setting up colors for gauge visual. see below:
Under BASED ON THE FIELD section, select your column or measure on the basis of which you want to chnage the color.
Thanks,
Pragati
@Kirt1965 - Are you using rules or a color scale?
I am trying to use color scale exactly as the documentation shows at https://docs.microsoft.com/en-us/power-bi/visuals/service-tips-and-tricks-for-color-formatting
Hi @Kirt1965 ,
This article tells 2 ways of doing things.
If you are using CUSTOM option, then you have to give a manual value; for which you have shared the screesnhot.
You can chnage this CUSTOM option to DEFAULT option by using the dropdown:
Thanks,
Pragati
The problem is it does not let me choose anything but custom. That is my only choice. Custom is all I get and I have to hard code numbers.
Hi @Kirt1965 ,
The reason for not getting this option is because you are using the GAUGE visual.
The article you are referring to works on other visuals like table chart, bar chart, etc. not on Gauge visual.
If you need information on custom colors in gauge, refer the following article for this:
https://radacad.com/sentiment-colors-for-gauge-visual-in-power-bi
You will have to I think create a DAX expression for the custom colors you are looking for and then use it on your gauge.
Thanks,
Pragati
Thank you. Basically confirms what I suspected - that the gauge visual doesn't work the same as some others when it comes to custom colors.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
72 | |
68 | |
53 | |
39 | |
33 |
User | Count |
---|---|
71 | |
63 | |
57 | |
49 | |
46 |