Skip to main content
Announcements
Qlik Community Office Hours, March 20th. Former Talend Community users, ask your questions live. SIGN UP
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to use a Sum If in Qlik Sense

I use this formula in excel so i can calculate the cumulative frequency (like a Pareto), i need that numbers with a value less than 60% in red, between 60% and 90% yellow and more than 90% in green.

=SUMIF($B$2:$F$6,">="&B2)/SUM($B$2:$F$6)

Capture.PNG

PD

=if(sum(Total)=0,white(),

colormix1(sum(Total)/$(=max(aggr(sum(Total),LOSS))),Green(),red())) is not useful because it doesnt go through yellow and it's not so exactly.

And neither this formula works

=if(sum(Total)=0,white(),

if(rangesum(above(sum(Total),0,rowno()))/sum(TOTAL Total)<0.6,red(),

if(rangesum(above(sum(Total),0,rowno()))/sum(TOTAL Total)>0.9,Yellow(),

green())))

2Capture.PNG

7 Replies
agigliotti
Partner - Champion
Partner - Champion

try replacing ABOVE with BEFORE

Not applicable
Author

Thank you but it is still not working.

agigliotti
Partner - Champion
Partner - Champion

could you post a sample qvf ?

Not applicable
Author

Yes, hope you can help me. And again really thank you very much.

sunny_talwar

Which direction are you accumulating? vertically or horizontally?

Not applicable
Author

I would like to compare the value against the total (as it could be seen in the excel); but i don't have really very clear how does the  RangeSum formula's work, what i need it's closer to the Colormix formula

brunobertels
Master
Master

Hi

Not sure it will helpfull but try this

if(sum(Total)=0,white(),

ColorMix1( hrank( total column(1))/  noofrows(TOTAL), lightred(), LightGreen()))

regards

Bruno