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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
mkins
Helper I
Helper I

Error with mesure % values not showing as being equal....even thought they are

Hi all,

 

I have 2 measures which are showing both showing as 59%. However, when I use the following formula to compare them (and help define conditional formatting colours) they are showing as not being equal.

 

% 1st serve colour =
VAR _max = MAX([1st serve % opponent player],[1st serve % tagged player])
VAR _min = MIN([1st serve % opponent player],[1st serve % tagged player])
VAR _colour =
SWITCH(
    TRUE(),
    _max=_min,"green",
    [1st serve % tagged player]=_max,"green",
    [1st serve % tagged player]=_min,"red",
    [1st serve % tagged player]>_min&&[1st serve % tagged player]<_max,"yellow"
)
RETURN
_colour

 

 

I have changed the values of both measures to 2 decimal places, and when this happends one is 58.7% and the other is 59.1%. Therefore, a rounding 'error' is the culprit to them not showing as equal. Is there any way to ammend the formula so that measures are calculated to zero decimal places?

 

Hope this makes sense.

 

TIA

 

Marc

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @mkins ,

Please try ROUND() function:

Round([value],0)

For more details, you can read related document: ROUND – DAX Guide

 

Best regards,
Community Support Team_Binbin Yu
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
Anonymous
Not applicable

Hi @mkins ,

Please try ROUND() function:

Round([value],0)

For more details, you can read related document: ROUND – DAX Guide

 

Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@Anonymous I initially thought this was working as expected, but for some measures it is not. Where should the ROUND function go? I have tried in multiple different places in the measure as I thought ROUND(MAX... Was the correct way but I'm getting some varied results 

Thanks 

 

 

Excellent, works perfectly. Many thanks @Anonymous 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.

Top Solution Authors