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

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
User93
Creator
Creator

Removeable dynamic slicer on default bookmark

Hi all,

Here is my problem : I would like to create a default bookmark for an app, with a dynamic slicer.
The slicer should always be the first day of the first month of the last year of the data, with the possibility for the user to remove it once the app is open.

I then encountered the following problems :

To create the slicer I tried using STARTYEAR(DateField), but it doesn't give what I need, because even if I get the right value (01/01/2026 if I have 2024, 2025 and 2026 in the data), it filters the whole year, and I would like to only filter on the first day.

Then I realised than even if I succeed in getting what I want, I will have the manually update the slicer every year, because once created the bookmark keeps the same selected value for the slicer.

So I followed the footsteps from here :
Always one selected value and default bookmark example in :
https://help.qlik.com/en-US/sense/November2025/Subsystems/Hub/Content/Sense_Hub/DataSource/select-si...
But there is also a problem, since the "always one selected value" means that the data will always be restricted to one day, and that is something I want to avoid.

Is there a way to solve both issues ?

Best regards.

Labels (1)
1 Solution

Accepted Solutions
Daniel_Castella
Support
Support

Hi @User93 

 

Ok, I think I did not understand well the request. I thought you always wanted to select the first day of the year (1st January). But I understand now that you want to select the first date of the year available in your data set.

 

If you have a Year field in the datamodel, you just need to replace the formula in the action for: 

Min({<Year = {"$(=Max(Year))"}>} DateField)

 

If you don't have a Year field, the formula is a bit longer:

Min({<DateField = {">=$(=YearStart(Max(DateField))) <=$(=YearEnd(Max(DateField)))"}>} DateField)

 

Basically, in this way we select the minimum date for the maximum year. Let me know if it works for you.

 

Kind Regards

Daniel 

View solution in original post

4 Replies
Daniel_Castella
Support
Support

Hi @User93 

 

You can create a dynamic bookmark as described in this other post. Solved: using a variable in a bookmark - Qlik Community - 1884731

 

However, I'm not sure if I'm understanding your need. If you need to select the date by default only once the app is opened, should not be better to use an action? Like this:

 

Captura de pantalla 2026-04-01 164710.png

In this way, every time that the app or the sheet is opened, the filter will be applied automatically, and it is easier to apply dynamic changes there. The formula I used is the following one and it seems to properly filter the beginning day of last year when applying the action:

YearStart(max(DateField))

 

Let me know if it works for you.

 

Kind Regards

Daniel

User93
Creator
Creator
Author

Hi,

Thank you for the reply !

The need is the following : when a user opens the app, he must land on the bookmark with the selected slicer : the first day of the first month of the last year. And then the user must have the possibility to remove it, so he can see more than one day.

I tried the solution with the variable =Year=$(vCurrentYear), and this part works.

For the second part, I can't use YearStart with Max, as Max turns the result into a measure, and can't be used as slicer.

Is there a solution for that point ?

Daniel_Castella
Support
Support

Hi @User93 

 

Ok, I think I did not understand well the request. I thought you always wanted to select the first day of the year (1st January). But I understand now that you want to select the first date of the year available in your data set.

 

If you have a Year field in the datamodel, you just need to replace the formula in the action for: 

Min({<Year = {"$(=Max(Year))"}>} DateField)

 

If you don't have a Year field, the formula is a bit longer:

Min({<DateField = {">=$(=YearStart(Max(DateField))) <=$(=YearEnd(Max(DateField)))"}>} DateField)

 

Basically, in this way we select the minimum date for the maximum year. Let me know if it works for you.

 

Kind Regards

Daniel 

User93
Creator
Creator
Author

Thanks a lot !

An action with the formula Min({<DateField = {">=$(=YearStart(Max(DateField))) <=$(=YearEnd(Max(DateField)))"}>} DateField) works as intended, it's exactly what was needed.

Best regards.