Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I'm trying to restrict a chart to only show the last 3 months data. I have a simple sum of '$amount' as the expression. This is shown by date (using a master calendar) showing only MM-YYYY 'monthyear_date'.
I would like to restrict the dimension to show only last 3 months. Any help appreciated.
Hi, you can avoid AddMonths with :
sum({<Date= {">=$(=monthstart(max(Date),-2))"}>Amount)
hi
you could use something like this
sum({<Date= {">=$(=addmonths(monthstart(max(Date)),-2))"}>Amount)
Thank you, I hope I've used this correctly? Because I keep receiving a "allocated memory exceeded" error..
sum({<monthyear_date= {">=$(=addmonths(monthstart(max(monthyear_date)),-2))"}>Amount)
hi
it seems ok ,
does the month field and the amount field are in the same table
if not , how are they connected
Hi, you can avoid AddMonths with :
sum({<Date= {">=$(=monthstart(max(Date),-2))"}>Amount)