Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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
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
When you click on the title of the list box, just type:
>=1/1/07 <=31/12/07
But using this method we still have to select dates by dragging..
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
We can use condition...
vFromDate <= vStartDate
For List Box Under Layout Tab....
and For Straight Table or Pivot Table...
Under General tab Calculation Condition...
Also, we can display a message in text box as
=if(vFromDate > vToDate, 'Invalid Selection')
with Layout Condition...
vFromDate > vToDate
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
Thanks it's working
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