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: 
Anonymous
Not applicable

List box sorting

How can I sort the below by the latest quearter? For this instance the latest quarter is Q1 2017. I tried all the sorting options and none give me the results I want.

13 Replies
Anonymous
Not applicable
Author

I see. So I do have calendar date in my table. I didn't realize I could sort in my expression based on other columns.

This works:

=Calendar_Date

Anonymous
Not applicable
Author

that's why I asked for dual()...

Anonymous
Not applicable
Author

Yup!  That's the easier way.  Glad we were able to get you there.

MarcoWedel

Hi,

jsut load as dual and forget about sorting expressions, instead sort numerically:

QlikCommunity_Thread_249500_Pic1.JPG

QlikCommunity_Thread_249500_Pic2.JPG

QlikCommunity_Thread_249500_Pic3.JPG

an example using the already suggested Dual() function with a small correction of the month part to deliver correct dates:

LOAD Dual(Quarter,MakeDate(Mid(Quarter,4),Mid(Quarter,2,1)*3-2)) as Quarter

INLINE [

    Quarter

    Q1 2013

    Q2 2013

    Q3 2013

    Q4 2013

    Q1 2014

    Q2 2014

    Q3 2014

    Q4 2014

    Q1 2015

    Q2 2015

    Q3 2015

    Q4 2015

    Q1 2016

    Q2 2016

    Q3 2016

    Q4 2016

    Q1 2017

    Q2 2017

    Q3 2017

    Q4 2017

];

hope this helps

regards

Marco