Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Beginner_Qlik1
Partner - Contributor III
Partner - Contributor III

To select some values of List Box by default

Hi,

 

I have a list box displaying dates . I wanted to select dates of last week by default.

Can someone help me how I can do this?

 

Thanks in advance

Labels (1)
  • Chart

8 Replies
therealdees
Creator III
Creator III

I'm on SaaS so I assume by Listbox you mean the filter object. If so, you can create a bookmark with the values selected and set it to be the default bookmark. Whenever the app is opened the values will be already selected then.

 

Simply select the default values you want (if it's dynamic then you should use a expression in the filter search bar to select) and then create a bookmark by the top right corner, then right click it to set as default.

 

For further information, please check this link:

https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Bookmarks/create-bookmar...

anat
Master
Master

you can use sheet level triggers to select default last week dates

>=week(addweeks(today(),-1))

or

>=today()-7 

Beginner_Qlik1
Partner - Contributor III
Partner - Contributor III
Author

I have tried to set a sheet trigger.

Beginner_Qlik1_0-1704961866834.png

But it is not working.

Could you please let me know what is wrong with this implementation?

Beginner_Qlik1
Partner - Contributor III
Partner - Contributor III
Author

Can bookmarks be apllied dynamically. I want to select dates of last week. And it keeps on changing each week.

 

What I understood from the article (for which you have provided the link) that I have to make a selection in the sheet and then create a bookmark.

 

But this default selection is not constant. It keeps on changing each week.

Rohan
Specialist
Specialist

Try :

>=date(Today()-7)

 instead in the search string.

 

Regards,

Rohan.

Rohan
Specialist
Specialist

Hi,

Check out the following video, for Dynamic Bookmark creation :

https://www.youtube.com/watch?v=tFyqOigqnUw

 

Regards,

Rohan.

therealdees
Creator III
Creator III

Suppose the field you're filtering is name myField. Type the following in the search bar of the filter:

 

=myField<=Today() and myField>=(Today()-7)

 

This should select every date lower than Today's date and greater than 7 days in the past, which theorically would represent a week. If you want to filter a specific week and not 7 days of the week, you can refer to the date using week(), which will give you the week number of the year, but you'll need a master calendar for that, or an equivalent field already present in your model.

 

After typing the expression in the filter, simply confirm it to select and then save your bookmark. Now whenever the sheet is opened the same expression will be applied to the filter.

anat
Master
Master

try like below

='>=date(today()-7,'YYYY-MM-DD')'