Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

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

Tags (2)
1 Solution

Accepted Solutions

Re: Re: Problem in the sequence of Calendar Quarter Year.

17 Replies
vardhancse
Valued Contributor III

Re: Problem in the sequence of Calendar Quarter Year.

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

mdmukramali
Valued Contributor III

Re: Problem in the sequence of Calendar Quarter Year.

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

Re: Problem in the sequence of Calendar Quarter Year.

Hi Sasi,

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

sort.PNG.png

mdmukramali
Valued Contributor III

Re: Problem in the sequence of Calendar Quarter Year.

Dear,

can you attach the sample file.

Thanks,

Mukram.

Not applicable

Re: Problem in the sequence of Calendar Quarter Year.

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

Re: Problem in the sequence of Calendar Quarter Year.

Hi,

Use State also

select State->ascending from Sort Tab

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
sundarakumar
Valued Contributor II

Re: Problem in the sequence of Calendar Quarter Year.

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

Re: Re: Problem in the sequence of Calendar Quarter Year.

Hi,

have a look at attached application.

Now use sequence field to sort your data.

Regards

ASHFAQ

Re: Problem in the sequence of Calendar Quarter Year.

Load

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