Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Peony
Creator III
Creator III

MaxValue if date is string

Hello. Again, I have question about date.

I have field "MonthY" with date values in string view:"MonthName&space&YYYY" . Need to create trigger on document open to select max date in this field. Using  =maxString({1} [MonthY]) not good idea, because result is Sep 2017 instead Oct 2017.

Tried this variant =maxString({1} Num(Month(Date#(mid([MonthY],1,3),'MMM')))&mid([MonthY],4,5)), but again it not works.

  MonthY

Sep 2016
Sep 2017
Sep 2015
Sep 2014
Sep 2013
Oct 2017
Oct 2016
Oct 2015
Oct 2014
Oct 2013
Nov 2016
Nov 2015
Nov 2014
Nov 2013
May 2017
May 2016
May 2015
May 2014
May 2013
Mar 2017
1 Solution

Accepted Solutions
antoniotiman
Master III
Master III

Try this

MaxString(Date#(MonthY,'MMM YYYY'))

View solution in original post

2 Replies
antoniotiman
Master III
Master III

Try this

MaxString(Date#(MonthY,'MMM YYYY'))

Peony
Creator III
Creator III
Author

Oh! Thanks! It's almost what i need. I've just added {1} before Date#. Thank you for simplified idea instead my complex formula.