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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
lherbert501
Post Partisan
Post Partisan

Percentage Range

Hi there,

 

I have a simple measure for a gauge that gives me the correct colour, depending on the value.

 

Gauge = IF([sales] >= [SalesAverage], "#00A36C","#D64550")
 
gauge.PNG
 
However, as one is 71.2% percent and one is 71.1%, this isnt picking it up as equals to.
 
Is there a way around this, or to account for the rounding?
 
Thanks
 
Liam
 
 
 
1 ACCEPTED SOLUTION
v-yanjiang-msft
Community Support
Community Support

Hi @lherbert501 ,

According to your description, I create a sample.

vkalyjmsft_0-1661138835687.png

SalesAverage is a measure.

vkalyjmsft_1-1661138918462.png

Now, you can tweak the Gauge measure like this:

 

Gauge =
IF (
    INT ( MAX ( 'Table'[Sales] ) ) >= INT ( [SalesAverage] ),
    "#00A36C",
    "#D64550"
)

 

Get the result.

vkalyjmsft_0-1661146287521.png

I attach my sample below for your reference.

 

Best Regards,
Community Support Team _ kalyj

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-yanjiang-msft
Community Support
Community Support

Hi @lherbert501 ,

According to your description, I create a sample.

vkalyjmsft_0-1661138835687.png

SalesAverage is a measure.

vkalyjmsft_1-1661138918462.png

Now, you can tweak the Gauge measure like this:

 

Gauge =
IF (
    INT ( MAX ( 'Table'[Sales] ) ) >= INT ( [SalesAverage] ),
    "#00A36C",
    "#D64550"
)

 

Get the result.

vkalyjmsft_0-1661146287521.png

I attach my sample below for your reference.

 

Best Regards,
Community Support Team _ kalyj

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thankyou  @v-yanjiang-msft and @amitchandak  🙂

amitchandak
Super User
Super User

@lherbert501 , Make sure both measures are 1 or two decimal places and not whole numbers

If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.