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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Struggling with Month Sorting

Hi All

I am struggling with Month sorting in QLIK SENSE 3.1  for couple of days , I found solutions from this community, but it seems not works with me.


Also, I found DUAL function in QLIK Sense 3.1 is a little bit different from what said on documents.  Which said on documents is DUAL(text,num) , but it looks  work as DUAL(num,text).


So would you please help me out,thanks!

My  data model is:

Admit:

LOAD

    "Admitted Date",

    1 as  "admission"

FROM [lib://QVD files (sog_wangj00)/INMR.qvd]

(qvd)

where year([Admitted Date])>=2014

;

I want to compare the number by Month for each year like below chart:

m1.PNG

it's not sort by month number.

I put 2 dimensions:

dimension-1 : Month

dual(month([Admitted Date]),text(month([Admitted Date])))

dimension-2 : Year

year([Admitted Date])

and I also put the sorting as numeric:

m2.PNG

thanks!

1 Solution

Accepted Solutions
petter
Partner - Champion III
Partner - Champion III

You should simplify your first dimension:

In the first chart:   Month( [Admitted Date])

In the second chart:   Month( AddMonths( [Admitted Date] , 6 ) )

Then turn off "Use continuous scale" and then the month names come on your X-axis in the right order:

2017-01-13 22_52_32-Program Manager.png

2017-01-13 22_55_17-Qlik Sense Desktop.png

View solution in original post

2 Replies
petter
Partner - Champion III
Partner - Champion III

You should simplify your first dimension:

In the first chart:   Month( [Admitted Date])

In the second chart:   Month( AddMonths( [Admitted Date] , 6 ) )

Then turn off "Use continuous scale" and then the month names come on your X-axis in the right order:

2017-01-13 22_52_32-Program Manager.png

2017-01-13 22_55_17-Qlik Sense Desktop.png

Not applicable
Author

Thanks very much, it works perfectly !

FYI , for 2nd chart, i did a little tweak to show Month Name in Fiscal order.   for Instance: our Fiscal month is : Jul,Aug,Sept,Oct,Nov,Dec,Jan,Feb,Mar,Apr,May,Jun. 

i put     dual(month([Admitted Date]),month(addmonths([Admitted Date],6)))   as dimension,  and also turn off "Use Continuous Scale"  , it works well.

thanks again!