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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Fusilier2
Helper V
Helper V

Conditional number rounding

Can anybody recommend a solution to this:

I have monthly data values that will always be between 0% and 100% but never higher than 100%.

They are displayed in a visual with labels turned on. What I want to achieve for the data labels is, if the value is < 100% to display to 1 decimal point (e.g. 98.7%), but if the value = 100% to display with no decimal points )100%).

Is that possible? I presume by using a measure?

 

1 ACCEPTED SOLUTION
BITomS
Solution Supplier
Solution Supplier

Hi @Fusilier2 ,

 

FormattedPercent =
VAR BaseValue = SUM('Table'[PercentValue])
RETURN
IF(
BaseValue = 1,
FORMAT(BaseValue, "0%"),
FORMAT(BaseValue, "0.0%")
)

 

Hope this helps!

View solution in original post

3 REPLIES 3
BITomS
Solution Supplier
Solution Supplier

Hi @Fusilier2 ,

 

FormattedPercent =
VAR BaseValue = SUM('Table'[PercentValue])
RETURN
IF(
BaseValue = 1,
FORMAT(BaseValue, "0%"),
FORMAT(BaseValue, "0.0%")
)

 

Hope this helps!

123abc
Community Champion
Community Champion

Excellent ... Good solution 👍

Thank you for your help!

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 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.