Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi there,
I would like to add an action to one of the sheets of the app I created: I want to preselect a range of dates which goes between Today -10 and Today + 10 (so the next and the last 10 days).
At the moment I managed only adding one (I do not know how I can add the rest of them).
I wanted to achieve this either by an action (possibly) or otherwise by using the left "date picker".
At the moment that is set so the user can only see the next and last 10 days otherwise that would go back a couple of years and would be annoying for the user
Thank you in advance
Try this
under Action: Choose Toggle Field Selection
Fx :
'('&concat({<Datefield={">=$(=Date(Today()-10))<=$(=Date(Today()+10))"}>}distinct chr(34)&Datefield&chr(34),'|')&')'
Add sheet action as below
Action : Select values in field
Field : Yourdatefield
Fx =Yourdatefield>= Max(total Yourdatefield) - 10 (with equal sign)
Hi There. I also have future days in my date field so won't the formula you suggested show only the last 10 but not the next?
modify as below
=Yourdatefield>= Date(Today()-10) AND Yourdatefield<= Date(Today()+10)
That doesn't work, unfortunately.
It just shows all dates.
Try this
under Action: Choose Toggle Field Selection
Fx :
'('&concat({<Datefield={">=$(=Date(Today()-10))<=$(=Date(Today()+10))"}>}distinct chr(34)&Datefield&chr(34),'|')&')'
Super!!! This worked!!!
Can I ask how did you achieve that? Apologies but I am not familiar with this concat and chr 34 format you used?
It would be great to know how I can get more information/knowledge about this.
Thank you
we are doing a compound search basically creating a list of dates that need to be selected
instead of comparing > < dates
refer below
https://community.qlik.com/t5/Design/The-Search-String/ba-p/1470548