Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Problem in the sequence of Calendar Quarter Year.

Hi All,

I have a field in my Calendar Table in DB which contains a field related to  Calendar and stored into a QVD called Calendar. I am using  Year and Quarter fields from the QVD to get Quarter Year( eg: Q1/2014,Q2/2014,Q3/2014 etc). In the chart this field is not getting displayed in sequence. Attaching the screen shot. Please suggest me how to sort this. I have tried few ways and nothing was working.

CalendarQuarter.PNG.png

Please help.

Thanks,

Saritha Xavier

1 Solution

Accepted Solutions
MarcoWedel

17 Replies
vardhancse
Specialist III
Specialist III

try to change the sort for the quarter field in the properties->sort tab

mdmukramali
Specialist III
Specialist III

Dear,

the one way is

You can create a Inline table which contains two fields,

Load * inLine

[

QuaterYear,Sequence

Q1/2011,1

Q2/2011,2

....

....

and soon.

then in the chart go to sort tab

and sort it by expression

=Sequence

else attach the sample file.

Thanks,

Mukram.

Not applicable
Author

Hi Sasi,

This filed is in a cyclic group and currently using numeric sort. other fields are getting sorted correctly

sort.PNG.png

mdmukramali
Specialist III
Specialist III

Dear,

can you attach the sample file.

Thanks,

Mukram.

Not applicable
Author

Hi Mukram,

Thanks for your suggestion. Is there any way, so that i can make use of the fields in my QVD itself?

CALENDER_QUATER &'/'&CALENDER_YEAR AS [Quarter Year], this is the script to generate Quarter Year

PrashantSangle

Hi,

Use State also

select State->ascending from Sort Tab

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
sundarakumar
Specialist II
Specialist II

Hi Saritha,

I would suggest to create a new field like

CALENDER_YEAR&right(CALENDER_QUATER,1) as sortnum

which wil return 20111,20112....20134. use the newly created field in sort (expression)

Please try it.

-Sundar

ashfaq_haseeb
Champion III
Champion III

Hi,

have a look at attached application.

Now use sequence field to sort your data.

Regards

ASHFAQ

MarcoWedel

Load

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