Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
saurabh5
Contributor II

Set Analysis comparing month year from multiple date field

Hi All,

i am stuck with a set analysis expression in which i want to compare the  max month and year from a date field, being same as  month and year from another date field,

field1                 field            ID

2/2/2015          2/3/2015          1

2/2/2015          1/3/2015           2

2/1/2015           2/5/2015          3

1/1/2015           12/26/2014      4

12/23/2014        10/23/2014     5

So in the above case Feb 2015 is max in field1 so we want to count ID having Feb 2015 in field, so the count will be 2.

Thanks for Help

Regards

Saurabh

1 Solution

Accepted Solutions
Not applicable

Re: Set Analysis comparing month year from multiple date field

Hi,

You can use =COUNT({<field={'>=$(=monthstart(max(TOTAL field1)))<=$(=MonthEnd(max(TOTAL field1)))'}>}ID)

Regards

Nandkishor S. Pandirkar

2 Replies
MVP
MVP

Re: Set Analysis comparing month year from multiple date field

PFA

=sum(aggr(if(MonthStart(field)= monthstart(max(TOTAL field1)),1),ID))

Not applicable

Re: Set Analysis comparing month year from multiple date field

Hi,

You can use =COUNT({<field={'>=$(=monthstart(max(TOTAL field1)))<=$(=MonthEnd(max(TOTAL field1)))'}>}ID)

Regards

Nandkishor S. Pandirkar

Community Browser