Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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
that's why I asked for dual()...
Yup! That's the easier way. Glad we were able to get you there.
Hi,
jsut load as dual and forget about sorting expressions, instead sort numerically:
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