Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Jazz1
Contributor
Contributor

CYTD vs LYTD comparison

Hello everybody,

For my case i need to  compare current YTD vs Last YTD.

I tried this solution in my Case but it doesn't work for my case.

YTD

Sum({$<[Date] = {'>=$(=YearStart(Today()))'}>} [Sales])

YTD Previous Year

Sum({$<[Date] = {'>=$(=Date(AddYears(YearStart(Today()),-1)))<$(=Date(AddYears(Today(),-1)))'}>} [Sales])

YTD YoY Variance

(Sum({$<[Date] = {'>=$(=YearStart(Today()))'}>} [Sales]) - Sum({$<[Date] = '>=$(=Date(AddYears(YearStart(Today()),-1)))<$(=Date(AddYears(Today(),-1)))'}>} [Sales]))

case qlik ytd.PNGcase qlik ytd1.PNG

What informations do you need to  help me to solve it please ?

Labels (4)
2 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

In this case, your set values should be in double quotes.

Sum({$<[Date] = {">=$(=YearStart(Today()))"}>} [Sales])

-Rob

Jazz1
Contributor
Contributor
Author

HI,

thanks a lot for your quick answer, i tried it with the quotes and it didn't work.

If you need more informations about my case please feel free to ask.

Yass