Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Expression/Order Graph

Hi! I'd like to order my graphic in this way: November, December, January, February and March.

Is possible to enter an expression on the Sort tab to show this order of months ?

Any suggestions greatly appreciated.

Andrea

6 Replies
Not applicable
Author

Try this in the sort expression:

=Match(YourMonthField, 'Nov', 'Dec' , 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct')

MK_QSL
MVP
MVP

Add an inline table in your script

Load * Inline

[

     MonthName, SortOrder

     November, 1

     December, 2

     January, 3

etc......

];

Now wherever you want to sort your graph, go to sort table, expression and write =SortOrder make it ascending order

Not applicable
Author

Thank you for your help!

Colin-Albert

If you create the monthname as a dual field, the data will sort in numeric order automatically but display the name.

Load dual(MonthName, Sort) as MonthName

Inline [MonthName, Sort

   November, 1

   December, 2

   January, 3

...

] ;

Manish Kachhia wrote:

Add an inline table in your script

Load * Inline

[

     MonthName, SortOrder

     November, 1

     December, 2

     January, 3

etc......

];

Now wherever you want to sort your graph, go to sort table, expression and write =SortOrder make it ascending order

Manish Kachhia wrote:

Add an inline table in your script

Load * Inline

[

     MonthName, SortOrder

     November, 1

     December, 2

     January, 3

etc......

];

Now wherever you want to sort your graph, go to sort table, expression and write =SortOrder make it ascending order

Not applicable
Author

Thank you for your help!

preminqlik
Specialist II
Specialist II

hi rebecca if you use this below expression , the sort order will be changed if you select any field value in month field

=Match(YourMonthField, 'Nov', 'Dec' , 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct')



thats why use below expression in sort tab :

=only({1}Match(YourMonthField, 'Nov', 'Dec' , 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct'))


Hope this helps you


@

Prem