5 Replies Latest reply: Jun 29, 2017 8:23 AM by Gabriele Formici RSS

    Sorting date in bar chart not working

    Gabriele Formici

      Hi everyone.

      I spent the last two days trying to solve this problem and looking for solutions in the forum but none of them worked. So here's the issue.

      I have dates in the table I'm loading in the following format: YYYYMMDD.

      The script I'm using is the following:


      date((date#(DASCAX,'YYYYMMDD')),'DD/MM/YYYY') as [Expiration date],

      I'm using this to let Qlik interpret my date and convert it in DD/MM/YYYY format.


      I then have to create a bar chart which has date in MM-YYYY (or alternatively MMM-YYYY) on the x-axis.

      When I create the dimension I specify the following:


      =Date([Expiration Date],'MM-YYYY')


      The problem comes when I try to order dates: whichever expression I use, dates are displayed as follows:



      How can I sort them? What am I getting wrong?

      Thanks in advance