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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Gauge Visual Colors based on Field Value

I have 3 gauge visuals in my sales report showing the total sales to various metrics. The three I have are:

Total Sales (2025) to the YTD Totals Sales of the previous year (2024),  Total Sales (2025) to the Budget, and Total Sales (2025) to the Forecast. 

 

My gauge visuals are colored based on a field value/measure I created for each of the 3 visuals. Here is the DAX I have for one of the gauge visuals colors. 

Sales PY Gauge Color = 
SWITCH(
    TRUE(),
    [Total Sales] >= [Total YTD Sales 2024], "#49AB73", "#C15E65"
     )
 

My gauge visual is set up with my callout value being the Total Sales (2025), the maximum value is the full year total (whether that be Total Sales for 2024, Total Budget for this year) and my target value is the current months total (Total Sales in 2024 for current month, Total Budget for current month). 

 

But for some reason, my colors are only working for one of the gauges, the YTD Total Sales previous year visual. My other 2 measures with budget and forcast are modeled the same way as the YTD previous year visual. 

Sales Budget Gauge Color = 
SWITCH(
    TRUE(),
    [Total Sales] >= [Sales Budget], "#49AB73", "#C15E65"
     )
 
Sales Forecast Gauge Color = 
SWITCH(
    TRUE(),
    [Total Sales] >= [Sales Forecast], "#49AB73", "#C15E65"
     )
 
 

The callout value I have placed in these visuals (Total Sales) is displaying the red hex code I have, even though my target values (Current month's Sales Budget/Forecast) are lower than the callout value. Shouldn't it be displaying my green hex code in this case?

Can anyone help me with why it's not working? I've used this in other reports and this hasn't happened to me before now. 

 

1 REPLY 1
MFelix
Super User
Super User

Hi @Anonymous ,

 

Apologize for the question but are you using the correct formula in the condittional formatting for all the visuals? I know it sounds basic but I sometimes mess up my charts using the incorrect formula.

 

Can you please share a mockup data or sample of your PBIX file. You can use a onedrive, google drive, we transfer or similar link to upload your files.

If the information is sensitive please share it trough private message.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors