Discussion board where members can learn more about Qlik Sense App Development and Usage.
So I have this field which contains a code and within that code there is a year (e.g. XXYYYYZZZZZ, where YYYY represents the year).
So what I would like to do is to get the minimum year after extracting it from that field. I have tried the following:
Min(Mid(Code, 3, 4))
Min(aggr(Mid(Code, 3, 4), ID))
But it doesn't work.
Your help is appreciated.
With these informations it's quite difficult to say what didn't worked like expected. Maybe it's easier to extract this within the script:
Num(Mid(Code, 3, 4)) as CodeYear
Are the other code-parts not numeric you could also use: keepchar(Code, '0123456789'). And then should be a min() or a firstsortedvalue() expression within the charts simpler.
View solution in original post
Where exactly are you trying to do this? In the script? In an expression may be like this
Min(Year(Date#(Mid(Code, 3, 4), 'YYYY')))
Sorry didn't work.