<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Custom Sorting in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Custom-Sorting/m-p/708859#M255390</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try with sort by expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=match(max(month(InvDate)),7, 8, 9, 10, 11, 12, 1, 2, 3, 4, 5, 6)&lt;/P&gt;&lt;P&gt;&lt;IMG alt="1.png" class="jive-image" height="362" src="https://community.qlik.com/legacyfs/online/63685_1.png" style="width: 467px; height: 361.94417077175694px;" width="467" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 04 Aug 2014 20:03:22 GMT</pubDate>
    <dc:creator>maxgro</dc:creator>
    <dc:date>2014-08-04T20:03:22Z</dc:date>
    <item>
      <title>Custom Sorting</title>
      <link>https://community.qlik.com/t5/QlikView/Custom-Sorting/m-p/708847#M255378</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have month on x-axis and two other metrics for comparison 2013-2014 and 2014-2015. I am trying to create custom sort on x-axis as per Australian calendar which starts from July to June.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am comparing the Sales Value data here is 2013-2014 and 2014-2015.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But not able to implement custom sorting. Pls let me know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Aug 2014 14:32:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Custom-Sorting/m-p/708847#M255378</guid>
      <dc:creator />
      <dc:date>2014-08-04T14:32:53Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Sorting</title>
      <link>https://community.qlik.com/t5/QlikView/Custom-Sorting/m-p/708848#M255379</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you post a sample qvw???&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Aug 2014 14:44:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Custom-Sorting/m-p/708848#M255379</guid>
      <dc:creator />
      <dc:date>2014-08-04T14:44:09Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Sorting</title>
      <link>https://community.qlik.com/t5/QlikView/Custom-Sorting/m-p/708849#M255380</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would use an Inline table who will be joined to the calendar table&lt;/P&gt;&lt;P&gt;SortMonth:&lt;/P&gt;&lt;P&gt;Load * inline&lt;/P&gt;&lt;P&gt;[Month, SortMonth&lt;/P&gt;&lt;P&gt;July, 1&lt;/P&gt;&lt;P&gt;Aug, 2&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;..&lt;/P&gt;&lt;P&gt;June, 12&lt;/P&gt;&lt;P&gt;]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;left join (Calendar)&lt;/P&gt;&lt;P&gt;load Month, Sort&lt;/P&gt;&lt;P&gt;resident SortMonth&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and then in the Sort expression of your diagram use the new field SortMonth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Aug 2014 14:48:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Custom-Sorting/m-p/708849#M255380</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-08-04T14:48:17Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Sorting</title>
      <link>https://community.qlik.com/t5/QlikView/Custom-Sorting/m-p/708850#M255381</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;...even better is if you can load it as a dual() and then the sorting is seamless.&lt;/P&gt;&lt;P&gt;eg:&lt;/P&gt;&lt;P&gt;Load dual(a,b) inline&lt;/P&gt;&lt;P&gt;[a , b&lt;/P&gt;&lt;P&gt;July, 1&lt;/P&gt;&lt;P&gt;Aug, 2...&lt;/P&gt;&lt;P&gt;]&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Aug 2014 14:52:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Custom-Sorting/m-p/708850#M255381</guid>
      <dc:creator>juleshartley</dc:creator>
      <dc:date>2014-08-04T14:52:36Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Sorting</title>
      <link>https://community.qlik.com/t5/QlikView/Custom-Sorting/m-p/708851#M255382</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To refresh the qvw file it will take 90 minutes, can I do something at the UI level.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Aug 2014 14:58:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Custom-Sorting/m-p/708851#M255382</guid>
      <dc:creator />
      <dc:date>2014-08-04T14:58:21Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Sorting</title>
      <link>https://community.qlik.com/t5/QlikView/Custom-Sorting/m-p/708852#M255383</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can put the expression in your sort expression:&lt;/P&gt;&lt;P&gt;if (month(yourdate)='July'),1&lt;/P&gt;&lt;P&gt;&amp;nbsp; if (month(yourdate)='August', 2,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (month(yourdate)='June', 12)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But next time before you refresh your qvw, i would put in the the script&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Aug 2014 15:01:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Custom-Sorting/m-p/708852#M255383</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-08-04T15:01:09Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Sorting</title>
      <link>https://community.qlik.com/t5/QlikView/Custom-Sorting/m-p/708853#M255384</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I already have this logic, but not working as expected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=IF(Month(InvDate)='Jul',1,IF(Month(InvDate)='Aug',2,IF(MonthInvDate)='Sep',3,IF(Month(InvDate)='Oct','4',IF(Month(InvDate)='Nov',5,&amp;nbsp; &lt;/P&gt;&lt;P&gt;IF(Month(InvDate)='Dec',6,IF(Month(InvDate)='Jan',7,IF(Month(InvDate)='Feb',8,IF(Month(InvDate)='Mar',9,IF(Month(InvDate)='Apr',92, &lt;/P&gt;&lt;P&gt; IF(Month(InvDate)='May',93,IF(Month(InvDate)='Jun',94))))))))))))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Aug 2014 15:49:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Custom-Sorting/m-p/708853#M255384</guid>
      <dc:creator />
      <dc:date>2014-08-04T15:49:03Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Sorting</title>
      <link>https://community.qlik.com/t5/QlikView/Custom-Sorting/m-p/708854#M255385</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;maybe to many ifs?&lt;/P&gt;&lt;P&gt;try&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;if &lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;num&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;month&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(InvDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;))&amp;gt;6, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;num&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;month&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;InvDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;))-6, (&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;num&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;month&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;InvDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)))+6) &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Aug 2014 16:10:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Custom-Sorting/m-p/708854#M255385</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-08-04T16:10:21Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Sorting</title>
      <link>https://community.qlik.com/t5/QlikView/Custom-Sorting/m-p/708855#M255386</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, didn't worked...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Aug 2014 17:12:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Custom-Sorting/m-p/708855#M255386</guid>
      <dc:creator />
      <dc:date>2014-08-04T17:12:43Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Sorting</title>
      <link>https://community.qlik.com/t5/QlikView/Custom-Sorting/m-p/708856#M255387</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Madu&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Add this is Sort Expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dual(Month,Match(Month,'Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here Month is your MonthFieldName&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See the Snapshot:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Sort.bmp" class="jive-image" src="https://community.qlik.com/legacyfs/online/63683_Sort.bmp" style="width: 620px; height: 425px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Aviral Nag&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Aug 2014 17:31:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Custom-Sorting/m-p/708856#M255387</guid>
      <dc:creator>aveeeeeee7en</dc:creator>
      <dc:date>2014-08-04T17:31:46Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Sorting</title>
      <link>https://community.qlik.com/t5/QlikView/Custom-Sorting/m-p/708857#M255388</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am looking at the Australian Calendar which FY will starts from July to June.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Aug 2014 18:29:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Custom-Sorting/m-p/708857#M255388</guid>
      <dc:creator />
      <dc:date>2014-08-04T18:29:07Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Sorting</title>
      <link>https://community.qlik.com/t5/QlikView/Custom-Sorting/m-p/708858#M255389</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;NewDate,&lt;/P&gt;&lt;P&gt;'Q'&amp;amp;Ceil(Num(Month(AddMonths(NewDate,-6)))/3) AS [Fiscal Quarter],&lt;/P&gt;&lt;P&gt;Month(NewDate) AS [Fiscal Month],&lt;/P&gt;&lt;P&gt;yearname(NewDate,0,7) AS [Fiscal Year]&lt;/P&gt;&lt;P&gt;FROm Table.qvd;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above script will create your Fiscal Year starting from July to June.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly, change NewDate with your Table FieldName.&lt;/P&gt;&lt;P&gt;Also, see the Attachment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Aviral Nag&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Aug 2014 19:07:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Custom-Sorting/m-p/708858#M255389</guid>
      <dc:creator>aveeeeeee7en</dc:creator>
      <dc:date>2014-08-04T19:07:31Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Sorting</title>
      <link>https://community.qlik.com/t5/QlikView/Custom-Sorting/m-p/708859#M255390</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try with sort by expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=match(max(month(InvDate)),7, 8, 9, 10, 11, 12, 1, 2, 3, 4, 5, 6)&lt;/P&gt;&lt;P&gt;&lt;IMG alt="1.png" class="jive-image" height="362" src="https://community.qlik.com/legacyfs/online/63685_1.png" style="width: 467px; height: 361.94417077175694px;" width="467" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Aug 2014 20:03:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Custom-Sorting/m-p/708859#M255390</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2014-08-04T20:03:22Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Sorting</title>
      <link>https://community.qlik.com/t5/QlikView/Custom-Sorting/m-p/708860#M255391</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Madu, Here's a quick app that will generate multiple years of offset calendars, just assign the 3 parameters: &lt;BR /&gt;-Start year&lt;BR /&gt;-No of years to generate&lt;BR /&gt;-the AddMonths shift&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="63679" alt="20140804_shifted_or_fiscal_calendar.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/63679_20140804_shifted_or_fiscal_calendar.png" style="width: 620px; height: 434px;" /&gt;&lt;BR /&gt;A combined field of the custom (or calendar) year concatenated with the month number should be enough to enforce chronological sort - &lt;EM&gt;i.e. Max(MULTI_YEAR_MONTH_ID). &lt;/EM&gt;&lt;EM&gt;(an alternative using the integer value of the month start of each entry would be fine as well).&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If your chart axis is only rendering 12 months at a time, but the data holds more than one year of info you'll have multiple years of data piling up in each MONTH dimension (Jan 2014 and Jan 2015 data both rendering under 'Jan').&amp;nbsp; If you wanted to extend the x-axis to span multiple years, you now have a field like MULTI_YEAR_MONTH_ID to make sure everyone stays in sequence.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Using a Dual() encapsulated value should work fine for sort expressions, but if you intend to eventually involve that field in comparative set-analysis, Dual() encapsulated data can present issues when used in conjunction with set-analysis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can test this on your own, but if you take a set-analysis selection that bookends some ranges, see if you get the same results with a purely numeric encoded field vs. a dual().&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;EM&gt;This expression will work while MULTI_YEAR_MONTH_ID is a purely numeric field:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Sum( {&amp;lt;MULTI_YEAR_MONTH_ID={"&amp;gt;= 201501 &amp;lt;= 201504"}&amp;gt;} AMOUNT)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Then converting the entries in MULTI_YEAR_MONTH_ID to encapsulate Dual() using entries like:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;LOAD Dual('Jan 2015',201501) AS MULTI_YEAR_MONTH_ID AUTOGENERATE(1);&lt;BR /&gt;LOAD Dual('Apr 2015',201504) AS MULTI_YEAR_MONT_ID AUTOGENERATE(1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I try the above expression again after converting MULTI_YEAR_MONTH_ID to Dual(), the set-analysis seems to want to evaluate the textual portion of the dual() data type and doesn't pick up on the numeric values (even if you use some explicit data type reference like Sum({&amp;lt;MULTI_YEAR_MONTH_ID={"&amp;gt;=&amp;nbsp; $(=Num(Min(MULTI_YEAR_MONTH_ID)))"}&amp;gt;} AMOUNT), and now you can see the set-analysis syntax burgeoning).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That's why even though it seems convenient to combine some date fields in dual, why they may have been split off.&amp;nbsp; Date range Set-analysis works most consistent, and the syntax remains minimal, if it is constructed around purely numeric fields and you don't get entangled in the mess of needing to craft expressions that convert back and forth between format strings and their underlying numeric representations.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Aug 2014 20:49:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Custom-Sorting/m-p/708860#M255391</guid>
      <dc:creator>evan_kurowski</dc:creator>
      <dc:date>2014-08-04T20:49:45Z</dc:date>
    </item>
  </channel>
</rss>

