Skip to main content
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);

1 Solution

Accepted Solutions
sunny_talwar

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

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

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.