
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
AddYears in set analysis
Hi All
I have below expression where I want to subtract a year from todays date. However, it seems like the expression doesn't evaluate.
Can anyone help, I guess as usual it's something smaller detail I'm missing
Sum({$<CAL_YEAR = {$(=only(CAL_YEAR)-1)}, CAL_MONTH = {$(=Num(Max(CAL_MONTH), '00'))}, BOOKING_DATE = {"<=$(=AddYears(=date(Today(),'dd-MM-yyyy'))-1)"} >} New_NET)
Regards
Stefan
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May be this
Sum({$<CAL_YEAR = {$(=only(CAL_YEAR)-1)}, CAL_MONTH = {$(=Num(Max(CAL_MONTH), '00'))}, BOOKING_DATE = {"<=$(=Date(AddYears(Today(), -1), 'DD-MM-YYYY'))"}>} New_NET)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May be remove = sign and Try this?
BOOKING_DATE = {"<=$(=AddYears(date(Today(),'dd-MM-yyyy'), -1))"}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
BOOKING_DATE={"<=$(=Date(addYears(Today(),-1),'DD-MM-YYYY')"},
Regards,
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May be this
Sum({$<CAL_YEAR = {$(=only(CAL_YEAR)-1)}, CAL_MONTH = {$(=Num(Max(CAL_MONTH), '00'))}, BOOKING_DATE = {"<=$(=Date(AddYears(Today(), -1), 'DD-MM-YYYY'))"}>} New_NET)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I believe you missed a closing parenthesis
BOOKING_DATE={"<=$(=Date(addYears(Today(),-1),'DD-MM-YYYY'))"},

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thanks..
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That was easy!!!
Thanks so much. I keep learning
