So I have seen a strange occurrence in Qlikview, Qlikview is refusing to round my values ending with a recurring number i.e 34.63999999. This specific value is calculated through a calculated-dimension field (Not sure if this has an impact as to why it is not working)
I have tried the following functions on this dimension:
Each of the above rounds all my other values except those that end in a recurring decimal value. Is there something I am missing, or another rounding function that accommodates for this?
I have created a calculated dimension and used Round. It worked perfectly.
Is it possible for you to upload your QVW with sample data.
So my calculated dimension looks like this:
And my result looks like this:
The values ending with .65000001 is the recurring decimal values, the NUM should be limiting it to 2 decimal values, but it does not.
It seems to me as if you want to format the numbers rather than rounding them. Use
Num( Number, '#.00' )
Also, note that the internal binary representation cannot be rounded to exact decimal numbers. See Rounding Errors
Rounding of numbers has always technically limitations: Rounding Errors. As an alternatively you could try some way of cut the results with string-functions like:
left(YourAggr, index(YourAggr, '.') + 2)
also possible could be ways to split the number with floor() and frac() and multiply and/or format them and adds together again - maybe included in a dual().
Thanks Henric. I solved the rounding problem by restarting Qlikview (not sure why this worked) and then I got the result in the picture posted, but the NUM is still as issue.
I tried using the expression '#.00' instead but it still gives me the same result.