Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
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
MVP
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