3 Replies Latest reply: Jul 28, 2015 10:21 AM by Andy Weir RSS

    Sorting in Qlik Sense

    Guruprem Saginadham

      Hi,

       

      Could you please suggest me a way to get month Jan as first month in the following chart.

       

      I am not sure why this is happening in this sorting order, When I use month as direct dimension chart is sorting this way. If I use year->month as drill down dimension then month is sorting properly i.e. Jan, Feb, Mar, Apr...

        • Re: Sorting in Qlik Sense
          Andy Weir

          Try adding a master calendar into your data model linked to your fact data.  Use sort by expression and choose FiscalMonthNum.

           

          This would solve your order issue.

             

          YYYYMMFiscal PeriodFiscal QuarterFiscal YearFiscal MonthFiscalMonthNum
          2009-012009/Q112009Jan1
          2009-022009/Q112009Feb2
          2009-032009/Q112009Mar3
          2009-042009/Q222009Apr4
          2009-052009/Q222009May5
          2009-062009/Q222009Jun6
          2009-072009/Q332009Jul7
          2009-082009/Q332009Aug8
          2009-092009/Q332009Sep9
          2009-102009/Q442009Oct10
          2009-112009/Q442009Nov11
          2009-122009/Q442009Dec12
            • Re: Sorting in Qlik Sense
              Guruprem Saginadham

              Andy , I tried but not yet resolved. More explanation is I am using Avg Temp as measure and Month as Dimension

               

              Sorting info is

               

               

              Can you figure out anything from this , please let me know if more info is required?

                • Re: Sorting in Qlik Sense
                  Andy Weir

                  In your data load add a calendar that will link to your fact data.  I believe you are using Month.

                  Calendar:

                  LOAD * INLINE [

                  Month, MonthNum

                  Jan, 1

                  Feb, 2

                  Mar, 3

                  Apr, 4

                  May, 5

                  Jun, 6

                  Jul, 7

                  Aug, 8

                  Sep, 9

                  Oct, 10

                  Nov, 11

                  Dec, 12

                  ];

                   

                  In the sort options choose sort by expression and select =MonthNum this will order your Months correctly.