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

Announcements
Join us at Qlik Connect 2026 in Orlando, April 13–15: Register Here!
cancel
Showing results for 
Search instead for 
Did you mean: 
superjermsss
Contributor II
Contributor II

Graph is not arranged in chronological order

Hi Everyone,

 

I need help on below visualization. The graph is not displayed according to month. It should be January, Feb, Mar so on. 

In below screenshot, if I already selected a filter in 'Year' the months are in chronological order. But then If I selected another filter in Month then the graph is not in chronological order. I want it to show in chronological order regardless if I filter it. What expression do I need to do?

superjermsss_0-1768275388899.png

superjermsss_1-1768275427095.png

superjermsss_2-1768275459782.png

 

 

Labels (4)
1 Solution

Accepted Solutions
Daniel_Castella
Support
Support

Hi @superjermsss 

 

Ok, in my end it worked but I think my data sample was too simple. Could you, please, try this one?

pick(match(only({1} STC_Month),' January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'), '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12')

 

It is a bit more complex, but the idea is the same. To hard code a value for each month in order to use it to sort. In this case I add the "only" to be able to make a set analysis to ignore the Month selection when doing the pick and match functions.

 

I hope this helps.

 

Kind Regards

Daniel

View solution in original post

5 Replies
Daniel_Castella
Support
Support

Hi @superjermsss 

 

I think you can just use the Sort Numerically instead of Sort by Expression. If not try the following formula:

pick(STC_Month, 'January', 'February', 'March', 'April', 'May',' June',' July', 'August', 'September', 'October', 'November', 'December')

 

The pick function checks the value inside STC_Month and assigns a number according to the position of the hardcoded value. In this way you are always assigning 1 to January, 2 to February... etc; and the dimension is then sorted following these numbers.

 

Kind Regards

Daniel 

avinashelite

Try like this , create a inline load with the dimension name and assign the order ..then use this sort order in the expression .

 

Load * inline

[

dimension_Name,Sort_Order

Jan,1

Feb,2

Mar,3

Apr,4

May,5

Jun,6

Jul,7

Aug,8

Sep,9

Oct,10

Nov,11

Dec,12

];

superjermsss
Contributor II
Contributor II
Author

Hello,

I tried using the expression but still, it doesn't pick the January month as the first in order. Also tried rearranging the sorting but it still not in chronological order.

 

superjermsss_0-1768296811545.png

 

Daniel_Castella
Support
Support

Hi @superjermsss 

 

Ok, in my end it worked but I think my data sample was too simple. Could you, please, try this one?

pick(match(only({1} STC_Month),' January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'), '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12')

 

It is a bit more complex, but the idea is the same. To hard code a value for each month in order to use it to sort. In this case I add the "only" to be able to make a set analysis to ignore the Month selection when doing the pick and match functions.

 

I hope this helps.

 

Kind Regards

Daniel

superjermsss
Contributor II
Contributor II
Author

Hi Daniel,

 

These works!! Thank you so much for your help.