Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

selvakumara
New Contributor III

AND Condition for Same date fields

Hi ,

I want to get the lessthan 24 months and greater than 12 months data using set expression.

This is my set expression.

COUNT({($<id]={'17'},[DATE]={"<=$(AddMonths(ADMISSION_DATE,24), 'MM-DD-YYYY')"},[DATE]={">=$(AddMonths(ADMISSION_DATE,12), 'MM-DD-YYYY')"} >)} [Name])

Is it correct ?

Thanks,

Selva

4 Replies
Partner
Partner

Re: AND Condition for Same date fields

maybe this:

= COUNT( {< id = {'17'}, DATE = {"<=$(=AddMonths(ADMISSION_DATE,24))>=$(=AddMonths(ADMISSION_DATE,12))"} >) Name )

I hope it's really what you are looking for.

Partner
Partner

Re: AND Condition for Same date fields

Try with

COUNT({$<[DATE]={">=$(=Date(AddMonths(ADMISSION_DATE,12), 'MM-DD-YYYY'))<=$(=Date(AddMonths(ADMISSION_DATE,24), 'MM-DD-YYYY'))"}>} [Name])

Where ADMISSION_DATE is one single date

Highlighted
selvakumara
New Contributor III

Re: AND Condition for Same  date fields

Thanks for your response. Will try it

selvakumara
New Contributor III

Re: AND Condition for Same  date fields

It will basically return multiple date based year selections