Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I am facing one Issue in the Comparison of the Current Month vs Previous Month according to the Fiscal Year Issue is that when I select Apr 2013 then its show the value of the apr 2013 but for the previous month ie Mar 2012 shows zero .
Can any one tell me the solution.??
Regards
Deepak
Since you have a Date field that I assume contains data values you can try these:
Current month:
sum({<PostingYear=,PostingMonthName=,Date={'>=$(=monthstart(max(Date)))<=$(=monthend(max(Date)))'}>}RMSFGIssueQty)*-1
Previous month:
sum({<PostingYear=,PostingMonthName=,Date={'>=$(=monthstart(max(Date),-1))<=$(=monthend(max(Date),-1))'}>}RMSFGIssueQty)*-1
Hi deepak,
What expression you are using for calculating Previous Month? Is it just a Month-1 or you are calculating on the basis of Financial year? Can you provide your sample example?
-Yojas
Hi Yojas,
Please find the expression below I am using Financial Year like 2012 ,2013.. its start from the april as I mentioned above I need Current Fiscal Month vs Previous Fiscal Month or It also need to work across the year like when I select Apr 2013 for Current Month its shows the value for April 2013 and In the previous month its will show the value of march 2012.
for the Current Month
sum({<PostingYear={$(=year(yearname(date(max(Date)),0,4)))},PostingMonthName={$(=Month(Max(Date)))}>}RMSFGIssueQty)*-1
for the previous month
=sum({<PostingYear={$(=year(yearname(date(max(Date)),0,4)))},PostingMonthName={$(=month(addmonths((max(Date)),-1)))}>}RMSFGIssueQty)*-1
Hi,
It seems to me your 2nd formula wouldn't bring values of March 2012 but May 2013. You can try:
=sum({<PostingYear={$(=Year(Addmonths(Max(Date),13)))},PostingMonthName={$(=Month(Addmonths(Max(Date),13)))}>}RMSFGIssueQty)*-1
Hope this helps
Since you have a Date field that I assume contains data values you can try these:
Current month:
sum({<PostingYear=,PostingMonthName=,Date={'>=$(=monthstart(max(Date)))<=$(=monthend(max(Date)))'}>}RMSFGIssueQty)*-1
Previous month:
sum({<PostingYear=,PostingMonthName=,Date={'>=$(=monthstart(max(Date),-1))<=$(=monthend(max(Date),-1))'}>}RMSFGIssueQty)*-1