Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I've applied Num function in this case num(((9.34 + 9.34 + 9.34 + 9.20 )/4),'#.##0,00') and the result is "9.30" but I expected "9.31" because the result of the operation result is "9.305". If I apply Num function to "9.305" the result is the expected, "9.31"
Why do it happens?
I think you should read about Rounding Errors in QlikView
if you moved average calculaton to other variable then passed that variable to num function then it is returning correct result.
let var0 = ((9.34 + 9.34 + 9.34 + 9.20 )/4);
let var1 = num($(var0),'#.##');
let var2= num(9.305,'#.##');
Thank for your answers.
I have applied this solution:
=num(((9.34 + 9.34 + 9.34 + 9.20 )/4) + 0.000001,'#.##0,00')
Add a very little number that forces to rounding