5 Replies Latest reply: Nov 13, 2013 1:11 PM by selcuk cadir

# rolling last year total

Hi,

Gysbert Wassenaar published  (thanks you Gysbert Wassenaar )

last year total sales

This can be done added ?

• ###### Re: rolling last year total

Hi all,

Could you give support to this issue?

thanks.

• ###### Re: rolling last year total

Hi all ,

set analysis ,How to solve this problem?

• ###### Re: rolling last year total

hi all,

correct  ;

if(Year(AsOfPeriod)-1 = '2009',sum(total {\$<Year={\$(=2009)},PeriodType={'Current'}>} Sales))

But not correct ; dynamic solution

1 trial ;    sum(total {\$<Year={"=\$(#=Year(=Only(AsOfPeriod)-1))"},PeriodType={'Current'}>} Sales)

2 trial ;    sum(total {\$<Year = {"\$(Year(AsOfPeriod)-1)"},PeriodType={'Current'}>} Sales)

vLast  = Year(AsOfPeriod)-1

3 Trial ; sum(total {\$<Year={\$(vLast)},PeriodType={'Current'}>} Sales)

Why not correct  ? Help....

• ###### Re: rolling last year total

Add records to the AsOf table to link each period with every month of the previous year:

CONCATENATE (AsOfPeriodTable)

,'LastYearTotal' as PeriodType

,Year(Period) as Year

Resident PeriodTbl

while IterNo()<=12;

Then use this expression: sum({<PeriodType={'LastYearTotal'}>}Sales)

• ###### Re: rolling last year total

Thank you Gysbert,

I have another question. Can you help me.

Period Year Ago  and  YTD Year Ago    how to add ?

thank you for great post