Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi
i want to always get the sum of sales of the last 12 months from the current selection. I am getting only the sum(sales) for the current selection month-year, but not the cummulated value, like for example if i select Nov-2012, i want to get the sum(sales) for the period between, Nov-2012 and Nov-2011 (12 months)
i use this formula, but it is not working.do you have other ideas? i also used AddMonths() but i get the same.
thanks
=num(sum({$<[Period ID]={">=$(=max([Period ID])-12)<=$(=max([Period ID]))"}>} Sales),'#.##0')
Try with this:
sum({< PeriodFilter=, [Period ID]={">=$(=max([Period ID])-12)<=$(=max([Period ID]))"}>} Sales)
Where PeriodFilter is the filter that use in your report.
Regars,
Ricardo
Use like as below
sum({<[Period ID]={'$(=Max([Period ID])-1)'}>}sales)
The problem with the expression, is the format of the dates. You should be very careful with format dates. What is the format for [Period ID]? YYYY-MMM, YYYYMM, etc?
i have integers for the period ID, not date formats. I generated a column with the Period id table, exactly to avoid that problem. My numbers are from 1 to 65
seems like i wrongly expanded the $ sign, now it is working
thanks
Try with this:
sum({< PeriodFilter=, [Period ID]={">=$(=max([Period ID])-12)<=$(=max([Period ID]))"}>} Sales)
Where PeriodFilter is the filter that use in your report.
Regars,
Ricardo
thanks, this is correct