Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Community,
i have a requirement that i need to display the averages for 3 months 6 months and 12 months which includes the current month. i found the following formula in the community is
=avg({<YearMonth ={">=$(=date(addmonths(date#('$(vYearMonth)','MMM-YYYY'),-11),'MMM-YYYY')) <=$(=date#('$(vYearMonth)','MMM-YYYY'))"}, Year=,Month=>} Sales)
I have modified my formula according to above one But, in my environment i don't have year field to do the following change. Year=,Month.
This is my formula: Here what should i keep in the place of 'Year=,Month'
=avg({<Month End Date ={">=$(=date(addmonths(date#('$(vMonthEndSelected)','DD MMM YY'),-11),'DD MMM YY')) <=$(=date#('$(vMonthEndSelected)','DD MMM YY'))"}, Year=,Month=>} Sales)
vMonthEndSelected:
=date(max(Month End Date),'DD MMM YY')
please can some help me with this.
Thanks
Try this:
=Avg({<[Month End Date] ={"=MonthStart([Month End Date]) >= AddMonths(Max(TOTAL [Month End Date]), -11) and MonthStart([Month End Date]) <= Max(TOTAL [Month End Date])"}>} Sales)
Hi Sunny,
Thanks for your reply,Its not working sunny.
Would you be able to provide a sample