Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
droonu194
Contributor
Contributor

Always select the latest date (max) for multiple date fields

Hi Qlik Guru's,

I am facing a very interesting problem that I am trying to make work.

The app I'm building out is a proof of concept based on a table.

[Philosophy_Text]:
phi_id,
phi_category,
phi_comment,
phi_date

from [lib://....]
where match(text_category, 'Philosophy');

The output should always return the [phi_comment] based on the latest [phi_date]. I have that working by using the firstsortedvalue function. 


The problem: I'd like to always have the latest date selected when a user enters the app. That way, the user will always see the last comment, where the category is Philosphy, based on the latest date (sorted descending).

Tried to follow along this forum (https://community.qlik.com/t5/App-Development/Default-Selection-of-Max-Date/td-p/1662555) but was having trouble entering that formula.

Thank all!

Labels (1)
1 Reply
Sabrina_V
Partner - Creator II
Partner - Creator II

Hello,

You need to use a bookmark applied by default. On the filter "phi_date" tape this formula  : =max(phi_date) and save it in the bookmarks. Before saving the bookmark check the summary of the selections saved. You should see the formula you taped before.