If you need to use months as numerical values (Max for example) I suggest you to use month as year + month so, if you have a date (myDate):
weekyear(myDate)*100 + month(myDate) as month,
In this way you will have a numerical value for months that will help to find max
Hope it helps
maxstring is sorting by alphabets...so S is the last alphabet in the month's list. so SEP is being returned.
you need to use dual function here...straight from the help section. look up dual in help and copy that example into your script. just change the field name to match yours and use months like JAN, 1; FEB, 2; etc. then you can call max(Month) and it will return DEC.
straight from help section:
load dual ( string,numrep ) as DayOfWeek inline
load Date, weekday(Date) as DayOfWeek from afile.csv;
The script example will generate a field DayOfWeek
with the weekdays written in clear text. QlikView will for all purposes regard
the field as a numeric field.
then use Marco's expression to get the string representation of the max month instead of the number.
If this month and year are coming from some date field then instead of taking max(Month) use Month(max(date)).
This will give you latest date. But if you want max month then load one inline table with two fields i.e. Month and Month_Number and associate with this table and then take max(Month_Number) you will get dec.