Skip to main content
Announcements
Join us on Sept. 17 to hear how our new GenAI Assistant empowers data professionals: REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
ioannagr
Creator III
Creator III

Any idea why this cytd-lytd is not working?

Hi community,

the expression I created is the following:

sum({1<CurYTDFlag={1}, [year], [month],[filter]*={'something'} >} [total number])-
sum({1<LastYTDFlag={1}, [year], [month],[filter]*={'something'} >} [total number])

 

It calculates more than the true numbers. What could be going wrong?

1 Reply
ioannagr
Creator III
Creator III
Author

Actually the mistake is in the second sum about LYTD. 

Also I tried  this logic for LYTD I found in forum (https://community.qlik.com/t5/QlikView-App-Dev/LYTD/td-p/94024) by @sunny_talwar  , like:

 Sum({<[date] = {">=$(=Date(YearStart(Today(), -1)))<=$(=Date(AddYears(Today(), -1)))"},[filter]*=['something']>} [total number])

 

but, returned 0, which is also not right. Feels like date is not recognized 😱

 

 

Please help!