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

Listbox Date search string problem

I have created these variables ...

LET vTodaysDate = today();
LET vTodaysDate = Date(vTodaysDate);
LET vPast7Days = Date(vTodaysDate-7);

Have a listbox for a date field.  When I input this >=01-07-14 <07-07-14 in the list box search I get the dates in between.  I want to do the same but using the variables above >=vPast7Days <vTodaysDate so that then I can create a bookmark, but it will not work with the variables.

Have tried many different formats how to input the variables but still not working.  How should it be done?

1 Solution

Accepted Solutions
aveeeeeee7en
Specialist III
Specialist III

Hi Alex

I advice you to create a Button

Add Action Select in Field

Field Name:

Your Date Field

Search String:

='>=$(=date(today()-7))' & '<$(=date(today()))'

Kindly see the Attachment.

Regards

Aviral Nag

View solution in original post

7 Replies
m_woolf
Master II
Master II

Have you tried using dollar sign expansion with the variables?

Not applicable
Author

try referencing the variables like this:

$(vPast7Days) < $(vTodaysDate)

Not applicable
Author

Tried this  .... $(vPast7Days) < $(vTodaysDate) ... but it selects all the dates in the calendar instead of only the range I need.  So puzzled

tresesco
MVP
MVP

This works:

=Date>'$(vFrom)' and Date<'$(vTo)'

aveeeeeee7en
Specialist III
Specialist III

Hi Alex

I advice you to create a Button

Add Action Select in Field

Field Name:

Your Date Field

Search String:

='>=$(=date(today()-7))' & '<$(=date(today()))'

Kindly see the Attachment.

Regards

Aviral Nag

Not applicable
Author

Although not exactly what I wanted but this works well enough for me.  This forum is an excellent resource thanks to you guys.  Keep it up.

Not applicable
Author

This works also 🙂