The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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.
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?
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
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.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.