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: 
soha1902
Creator
Creator

Last Year Max date

Hi All,

I have One Date field that contains Data like

Date

2020-03-31

2019-12-28

2019-12-25

Now my requirement is when User select any Date then in text box I want to show Last Year Max Date.

For example If user select 2020-03-12 then 2019-12-28 will be displayed in text box. Please help me get this.

1 Solution

Accepted Solutions
tresesco
MVP
MVP

If your date field doesn't have a date, the expression can't show that.

tresesco_0-1619167043347.png

 

View solution in original post

3 Replies
tresesco
MVP
MVP

Assuming you have a Year field as well, try:

=Date(Max({<Date,Year={'$(=Year(Max(Date))-1)'}>}Date))

soha1902
Creator
Creator
Author

Thanks for your reply..but its showing  the 2019-12-31 .

I want available max date(in my case its 2019-12-28) for last year not last year end date. I given example also in my question.

tresesco
MVP
MVP

If your date field doesn't have a date, the expression can't show that.

tresesco_0-1619167043347.png