Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Prior Month Max Date

Hi All

I have a Date field and would like to get the Max(Date) of the previous month.

Tried this expression but it doesn't work quiet nicely.

Date(Max(AddMonths(Date,-1)),'DD/MM/YYYY').

How can I get this?

15 Replies
Not applicable
Author

Hi Jyothish

Yes I did, for some reason it doesn't show the correct dates

Not applicable
Author

It is not maxing the prior month date but shows me the same date as currently selected

stigchel
Partner - Master
Partner - Master

That is because that expression is taking the max from (one month subtracted for each date) which is the current max e.g. May 26 and then one month subtracted so April26. If you want the max of the previous month use as suggested

Max({<Date={"<$(=MonthStart(Max(Date)))"}>} Date)

Not applicable
Author

Hi Piet

This expression doesn't return any results. can you please post an app where you are using it?

stigchel
Partner - Master
Partner - Master

Sure, see text box

Not applicable
Author

Thanks Piet!