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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
saviourofdp
Frequent Visitor

Custom Visual Rounding Issue

If you have a measure that performs the calculation (29 / 200) * 100, and format the measure using the formatting tool in the PBI Desktop ribbon to 0 decimal places, custom visuals show a different value to the core built-in visuals.

saviourofdp_0-1662630295911.png

I understand that this is due to floating point precision issues and the result in the example is not exactly 14.5 but actually 14.4999999999999998. When rounded, this gives 14 in the custom visual as you can see. I've seen this in all certified custom visuals in the store and my own custom visuals (even when using the formatting utilities library). Has anyone solved this generally when developing visuals? I know this can be solved by rounding the result in DAX in the report itself but that's out of the hands of a custom visual developer.

In short, how do I ensure that my custom visual displays the same value as the core built-in visuals with respect to floating point imprecision?

2 REPLIES 2
v-yiruan-msft
Community Support
Community Support

Hi @saviourofdp ,

What custom visual you are using? Is that developed by you? Or you get it from AppSource? If it get from AppSource, you can try to contact custom visual support team to get professional help.

Power BI Custom Visuals' Community

Best Regards

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

Hi @v-yiruan-msft it is from AppSource however that wasn't my point. I'm seeing this issue when developing my own visuals and I was demonstrating that all certified visuals in AppStore that I've tried are also exhibiting that behaviour. I want to implement a fix for this in my own visuals. 

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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

Top Kudoed Authors