Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
There is an issue with the ranking based on the data we have. Below is the data.
LOAD * INLINE [
DIM, AMT
A, 276880.64
B, 276880.64
C, 34610.08
C, 34610.08
C, 34610.08
C, 34610.08
C, 34610.08
C, 34610.08
C, 34610.08
C, 34610.08
];
When adding this calculated dimension into the chart, it give incorrect results to the ranking, suppose A,B,C should be rank as 1 because the total amount by DIM is the same amount but it ranked C as 1 and A,B as 2.
=aggr(Rank(Sum(AMT),4,1),DIM)
This is because of the precision issue of floating point numbers. If you expand your decimal precision, you would see all numbers are NOT same.
That's why it is said you must be very careful when comparing (ranking comes after comparing) decimal values in computer world because of it's binary representation issue.
For better understanding have a look here: https://community.qlik.com/t5/Qlik-Design-Blog/Rounding-Errors/ba-p/1468808
Hello, any solutions for this? Or it is a well known bug for QlikView?
Good question, mark here waiting some expert on it. Thanks!
Hi,
is this only happen to qlikview but not qliksense?
This is because of the precision issue of floating point numbers. If you expand your decimal precision, you would see all numbers are NOT same.
That's why it is said you must be very careful when comparing (ranking comes after comparing) decimal values in computer world because of it's binary representation issue.
For better understanding have a look here: https://community.qlik.com/t5/Qlik-Design-Blog/Rounding-Errors/ba-p/1468808