2 Replies Latest reply: Feb 13, 2015 4:50 PM by Nandkishor Pandirkar

# 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

• ###### Re: Set Analysis comparing month year from multiple date field

PFA

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

• ###### 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