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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Date filter on the basis of button click for calendar buttons

Hi All,

       We have requirement like below:

          1. From date calendar

          2. To date clendar

          3. Business date list box.

          4. Date filter button

        If some one selects from date and to date values and clicks on date filter it should be filtering business date list box on the basis of selection.

        I tried to implement this using an actionon on date filter text box some how it is not filtering. Attached the qvw file.

Thanks

Dasu.G

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

You were missing the triggers on the variables vStartDate and vEndDate. Add a Select in Field action to the OnInput triggers of both variables. Choose business_date as Field and as Search string ='>=' & vStartDate & '<=' & vEndDate. Also your min and max dates for the calendar don't disregard the selections you make, so change Min Value from =min(business_date) in =min({1}business_date). And the same for the Max Value setting. See attached qvw.


talk is cheap, supply exceeds demand

View solution in original post

7 Replies
Not applicable
Author

I can't open Your file but I prepared my example

check this

sushil353
Master II
Master II

use the date# function instead of date function.

in the button add your action as

='>='&Date#(vStartDate)&'<='&Date#(vEndDate)

Hope this will resolve your issue

Attached is your sample file

Thanks

Sushil

Not applicable
Author

date#() without any parameter is the same as date() isn't it?

sushil353
Master II
Master II

Problem is with data loading. dasugairaboni loaded data as Num(BusinessDate) as BusinessDate.

We are getting numbers in the BusinessDate instead of Date format.

thats why i have used date#() instead of date.

Date(35648) will return 8/6/1997

Date(35648) will return 35648

Regards,

Sushil

Not applicable
Author

I can't open His file... but Your explanation seems to be true;)

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

You were missing the triggers on the variables vStartDate and vEndDate. Add a Select in Field action to the OnInput triggers of both variables. Choose business_date as Field and as Search string ='>=' & vStartDate & '<=' & vEndDate. Also your min and max dates for the calendar don't disregard the selections you make, so change Min Value from =min(business_date) in =min({1}business_date). And the same for the Max Value setting. See attached qvw.


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

Looks like it is not working as expected. I changed start date  to  8/1/2012 and end date to 8/5/2012 it is filtering the data in the list box when I am selecting these values.

But when I click on the filter button it is clearing all the selections..