8 Replies Latest reply: Apr 10, 2015 3:35 PM by Sandeep Babu RSS

    Month, Week, etc. and Year chart dimensions sorting

      Hello everybody.

      I have an issue with a very easy task, please help.

      I can't get correct sorting in bar charts with 2 separate dimensions (1st dim - Week, Month, Quarter) and 2nd dim - Year for last Quarters or 6 Months or etc.

      It's easy to do through 1 year, but when data goes to the next year, I get full mess on chart (e.g. Nov-Dec-Jan-Feb transforms into Jan-Feb-Nov-Dec). I thought, that its a natural sort thing for Qlikview, but I spent now more than week to make it happen and still no luck...

       

      The problem is in attached file with 3 examples.

      I need sorting in chronological way. Now is june 2014, I compare this value with June 2013, then previous 6 or more months in chronological way, so it should look like this:

      Previous year 2013 - Nov(comparing 2012 and 2013, there is no data for Nov 2014)

      Previous year 2013 - Dec(2012 and 2013)

      This Year 2014 - Jan(2013 and 2014)

      Feb(2013 and 2014)

      ......

      Jun(2013 and 2014)

      For Quarters: Prev.Year 2013- Q4 (2012 and 2013), then this year 2014 - Q1, Q2 (2013 and 2014), because there is still no data for Q4 2014.

      For weeks: prev. year - 46,47,49...52, this year - 1,2,3,4...24

       

      I have a master calendar with different synthetic sort fields, but when I'm trying to apply it in sort tab nothing happens (e.g. for Months):

      12*(Year(Today())-Year(date_wb_start)) + Month(Today()) - Month(date_wb_start) as MonthsAgo,

      Month(date_wb_start)+Year(date_wb_start)-Year($(vMinDate))+($(vQYears)-1)*(Month(date_wb_start)-1) as MonthSort

      Sort.jpg

      I'm doing something wrong, but can't understand what exactly.

      Thank you all beforehand for your tips&tricks.