Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Max(Date) - 1 ???

Hello,

I'm trying to get the 2nd last invoice date. Obviously Max(Date) -1 does not work, it'll give the date before Max(Date) and not the last invoice date. Is there a simple way of getting the last two invoices dates?

I was thinking of count (Date), display max (count(date)), and display max(count(date))-1... it makes sense in my head, but doesn't translate well in practice.

Thanks,

Chhai...

1 Solution

Accepted Solutions
disqr_rm
Partner - Specialist III
Partner - Specialist III

3 Replies
disqr_rm
Partner - Specialist III
Partner - Specialist III

Try Max(Date, 2)

Not applicable
Author

You can use the Rank Function for dates .

Not applicable
Author

Rakesh,

nice! I felt like a noob after that! Thank you very much sir.

Chhai