Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Highlighted
clucky
New Contributor II

If Function - New to Qlik

I am trying to choose a field to select 4 out of 6 items (exclude (0-30), exclude (31-60), include (61-120), include (121-180), include (181-360), include (Over 360)). Then the ones selected to add each amount from the amount field. 

Aging = 0-30, 31-60, 61-120, 121-180, over 360

SumIf (A2:A:1500, ">0-30", B2:B1500). I have no idea how to do a sumif in Qlik. 

Any help will be appreciated. 

Tags (4)
Labels (2)
2 Solutions

Accepted Solutions
jwjackso
Valued Contributor

Re: If Function - New to Qlik

Assuming you have an aging field with values like '0-30'...

 

=Sum(If(Match(aging,'61-120','121-180','181-360','Over 360') > 0,amount,0))

View solution in original post

trdandamudi
Honored Contributor II

Re: If Function - New to Qlik

One more way is as below:

=Sum({<Aging -={'0-30', '31-60'}>} Amount)

 

Note: please make a note there is a '-' (hypen) before the equal sign.

View solution in original post

4 Replies
jwjackso
Valued Contributor

Re: If Function - New to Qlik

Assuming you have an aging field with values like '0-30'...

 

=Sum(If(Match(aging,'61-120','121-180','181-360','Over 360') > 0,amount,0))

View solution in original post

trdandamudi
Honored Contributor II

Re: If Function - New to Qlik

One more way is as below:

=Sum({<Aging -={'0-30', '31-60'}>} Amount)

 

Note: please make a note there is a '-' (hypen) before the equal sign.

View solution in original post

clucky
New Contributor II

Re: If Function - New to Qlik

That worked!! I took out the >0 as there could be negative numbers. Much appreciated!

clucky
New Contributor II

Re: If Function - New to Qlik

Trdandamundi, Thank you as well. Learning other solutions is great to gain some knowledge:) Much appreciated!