Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Division of two sums with different parametres in a table

MonthCategoryValue
Jan01
Jan05

Jan

32
Feb02
Feb34
Feb3

6

Hello. I've got a bit of a problem which I hoped someone can help me find a solution to. The original table can be found above.

I need to build a table with two columns. First column is month and second column is

sum({<Category = {'0'}>} Value) / sum({<Category = {'3'}>} Value)

So the result should look like

MonthSum
Jan3
Feb0.2

It obviously doesn't work if I write it down like that. Can't implement this in the script either since sum(x)/sum(y) isn't sum(x/y).

Thanks in advance.

1 Solution

Accepted Solutions
Not applicable
Author

Hi pavelyarygin

please see the attached example for help.

Good luck!

Rainer

View solution in original post

2 Replies
Not applicable
Author

Hi pavelyarygin

please see the attached example for help.

Good luck!

Rainer

Not applicable
Author

Thank you so much. My solution was the correct one but you definitely pushed me to finding the error. I had the result set as a WHOLE number so since all of the sums I got were 0.3-0.4, they automatically got shown as 0. I actually thought there was an error and I was not thinking of something essential but it was such a trivial mistake. Wasted like 4 hours on that too. Well, learned a lesson to keep an eye on the 'number' tab at least