Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

List Sum

Hi, ALL

I have a list of column1.no and column2.price.

and want to calculate prices compare to some standard.

111.PNG.png

I hope get sum of no 3,4,5.

if i use ' sum(if(no >=3, price))', QlikView give me just sum of no.3.

I want 3100(sum of no.3,4 and 5).

thank you.

1 Solution

Accepted Solutions
Not applicable
Author


Check the attached one

View solution in original post

8 Replies
chiru_thota
Specialist
Specialist

use this

sum({<no={3,4,5}>}Price)

or

sum({<no= {'>=$(=(3))'}>}Price)

Not applicable
Author

PFA.

Thanks,

Ram

SunilChauhan
Champion
Champion

use below

sum({<no={">=$(=3)"}>}price)

this will give you dynamic result if you add more No 6,7,8,9........

hope this help

Sunil Chauhan
Not applicable
Author

thank you, Chiranjeevi Thota!!!!!

I have one more..

then, if i want a selected value, how can?

sum({<no= {'>=$(=('something'))'}>}Price)


like this?

or

is it 'blank' instead of 'Value'?

Not applicable
Author

thank you, Sunil Kumar Chauhan!

yes, that's right.I want more dynamic like you mean.

I have one more question.

then, if i want a selected value, how can?

sum({<no= {'>=$(=('something'))'}>}Price)


like this?

or

is it 'blank' instead of 'Value'?


thx.

Not applicable
Author

Like this

  Create a va riable like vOption = Max(No)

and your expression is

=SUM({<No={">=$(vOption)"}>}Price)

Not applicable
Author

hi, Ravi.

I' doing as your solution.

but not working.

and I mean if i select '3' in no list box, sum of 3,4,5 appear.

select '2', sum of 2,3,4,5

select '4', sum of 4,5


.. like this. right your expression?

Not applicable
Author


Check the attached one