Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All,
I need two show Previous 2 months count in my chart like Apr'14,May'14,June'14 where currently i can show count for June'14 how to show count for Apr'14 and May'14?? and dynamic if current selection is May'14 then it should show Mar'14 Apr'14 May'14?
Count({<Date={">=$(=AddMonths(Max(Date))) <=$(=Date(Max(Date),'DD/MM/YYYY')) "} >} Field)
Assume that the date format is as DD/MM/YYYY.
Hi Rohit,
In your calendar table, add new field for month flage. Ex:
[Calenda]:
Load
Dates,
Months,
...
Years*12+Month AS [MonthFlage]
FROM....
Then in expression, we can use
Count({$<[MonthFlage]= {">=$(=Max([MonthFlage])-2)<$(=Max([MonthFlage]))"} >} Field)
It would be great if you can provide your sample app.
Regards,
Sokkorn
Try this:
Current Month:
=count({< CalendarYear=, CalendarMonth=, CalendarDate={'>=$(=MonthStart(Max(CalendarDate)))<=$(=MonthEnd(Max(CalendarDate)))'} Field)
Last Month (i.e Current Month-1):-
=count({< CalendarYear=, CalendarMonth=, CalendarDate={'>=$(=MonthStart(Max(CalendarDate), -1))<=$(=MonthEnd(Max(CalendarDate), -1))'} Field)
Current Month-2:-
=count({< CalendarYear=, CalendarMonth=, CalendarDate={'>=$(=MonthStart(Max(CalendarDate), -2))<=$(=MonthEnd(Max(CalendarDate), -2))'} Field)