I try to divide two Sums but get a complete wrong answer.
I have several rows in my dataset. I would like to divide the total sum for one dimension with the total sum of another one.
The sum for one of the dimensions is 1873520 and the sum I would like to divide with is 1889. I would like the result to be approx 991.8..., but instead I get 0.68875... How is this possible and how can I write to get it right?
I have tried the following:
Sum(Costs) / Sum(Items)
Sum(TOTAL Costs) / Sum(TOTAL Items)
Sum(TOTAL Costs) / Sum(Items)
Sum(Costs) / Sum(TOTAL Items)
Sum(TOTAL Sum(Costs)) / Sum(TOTAL Sum(Items))
...they all end upp with 0,68875....
I have also tried to made variables of them. Variable1 = Sum(Costs) and Variable2 = Sum(Items) - But the result of Variable1 / Variable2 = 0,68875...
Does it have something to do with QlikView dividing "row by row" and then sum-up??