Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have Quarter-Year information column in one of my Table.
I have been using that as Filter Dimension in my report. I want it to be arranged in descending order.
Eg: the way "Quarter-Year" column is in the table is:
Q4-2017
Q2-2013
Q1-2015 etc
Thanks
Hi Monu,
You could use a dual() statement to order in the way you want
Something like:
dummyData:
Load * Inline
[
Quarter
Q4-2017
Q2-2013
Q1-2015
];
NoConcatenate
Data:
Load
Dual(Quarter,Num#(mid(Quarter,2,1))+Num#(right(Quarter,4))) as Quarter
Resident dummyData;
drop table dummyData;
And you'll get the numeric representation of the Quarter (1,2,3,4) and Year as sorting parameter (giving as result the following):
whatever your requirement is
Load* Inline [
Quarter-Year Sequence
Q4-2017 1
Q2-2013 2
Q1-2015 3
];
and so on....
Then use Sequence in your sorting...
Guess that should help
Thing is Aehman his using a date field to do it, in your way, you'd have to manually input all the possible variants Q1,Q2,Q3,Q4 for how many years he wants to do it.
Should work but would be quite time consuming.
Yea, if there are more values then it would be hard.