4 Replies Latest reply: May 29, 2014 8:00 AM by Bruno Souza

# YTD compared to Last YTD

Hi

I have an expression to show Same Period Last Year that works but it only shows the data for the same month as the max month this yr:

=(Sum({\$<ReferredYYYY={\$(#=only(ReferredYYYY)-1)},ReferredMM={\$(#=Max(ReferredMM))}>}ActualValue))

But I now want it to show a sum of the months from the previous year up to the current month of this year - so at the moment we have data from Jan to April 2014 and a year to date column showing the total of the months so I also want a column that will show a total of the months from Jan to April 2013.

When we have data in for May it should then show the total from Jan to May 2013???

Thanks in anticipation

Rhona

• ###### Re: YTD compared to Last YTD

Hi, Rhona.

Pleas, try something like this (notice the red parts added to the expression):

=(Sum({\$<ReferredYYYY={\$(#=only(ReferredYYYY)-1)},ReferredMM={"<=\$(#=Max(ReferredMM))"}>}ActualValue))

Hope it helps.

Bruno.

• ###### Re: YTD compared to Last YTD

Thanks Bruno that works fine

Rhona

• ###### Re: YTD compared to Last YTD

You're welcome, Rhona.