6 Replies Latest reply: Apr 3, 2013 9:34 AM by Vijit Jindal

How can I achieve the common data for the last three months

I need to get the count of Id's which are having status '2' for the last three months...

Created three variables to get last three months dates as below

vMaxmonth = Date(Max(Month_Date),'DD/MM/YYYY')

and used these variables in chart like this

Count({\$<Month_Date={'\$(vMaxmonth)'}+{'\$(vLastmonth)'}+{'\$(vLastmonth2)'},Status={2}>}ID)

but it is giving me all the records, not the common records having status 2 for last three months,

• Re: How can I achieve the common data for the last three months

Count({\$<Month_Date={'\$(vMaxmonth)','\$(vLastmonth)','\$(vLastmonth2)'},Status={2}>}ID)

• Re: How can I achieve the common data for the last three months

Try this:

Count({\$<Month_Date={"<=\$(vMaxmonth) >=\$(vLastmonth)"},Status={2}>}ID)

HTH

Sushil

• Re: How can I achieve the common data for the last three months

Hi!

Try

IF(Status={2},Count({\$<Month_Date={'\$(vMaxmonth)'}+{'\$(vLastmonth)'}+{'\$(vLastmonth2)'},ID))

By Rebeca

• Re: How can I achieve the common data for the last three months

Hi,

Try like this

=Count({\$<DateFieldName={'>=\$(=MonthStart(Max(DateFieldName)))<=\$(=MonthEnd(Max(DateFieldName)))'}*
{'>=\$(=MonthStart(Max(DateFieldName), -1))<=\$(=MonthEnd(Max(DateFieldName), -1))'} *
{'>=\$(=MonthStart(Max(DateFieldName), -1))<=\$(=MonthEnd(Max(DateFieldName), -1))'}, Status={2}>} ID)

If you need to ID to exist in any of the three months then use this

=Count({\$<DateFieldName={'>=\$(=MonthStart(Max(DateFieldName)))<=\$(=MonthEnd(Max(DateFieldName)))'} +
{'>=\$(=MonthStart(Max(DateFieldName), -1))<=\$(=MonthEnd(Max(DateFieldName), -1))'}  +
{'>=\$(=MonthStart(Max(DateFieldName), -1))<=\$(=MonthEnd(Max(DateFieldName), -1))'}, Status={2}>} ID)

Hope this helps you.

Regards,

Jagan.

• Re: How can I achieve the common data for the last three months

Hi,

Try this:

vMaxmonth (the same)