Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
krishna20
Specialist II
Specialist II

multiple conditions in Set analysis

Hi Friends,

I'm having a doubt in applying multiple conditions in set analysis.can anyone pls help me out.

my expression is

=count({<CLM_CR_DT={$(=vCurrentYear)}>}+Count({<CLM_CR_DT={$(=vCurrentYear-1)}>}+Count({<CLM_CR_DT={$(=vCurrentYear-2)}>}CLM_NO))).


I have to get the output as


year count(CLM_NO)

2014  23

2013  34

2012  53


Please let me know, is there any mistake in my expression ASAP.I'm not getting any output.

12 Replies
robert99
Specialist III
Specialist III

Try

=count({<CLM_CR_DT={$(=vCurrentYear)}>}CLM_NO)

+Count({<CLM_CR_DT={$(=vCurrentYear-1)}>}CLM_NO)

+Count({<CLM_CR_DT={$(=vCurrentYear-2)}>}CLM_NO).

jagan
Partner - Champion III
Partner - Champion III

Hi,

Try like this

=count({<CLM_CR_DT={$(=vCurrentYear), $(=vCurrentYear-1), $(=vCurrentYear-2)}>}CLM_NO)


Hope this helsp u.


Regards,

Jagan.

jagan
Partner - Champion III
Partner - Champion III

OR

=count({<CLM_CR_DT={'>=$(=vCurrentYear)<=$(=vCurrentYear-2)'}>}CLM_NO)


Regards,

Jagan.

krishna20
Specialist II
Specialist II
Author

Thank u very much Jagan..Its Working.

jagan
Partner - Champion III
Partner - Champion III

Hi Kalyan,

Please close this thread by giving Correct and Helpful Answers to the posts, so that it would be helpful for others to find the answers.

Regards,

Jagan.

MayilVahanan

Hi

CLM_CR_DT is this date or Year field?


If its date field then instead of this, use Year field.


=count({<CLM_CR_DT={'>=$(=vCurrentYear-2)<=$(=vCurrentYear)'}>}CLM_NO)

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
krishna20
Specialist II
Specialist II
Author

Dear Ram,

I have to filter the values based on date.

krishna20
Specialist II
Specialist II
Author

Hi Jagan,

I applied the same expression for another one.i.e

=count({<CP_CR_DT={'>=$(=vCurrentYear)<=$(=vCurrentYear-2)'}>}CP_Party_ID).

=count({<CL_APPR_DT={'>=$(=vCurrentYear)<=$(=vCurrentYear-2)'}>}CL_LPO_NO)

=count({<CS_APPR_DT={'>=$(=vCurrentYear)<=$(=vCurrentYear-2)'}>}CS_BI_ID)

but im getting 0 for all values except the before expression.

pls help me out.

MayilVahanan

Hi

Try like this

=Count({<CLM_CR_DT={">=$(=Date(YearStart(Max(CLM_CR_DT), -2)))<=$(=Date(Max(CLM_CR_DT)))"}>}CLM_NO)

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.