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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Date Range Selection

Hi All,

Could you help to check my QVW file?  I encounter a select issue below:

When I select the date, the data does not change. Many thanks.

Below is my script:

Sales:
Load * Inline
[
Date, Sales
2014/01/01, 100
2014/02/01, 200
2014/02/11, 1200
2014/03/11, 200
2014/04/11, 1000
2014/05/11, 800
2014/06/11, 225
2014/07/11, 120
2014/08/01, 280
];

MinMaxDate:
Load
    Min(Date) as MinDate,
    Max(Date) as MaxDate
Resident Sales;

Let vMinDate = PEEK('MinDate',0,'MinMaxDate');
Let vMaxDate = PEEK('MaxDate',0,'MinMaxDate');

Drop Table MinMaxDate;

Calendar:
Load
Date($(vMinDate) + IterNo() - 1) as Date
AutoGenerate 1
While $(vMinDate) + IterNo() - 1 <= $(vMaxDate);

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

I added triggers to your two variables

1) vFromDate -> Action: Select in Field -> Field: Date -> Search String: ='>=' & Date(vFromDate) & '<=' & Date(vToDate)

2) vToDate- > Action: Select in Field -> Field: Date -> Search String: ='>=' & Date(vFromDate) & '<=' & Date(vToDate)

Capture.PNG

View solution in original post

4 Replies
sunny_talwar
MVP
MVP

Try now

Not applicable
Author

Hi Sunny,

For my Qlikview is personal version, so I could not open your QVW file. Could you help to copy the script to me directly? Thanks a lot.

sunny_talwar
MVP
MVP

I added triggers to your two variables

1) vFromDate -> Action: Select in Field -> Field: Date -> Search String: ='>=' & Date(vFromDate) & '<=' & Date(vToDate)

2) vToDate- > Action: Select in Field -> Field: Date -> Search String: ='>=' & Date(vFromDate) & '<=' & Date(vToDate)

Capture.PNG

Not applicable
Author

Hi Sunny,

I added the triggers following your instruction and it works fine. Thanks again.