Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Friend,
I've a requirement when I select a month in current year (ex: Mar 2016 or Apr 2016) it has to show the values till last 12 months ie Mar 2015 or Apr 2015.
Please help me for getting the logic.
Thanks in advance
Anusha
Create the MonthYear Field using Date(MonthStart(Date),'MMM YYYY') as MonthYear
Now write below expression
=sum({<MonthYear={">=$(=addmonths(max(MonthYear),-11))<=$(=max(MonthYear))"}>} Value)
Or you can just stick with dates:
Sum({<Date = {"$(='>=' & Date(MonthStart(AddYears(Max(Date), -1)), 'YourDateFieldFormatHere') & '<=' & Date(MonthEnd(Max(Date)), 'YourDateFieldFormatHere'))"}>}Value)
Here replace YourDateFieldFormatHere with the format that your datefield is in