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
July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.