Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Kushal_Chawda

Sorting Month Year

Dear All,

I have created two fileds Month & Monthyear.

I want to display Month as Apr to Mar financial year wise. Apr..May..Mar.

When I am taking Month as dimension it is fine. I am getting month starting from Apr .

But when I am loading Monthyear.. I am getting the Monthyear like. Apr-2012, Apr-2013... May-2012, May 2013... Jun 2013,Jun 2012

But I want to display it as Apr-2012, May-2012, Jun 2012...Mar 2012, Apr 2013, May 2013....Mar-2013

I am confused how do i sort it

3 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

If sorting Monthyear numerically doesn't help then it's a field with string values. You won't be able to sort that easily. In that case try to create it as a date field in the script. If you have a date field you can use that: date(monthstart(MyDateField),'MMM-YYYY') as Monthyear. If all you have is the Monthyear field with strings try: date(date#(Monthyear,'MMM-YYYY'),'MMM-YYYY') as Monthyear.


talk is cheap, supply exceeds demand
Kushal_Chawda
Author

Hi Gysbert,

Thanks for the quick reply

I have already create Month year in scrip.. but when I am using Monthyear field in report it's load order is

Untitled.jpg

When I am sorting it with Monthyear in Exression (sort tab of chart) I am getting the order as

Untitled3.jpg

But I want to display the order as below

Untitled1.jpg

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     Have a look at the application.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!