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 month (jan,feb,mar...)

Hello, I need a variable with the max month:

=max(Monthdate)

But my Monthdate is: jan,feb,mar.... and with max(Monthdate) my result is 12.


Help please. Thank you!

1 Solution

Accepted Solutions
sunny_talwar

Try this:

Pick(Max(Monthdate), 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec')

View solution in original post

4 Replies
sunny_talwar

Try this:

Pick(Max(Monthdate), 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec')

swuehl
MVP
MVP

That's expected, Max() will most probably return a number.

But you can try like

=FirstSortedValue(DISTINCT  Monthdate, -Monthdate)

Not applicable
Author

That works! Thank you!

Not applicable
Author

Great solution. Thak you!