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: 
roxys373s
Contributor II
Contributor II

Create a button that chooses dates by filter

Hello,

I'm trying to create a button that chooses the last five dates of all the dates included in my data. How can I do this? 

Someone else suggested that I do Date(Today()), but that chooses the last 5 days before today, rather than from the dates in the data.

Labels (5)
1 Reply
Digvijay_Singh

I tried with the numeric date, it works okay, couldn't get it worked though with the date field yet.

Load *,Num(Date) as DateNum inline [
Date
01/01/2021
01/31/2021
02/15/2021
02/28/2021
03/10/2021
03/20/2021
04/01/2021
04/15/2021
05/10/2021
05/25/2021
];

Expression used in button action as - 

='($(=max(DateNum))|$(=max(DateNum,2))|$(=max(DateNum,3)))'

Digvijay_Singh_0-1658370173738.png