Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

sarasmonu
New Contributor III

Arrange Quarter-Year in Descending order

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

4 Replies
felipedl
Valued Contributor III

Re: Arrange Quarter-Year in Descending order

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):

Sample.png

Khan_Mohammed
Honored Contributor II

Re: Arrange Quarter-Year in Descending order

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

felipedl
Valued Contributor III

Re: Arrange Quarter-Year in Descending order

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.

Khan_Mohammed
Honored Contributor II

Re: Arrange Quarter-Year in Descending order

Yea, if there are more values then it would be hard.

Community Browser