Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
can someone explain why floor(95/100,0.001) returns 95.0% and floor(57/60,0.001) teturns 94.9% (format pattern for both is #,##0.0%) in a pivot table in qlik sense . I would expect that both would return 95.0%
This is because of binary representation precision issue with floating point numbers. For better understanding, read this blog : https://community.qlik.com/t5/Qlik-Design-Blog/Rounding-Errors/ba-p/1468808
can someone provide me an answer how I can solve this?
As Henric mentioned in the blog post, you can use integers for all calculations, and only return to sub integers for display purposes at the very last step.
In your case, multiply both calculations with factor 1000.