Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hello,
I am trying to get count of reports for current month and previous month.
My month is getting calculated from master calender as
Date(MonthStart(Date),'MMM-YY') as Month
now I am writing two variables as
vCurrentMonthCount=count({<Month={"$(=max(Month))"}>}ReportName)
vPreviousMonthCount=count({<Month={"$(=max(Month)-1)"}>}ReportName)
But the previous month calculation is not giving me value. I am not sure
where is my mistake .
Please help.
A bit correction in brackets is needed.
vPreviousMonthCount=count({<Month={"$(=Date(AddMonths(max(Month),-1),'MMM-YY'))"}>}ReportName)
Hi Ashis,
Please try Below Expression:
vPreviousMonthCount=count({<Month={'$(=addmonths(max(Month)),-1)'}>}ReportName)
Thanks,
Arvind Patil
Thank for the reply, however it is giving me 0 value.
If I am correct addmonths will give the first date of the previous month. eg 1/6/2017 .
Regards,
Ashis
Hi,
Can you try like this,
vPrevMonth
=count({<Month={'$(=Month(AddMonths(Today(),-1))'}>}ReportName)
Thanks,Deva
May be like:
vCurrentMonthCount=count({<Month={"$(=Date(max(Month),'MMM-YY'))"}>}ReportName)
vPreviousMonthCount=count({<Month={"$(=Date(AddMonths(max(Month),-1)),'MMM-YY')"}>}ReportName)
Thank you for your reply.
PreviousMonthCount is giving 0 value. However current month is fine.
Regards,
Ashis
A bit correction in brackets is needed.
vPreviousMonthCount=count({<Month={"$(=Date(AddMonths(max(Month),-1),'MMM-YY'))"}>}ReportName)
Thank you, this works.