2 Replies Latest reply: Jan 13, 2017 7:24 PM by John Wang RSS

    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:



          "Admitted Date",

          1 as  "admission"

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


      where year([Admitted Date])>=2014




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




      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:




        • Re: Struggling with Month Sorting
          Petter Skjolden

          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

            • Re: Struggling with Month Sorting

              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!