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

Round function with wrong output

Hello!

When i use the round function to complete from 3 to 2 decimal places; it give in a wrong output when the third decimal is a 5. For example at 1.235, I get the result 1.23 instead of 1.24.

I tried to think of an own creative solution, for example: first plus 0.001 and then use the round function. This only works for positive numbers, but not for negative numbers.

As a new user of Qlikview I read first several entries about this problem, but no solution is given. Is there a script that will solve this problem?

Regards, Elmar

1 Reply
swuehl
MVP
MVP

Have you already discovered Henric's blog post about rounding floating point values to sub-integer values?

http://community.qlik.com/blogs/qlikviewdesignblog/2013/12/17/rounding-errors