Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
Not applicable

Set Analysis for 2 Conditions

I'm trying to create a sum calculation based on a field (NC) not equalling certain criteria ("1200,2100,2150 .......") and field (F4) = "PI"

I've managed to get the 1st criteria to work using the expression below but I'm not sure how to include the AND F4 = "PI" bit

Sum({$<NC-={"1200","2100","2150","2201",

"2202","2011","2012","2013","0011","0012","0013","0020","0021","0030",

"0040","0031","0041","0045","0046","1001","1010","1235","1230","1240",

"1250","2200","3200","4001","1102","4010","1110","2101","2102","2301",

"2310","2320","2325","3000","4013","4021","4022","4035","4030","4900",

"4902","4903"}>}CR)

Any ideas please, I've tried what I thought but just keep getting 'Error in Expression' messages whenever i try anything

4 Replies
sunny_talwar
Not applicable

Re: Set Analysis for 2 Conditions

May be like this:

Sum({$<NC-={"1200","2100","2150","2201",

"2202","2011","2012","2013","0011","0012","0013","0020","0021","0030",

"0040","0031","0041","0045","0046","1001","1010","1235","1230","1240",

"1250","2200","3200","4001","1102","4010","1110","2101","2102","2301",

"2310","2320","2325","3000","4013","4021","4022","4035","4030","4900",

"4902","4903"}, F4 = {'PI'}>}CR)

tresesco
Not applicable

Re: Set Analysis for 2 Conditions

Try like:

Sum({$<NC-={"1200","2100","2150","2201",

"2202","2011","2012","2013","0011","0012","0013","0020","0021","0030",

"0040","0031","0041","0045","0046","1001","1010","1235","1230","1240",

"1250","2200","3200","4001","1102","4010","1110","2101","2102","2301",

"2310","2320","2325","3000","4013","4021","4022","4035","4030","4900",

"4902","4903"} , F4={PI}>}CR)

And yes, you can remove the double quotes around the numbers.

Not applicable

Re: Set Analysis for 2 Conditions

Thanks guys, really appreciate your help. I just couldn't figure out how to write it.

sunny_talwar
Not applicable

Re: Set Analysis for 2 Conditions

It is still not working?