# QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
New Contributor

## 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??

Tags (1)
1 Solution

Accepted Solutions
Highlighted
MVP

## Re: I try to divide two Sums but get a complete wrong answer.

Hi Jorgen, Costs is an interval value, this is used to measure time, in this number format a unit (1)=1day, so 20 minutes are equal to 1/24/60*20 (0.01388..)

You can adding the Costs values as: =Sum(Num#(Costs,'0'))

2 Replies
Highlighted
MVP

## Re: I try to divide two Sums but get a complete wrong answer.

Hi Jorgen, Costs is an interval value, this is used to measure time, in this number format a unit (1)=1day, so 20 minutes are equal to 1/24/60*20 (0.01388..)

You can adding the Costs values as: =Sum(Num#(Costs,'0'))

New Contributor

Thanks a lot!!!