Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
This might be a silly question but I was wondering,
Is there a difference between
Sum(A) + Sum(B)
OR
SUM(A + B)
The result returned are the same, since I am dealing with +60M records I was wondering are there performance issues involved ...
Hi,
in a straight table you are able to choose a "Total Mode". Unfortunately in a pivot table not.
So you have to be careful in writing your expressions.
"Expression Total" or "Sum of Rows" could be end in different results.
Rainer
I do not know the exact internal difference in the QlikView algorithms. but I'm almost sure that sum (A) + sum (B) returns the same thing than sum (A+B) in terms of results.
In terms of performance just try both solutions : load you 60 M of line.
Look the results in terms of RAMs and in terms of time and choose the best solution. You can use the QlikView Server Performance application (download it here http://demo.qlik.com/ ) to analyse the .mem files (you can create a .mem statistics files by clicking on settings / document properties / General / Memory settings button.
Regards
Hi,
there could be a difference. It depends on your data.
See the screenshot.
Rainer
Any Idea why they not the same ? is it something to do with rounding ?
This actually scares me a little bit. Mathematically there is no difference in the two methods, but the sample table you provided, there is quite a difference. I also show that there is some difference in the two methods, although I do not show as great of differences but at only 13 million lines. Here is my verification table:
I would love to see another example from another larger (50 million +) record data set. I would recommend sticking with Sum(A) + Sum(B) to be able to reconcile your results.
Thanks,
JS
Hi,
in a straight table you are able to choose a "Total Mode". Unfortunately in a pivot table not.
So you have to be careful in writing your expressions.
"Expression Total" or "Sum of Rows" could be end in different results.
Rainer
Hi,
I have done the same as you with our data set, around 50M records. Like yourselves mine is slightly out, I have attributed this to rounding since one of the figures goes to 7 decimal places. With 50M records it was less than .5. I can't seem to work out how to paste picture so I can't show you the table !!