Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to select a range of dates from list box


Hi,

I have list box DATE. The dates are from 2006 to 2013. My user wnats to select the dates from 01/01/2007 to 31/12/2007 all at once by clicking CTRL+selections in list box with out dragging.

Is there any possibility in qlikview to get dates using BETWEEN and AND

for eg: date BETWEEN 01/01/2007 and 20/05/2007

please could anyone help me in this.

Thanks.

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

Dont have idea using BETWEEN and AND but I have below solution which I frequently using for our clients.


Create two new variables…

vStartDate and vEndDate

Now go to Settings – Document Properties – Triggers

Variable Event Triggers

Select vStartDate

OnChange Add Action

Add

Select in Field

Field = Your Date Field

Search String = ='>='&vStartDate & '<=' & vEndDate

Do the same for vEndDate

Now insert Input Box and add these two variables

Go to number tab and make sure that the formatting of vStartDate and vEndDate is same as your Date Field….

Hope this help

View solution in original post

15 Replies
MK_QSL
MVP
MVP

Dont have idea using BETWEEN and AND but I have below solution which I frequently using for our clients.


Create two new variables…

vStartDate and vEndDate

Now go to Settings – Document Properties – Triggers

Variable Event Triggers

Select vStartDate

OnChange Add Action

Add

Select in Field

Field = Your Date Field

Search String = ='>='&vStartDate & '<=' & vEndDate

Do the same for vEndDate

Now insert Input Box and add these two variables

Go to number tab and make sure that the formatting of vStartDate and vEndDate is same as your Date Field….

Hope this help

sebastiandperei
Specialist
Specialist

When you click on the title of the list box, just type:

>=1/1/07 <=31/12/07

MK_QSL
MVP
MVP

But using this method we still have to select dates by dragging..

Not applicable
Author

Hi,

I am happy with your suggestion in this scenario.But i have another doubt that is

that

if user selects the data like invalid range suppose start date is greater than end date.

i  need show error msg like select valid range this thing.

how can we solve this issue.

regards

Mahesh Thalluri

MK_QSL
MVP
MVP

We can use condition...

vFromDate <= vStartDate

For List Box Under Layout Tab....

and For Straight Table or Pivot Table...

Under General tab Calculation Condition...

MK_QSL
MVP
MVP

Also, we can display a message in text box as

=if(vFromDate > vToDate, 'Invalid Selection')

with Layout Condition...

vFromDate > vToDate

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Here's a variation on the FromDate/ToDate variables that validates the input dates.

http://qlikviewcookbook.com/recipes/download-info/enter-date-from-to/

-Rob

http://masterssummit.com

http://robwunderlich.com

Not applicable
Author

Thanks it's working

ngulliver
Partner - Specialist III
Partner - Specialist III

Hi, Amelia.

Have you considered using a slider ? If you set it to Multimode you can enable the users to select a range of dates and everything in between.

Regards,

Neil