Skip to main content
Announcements
Save $600 on Qlik Connect registration! Sign up by Dec. 6 to get an extra $100 off with code CYBERSAVE: REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
jfredericks
Contributor II
Contributor II

Date Range Selection Not Working

Hello,

 

I have buttons set up to filter based on date ranges (All Time, Last Month, and Last Week). The All Time and Last Month filters work correctly, but the Last Week filter is having issues. 

 

Here are both my expressions [where vEndDate = Now()]  

Last Month: =Date(Addmonths(vEndDate,-1),'M/DD/YYYY hh:mm:ss tt')

Last Week: =Date(vEndDate -7,'M/DD/YYYY hh:mm:ss tt')

 

I have a trigger set on vStartDate and vEndDate to Select in Field for my date field, where the search string is:  ='>='&vStartDate&'<='&vEndDate

 

If I select Last Month, it sets the search string correctly, but if I select Last Week, it sets as the date range. 

 

I am also confused because if I change the value I subtract from vEndDate from 7 to an integer greater than 7, the filter seems to work fine.

 

 

1 Solution

Accepted Solutions
jfredericks
Contributor II
Contributor II
Author

Update: no data was available to select in the field. Set expressions to conditional in related charts and changed the expressions disabled error message to "No data available in selected date range"

View solution in original post

1 Reply
jfredericks
Contributor II
Contributor II
Author

Update: no data was available to select in the field. Set expressions to conditional in related charts and changed the expressions disabled error message to "No data available in selected date range"