Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
When using the frac() - function in calculations I have noticed that it "misbehaves".
For example Frac(180.072) should return 0.072 but returns 0.072000000000003. This is quite an annoying problem, and it messes up a lot of my calculations which are dependent on the frac() - function.
Am I applying the frac() - function wrong, or is this a (.... known?) bug in QlikView? Is anyone else experiencing the same issue, and is there a hotfix for it?
I am currently running on QV 11.2 64-bit version.
Thanks,
David
I don't think it's a bug, but floating point calculation. See also http://community.qlik.com/blogs/qlikviewdesignblog/2013/12/17/rounding-errors
I don't think it's a bug, but floating point calculation. See also http://community.qlik.com/blogs/qlikviewdesignblog/2013/12/17/rounding-errors
One way could be
=Right(180.072,index(180.072,'.')+1)
Thanks swuehl!
Really helpful post!
... I guess I flunked my programming class
BR,
David