Qlik Community

Deployment Framework

Announcements
June 28, 10AM ET: Qlik Nation and Qlik Community present: CyberSleuth REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Division formula issue

Hello,

I'm currently still learning about Qlikview but what seemed to be a simple formula turned out to be an issue for me.

I'm trying to calculate the rate of two sum formulas.

My two formulas, sum(A) and sum(B), are able to output data. However, when I want to divide them, my straight table outputs 0.

The formula I have is: Div(sum(A),sum(B)).

Any help would be appreciated. Thank you in advance!

1 Solution

Accepted Solutions
sunny_talwar

See if the Num function helps:

Num(Sum(A)/Sum(B), '##.00000000')

View solution in original post

8 Replies
sunny_talwar

May be try one of these:

Sum(A)/Sum(B)

or

Sum(A/B)

maxgro
MVP
MVP

did you try?

sum(A) / sum(B)

Not applicable
Author

Yes, and the output is still 0

sunny_talwar

In addition, Div function outputs a integer so if your Sum(A) < Sum(B) (both positive numbers) you will see 0

QlikView ‒ Div - script and chart function

maxgro
MVP
MVP

could you post your .qvw?

sunny_talwar

See if the Num function helps:

Num(Sum(A)/Sum(B), '##.00000000')

Not applicable
Author

Thank you, this worked perfectly!

sunny_talwar

Awesome , glad it did