Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! 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.