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: 
aclarke
Contributor
Contributor

Setting up Dynamic Default Bookmark for Max Date in a table

Hello, trying to configure my app so that whenever a sheet is opened up, the max date in the table START_TIME is the default filter applied.

Based on the training videos for Qlik Sense, this is done via filtering data in a listbox search on a Table then creating a bookmark off of that.  I'm having trouble creating a search in the listbox for my table START_TIME.autoCalendar.Date to return the max date available. (Date type - formatted MM/DD/YYYY)

Have tried...

=START_TIME.autoCalendar.Date=MAX({1}START_TIME.autoCalendar.Date)

=MAX({1} START_TIME.autoCalendar.Date)

Neither return the max date available in the table.

The idea here is that data will be loaded in daily and I want the filter to update automatically every time I open up my sheet.

Thanks for the help!

Labels (1)
10 Replies
g_fernandez_l
Partner - Contributor II
Partner - Contributor II

Hi @aclarke .

To resolve this issue you need to generate a new field in the script that only have the max value . Then filter in the field where you want to select the max value as follow then
=<New Field>

clipboard_image_0.png

In My example you can see that the Field Periodo2 has only one value.

After do that, press enter to confirm the selecction and create a new bookmark, and set that like default selecttion. The bookmark detail is set like
{<Field={"=NewField"}>}.

In my example is
{<AñoMes={"=Periodo2"}>}

 

harithad95156
Contributor III
Contributor III

Hi Fernandez,

I have tried this by creating a field in script level and when using the same field in frontend searchbar it is not displaying the max monthyear.

Can you please suggest me the reason?

stevejoyce
Specialist II
Specialist II

what if you add total to your max date calculation

=START_TIME.autoCalendar.Date=MAX({1}TOTAL START_TIME.autoCalendar.Date)

harithad95156
Contributor III
Contributor III

I have added a field in script like maxstring(MonthYear) as Period .

In front end for the respective field which is MonthYear, I have searched like =Period but it is not showing max value instead selecting all field values.

How to get max value in MonthYear field when having =period expression in searchbar ?

harithad95156
Contributor III
Contributor III

I have added a field in script like maxstring(MonthYear) as Period .

In front end for the respective field which is MonthYear, I have searched like =Period but it is not showing max value instead selecting all field values.

How to get max value in MonthYear field when having =period expression in searchbar ?

stevejoyce
Specialist II
Specialist II

Did you try the formula with the Total?  I don't see why you need to bring in period and make it more complicated.

harithad95156
Contributor III
Contributor III

Can you please brief where do I need to place this formula?

I have a field MonthYear.

In searchbar for MonthYear field what needs to be written to execute dynamic bookmark wherein I require max of monthyear dynamically.

stevejoyce
Specialist II
Specialist II

I highlighted the update below:

=START_TIME.autoCalendar.Date=MAX({1}TOTAL START_TIME.autoCalendar.Date)

harithad95156
Contributor III
Contributor III

Greatly appreciated!!

Many thanks Stevejoyce.

Received the desired outcome😀