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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Selecting Date Range with a button

I have a question about selecting a date range using a button and the SELECT IN FIELD function.


I have a field called Date Wanted that I load as follows:   Date([Date Wanted]) as [Date Wanted]

This Date Wanted field is the appointment date for a field visit.

I am trying to find any appointments due in the next two weeks via a single button instead of individuall selecting each date.

To begin I have tried to simply select today and have had no success:

Actions - Select in Field

Field - [Date Wanted]

Search String -  =today()

How can I select Today?   And how can i select a date range from today to 14 days in the future?  (for example 6/1/2013 to 6/14/2013)

3 Replies
Not applicable
Author

Create a variable to capture today() result and use that variable in the search string.

Hope this helps.

er_mohit
Master II
Master II

wirte in search string

=date(today())+14

hope it helps

Sokkorn
Master
Master

Hi jasonzola,

Do this way:

1. Make sure your field [Date Wanted] have this format DD-MMM-YYYY (you can change format what you want)

2. Create button with select in field action (for filter Today())

     . Field: [Date Wanted]

     . Search String: =Date(Today(),'dd-MMM-yyyy')

3. Create a new button with select in field action (for filter Today()+14)

     . Field: [Date Wanted]

     . Search String: ='>=' & Date(Today(),'dd-MMM-yyyy') & '<=' & Date(Today()+14,'dd-MMM-yyyy')

See sample attache file

Regards,

Sokkorn