Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
What is the best formula to add the values of the last 12 months having only Year and Month in the yyyymm format?
Thanks for helping
Try this: Sum({<Calendar.YearMonth = {">=$(=Date(MonthStart(AddMonths(Today(), -11)), 'YYYYMM'))<=$(=Date(MonthEnd(Today()), 'YYYYMM'))"}>} Value)
You might have to adjust the field name where your YearMonth values are stored. Here I'm using Calendar.YearMonth.
Try this: Sum({<Calendar.YearMonth = {">=$(=Date(MonthStart(AddMonths(Today(), -11)), 'YYYYMM'))<=$(=Date(MonthEnd(Today()), 'YYYYMM'))"}>} Value)
You might have to adjust the field name where your YearMonth values are stored. Here I'm using Calendar.YearMonth.