Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am creating a report where i need to show data for last 12 months , For e.g ( if i enter date as 5 nov 2014 , then it should show me data from nov 2013 to oct 2014 ) .
Till Now i have created a field with MonthName() function in my script which gives me month along with the year like ( Dec 2014 ,sep2013) .
Can somebody suggest me the logic which i need to apply over here .
P
Thanks in advance !!
Hi,
Try like
Sum({<datefield={">=$(Date(Addmonths(max(datefield),-12)))<=$(=Date(max(datefield)))}>}Amount)
Regards
Hi,
Check this too
Sum({<DATE={">=$(=MonthStart(Max(DATE),-12)) <=$(=MonthEnd(Max(DATE)))"}>} SALES)
Regards
ASHFAQ
Sum({<datefield={">=$(Date(Addmonths(max(datefield),-12)))<$(=Date(max(datefield)))}>}Amount)
Hi,
Try like
Sum({<datefield={">=$(Date(Addmonths(max(datefield),-12)))<=$(=monthend(addmonths(max(datefield),-1))}>}Amount)
Regards
yes ashok,you are right .my formula calculate before today and last 12 months
Hi,
I missed the = sign in set anlysis
update
Sum({<datefield={">=$(=Date(Addmonths(max(datefield),-12)))<=$(=Date(max(datefield)))}>}Amount)
Regards