Skip to main content

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
QlikWorld 2023, a live, in-person thrill ride. Save $400 before Dec 31st: REGISTER NOW!
cancel
Showing results for 
Search instead for 
Did you mean: 
dunnalahk123
Creator III
Creator III

Quarter Function

Hi,

 

Can some one help me here

 

i have Quarter field and values like below

 

Q118, Q218, Q318, Q418,Q119

 

but i want to get max Quarter as Q119  how can i write

and next should be Q418

and Next should be Q318

and Next should be Q218

and Next should be Q118

i need 5 variables for above.

 

Best Regards,

HK

Labels (1)
2 Replies
pradosh_thakur
Master II
Master II

maxstring(right(fieldname,2)& left(fieldname,2))
Learning never stops.
pradosh_thakur
Master II
Master II

I am sorry , i thought you want it to be sorted try below for indivisual value

firstsortedvalue(dim, -num(right(dim,2) & mid(dim,2,1)),1)
firstsortedvalue(dim, -num(right(dim,2) & mid(dim,2,1)),2)
firstsortedvalue(dim, -num(right(dim,2) & mid(dim,2,1)),3)
firstsortedvalue(dim, -num(right(dim,2) & mid(dim,2,1)),4)
firstsortedvalue(dim, -num(right(dim,2) & mid(dim,2,1)),5)
Learning never stops.