Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
rcorcoran
Creator
Creator

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

1 Solution

Accepted Solutions
Anonymous
Not applicable

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.

View solution in original post

4 Replies
Anonymous
Not applicable

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.

rcorcoran
Creator
Creator
Author

thanks for your help

rcorcoran
Creator
Creator
Author

Thanks Bruno that works fine

Rhona

Anonymous
Not applicable

You're welcome, Rhona.

I'm glad I could help.

Cheers.