Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear Community,
i trying to calculate last three months sales based on the selection.
suppose if i select Jan-2013 than i need to show the sales for last 3 months. (i,e: dec-2012 ,Nov-2012, Oct-2012).
but the main concern is based on financial year which starts from April-May.
if i select 2012-Apr than last 3 months 2011-Mar ,2011-Feb ,2011-jan.
i have attached the qvw file , which contain financial year and financialMonth number and FQuarter.
hope someone will help me.
Thanks,
mukram.
Hi Mukram,
When I have this kind of filter to do, I use counter in my calendar table.
So, in your case, you can add in the Sales table such a column:
(year(today())*12+num(month(today())))-(year(TransactionDate)*12+num(month(TransactionDate))) as MonthCounter
Then, in your chart, you can use a set analysis like this:
=sum({$<MonthCounter={'<=$(=max(MonthCounter))>=$(=max(MonthCounter)-2)'}>}[Sales VAL])
Regards,
Vincent