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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
felix18807
Contributor III
Contributor III

Select two dynamic date ranges with a button

Is there any way of getting a date range selected using a button for the filter below?

 

Basically I want to be able to dynamically select from April this year to today AND from April last year to 1 year ago today.

='(>=$(=yearstart(addyears(today(),-1),0,4)) ' &
'<$(=addyears(today(),-1))) AND ' &
'(>=$(=yearstart(today(),0,4)) ' &
'<$(=today()))'

Many Thanks

1 Solution

Accepted Solutions
MayilVahanan

HI

Try like this

='((>=$(=yearstart(today(),0,4)) ' & '<$(=today()))' & '*|*' &'(>=$(=yearstart(addyears(today(),-1),0,4)) ' &'<$(=addyears(today(),-1))))'

Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

2 Replies
MayilVahanan

HI

Try like this

='((>=$(=yearstart(today(),0,4)) ' & '<$(=today()))' & '*|*' &'(>=$(=yearstart(addyears(today(),-1),0,4)) ' &'<$(=addyears(today(),-1))))'

Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
felix18807
Contributor III
Contributor III
Author

Ahh it was the | character that I was missing! TYVM