Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Age bucket sorting is not happening

Dimension =PurgeChar((class(Ageing,5,'-')),'<=')

Sort - =num(trim(subfield((PurgeChar((class(Ageing,3,'-')),'<=')))))

Final result should be 0-5, 6-10, 11-15,......

2 Replies
sunny_talwar

Try this as your dimension:

Dual(PurgeChar(Class(Ageing, 5, '-'), '<='), Class(Ageing,5,'-'))

swuehl
MVP
MVP

If you want to nearly match your expected ranges, you can try something like

=Dual(Floor(Ageing,5,1)&'-'&(Floor(Ageing,5,1)+4), Floor(Ageing,5,1))

2016-07-21 20_14_18-QlikView x64 - [C__Users_Stefan_Downloads_comm225541.qvw_].png