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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sorting using Double Dimension in Combo Chart

Hello guys,

In combo chart, I have 2 dimension that joined become one dimension, which is =Month&''&Year (TAHUN). I want to order it using Year first and then Month, so the order will be like Jan2013-Feb2013-Mar2013-Apr2013-May2013-Jun2013-Jul2013-Aug2013-Sep2013-Oct2013-Nov2013-Dec2013-Jan2014-Feb2014-Mar2014. How to sort like that? I tried to use sort by expression : Year&Month, but the result is Jan2013-Feb2013-Mar2013-Apr2013-May2013-Jun2013-Jul2013-Aug2013-Sep2013-Jan2014-Feb2014-Mar2014-Oct2013-Nov2013-Dec2013.

combo.png

Thank you

1 Solution

Accepted Solutions
ashfaq_haseeb
Champion III
Champion III

Hi,

I would suggest you to create a new field in your data-model like

MonthName(Date_Field) as MonthName

Then use this field in your chart as dimension, this will be properly sorted.


OR


use below

=Year * 100 + Month

By this you will always have numbers that are 6 digits

ex. 201401, 201402,201303,..... and so on


Regards

ASHFAQ

View solution in original post

3 Replies
ashfaq_haseeb
Champion III
Champion III

Hi,

I would suggest you to create a new field in your data-model like

MonthName(Date_Field) as MonthName

Then use this field in your chart as dimension, this will be properly sorted.


OR


use below

=Year * 100 + Month

By this you will always have numbers that are 6 digits

ex. 201401, 201402,201303,..... and so on


Regards

ASHFAQ

maxgro
MVP
MVP

try with sort by this expression (in sort tab)

=Year & num(Month, '00')

quiquehm
Contributor III
Contributor III

Guys, I have a similar problem trying to sort in a combo chart. I built kind of a Gantt chart to display project milestones across time, and I would need to sort the chart displaying the milestones as they will come in time. My dimension ( Task ) is a calculated dimension made of a string of simple dimensions and a few symbols ( Unicode symbols ) :

Task = =WBS_Nr_icon&' '&Activ_Nr_icon&'-'&CPS&' '&if(Not IsNull(date_MST_Actual),chr(9670),chr(9671))Milestones.png

Expressions are just 2 , Milestone Plan Date ( circles ) and Milestone Actual Date ( dots ). I can filter the chart to display only Plan dates ( open milestones ) ...so I would like to sort these by the dates , in ascending order.

I tried Sorting by date_MST_Plan, but it does not work. I also tried by Y-value, but no sucess.

Does anybody know how to do the trick ?

Thanks a lot

Sorting.png