Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
Oleg
Contributor
Contributor

How to make a default selection of max date with "always one selected value"?

I need to make a default selection for the date field so that the maximum date is chosen when I open the app. I have managed to do this:

date={"=[date] = max(total [date])"}

The problem is, I want this field to have the "always one selected value" option enabled, but when I do this, a wrong date gets selected. I have tried "{1}" instead of "total" which didn't help.

Please, tell me, how should I deal with this problem? Thank you.

Labels (3)
4 Replies
bhaskar_sm
Partner - Creator III
Partner - Creator III

Hi,

basically I have worked on your problem statement and able to get the working one by creating an additional column which only has a max date and linked with a Date column. this solution work whenever you have a new date in the data.

Script:

T1:
Load Date#( Date,'DD-MM-YYYY') as DATE, num#(Date) as DATE_NUM;
Load * inline [
Date
28-04-2005
02-06-2005
03-06-2005
04-06-2005
05-07-2016
15-01-2005
12-09-2005
05-09-2004
17-11-2004
29-08-2004
20-06-2004
08-10-2004
21-04-2005
11-12-2005
06-06-2004
23-06-2004
15-07-2004
27-02-2004
14-08-2004
12-03-2004
15-08-2004
04-01-2004
13-08-2004
11-03-2004
];

NoConcatenate
Load Max(DATE) as DATE_N,DATE(Max(DATE),'DD-MM-YYYY') as DATE Resident T1 Order by DATE_NUM desc ;

Front End:

one.JPGtwo.JPG

Oleg
Contributor
Contributor
Author

Thank you, but as far as I understand, this solution won't allow me to choose different dates, so that the max date is always chosen, right? I need to be able to let the user choose any date.

parayu
Contributor II
Contributor II

Hello guys,

I have exactly the same issue and couldn't find any solution. Is this a Qlik Sense limitation maybe?

 

Thanks,

Bogdan

Rick_07011
Contributor II
Contributor II

Have a look at this link Solved: Dynamic Default Bookmark with 'Always one selected... - Qlik Community - 1657592

I used the answer of @eero_h and it worked