Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
stjernvd
Partner
Partner

Return text value for Max(Month)

Hey,

I would like to do this:

  Date(Date#([Date],'DD-MMM-YY'),'DD MMM YYYY') as Day,
Month(Date(Date#([Date],'DD-MMM-YY'),'DD MM YYYY') ) as Month,
Year(Date(Date#([Date],'DD-MMM-YY'),'DD MM YYYY')) as Year

My months are May, June, and July.

When I do Max(Month), I get 7, how do I get it to return Jul?

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Or

=Month(Max(TradeDay))

View solution in original post

6 Replies
Peter_Cammaert

Something like this?

=Date(Max(TradeMonth), 'MMM')

alexandros17

SubField(MonthNames,';',Max(TradeMonth))

let me know

swuehl
MVP
MVP

Or

=Month(Max(TradeDay))

View solution in original post

Peter_Cammaert

Or this?

=Capitalize(SubField(MonthNames, ';', Max(TradeMonth)))

swuehl
MVP
MVP

BTW, there is no need to format a date value using Date() function if you want to further transform it to month or year value:

Month(Date#([TradeDate],'DD-MMM-YY') ) as TradeMonth,
Year(Date#([TradeDate],'DD-MMM-YY') ) as TradeYear

should be enough.

Peter_Cammaert

Please note that Stefan's solution returns the Month of the latest date and not the Maximum Month overall (as you seemed to require)

Best,

Peter