<?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 order by in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Custom-order-by/m-p/58617#M3901</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I believe it should work, but I think to change the load order of a field, it needs to be created with that sort order. week was created before this load and will use the load order from it's previous table, but if you create a new field like Week_Sort, it will be sorted with the new order.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, you cannot use a calculation in order by, so better to create a field and use that in your order by clause&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DateTable:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD ....,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Mod(AbsenceWeek-31, 52)+1 as TempField&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FROM ....;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sort:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Load week,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; week as week_sort&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident DateTable&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Order by TempField;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 06 Feb 2018 14:39:43 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2018-02-06T14:39:43Z</dc:date>
    <item>
      <title>Custom order by</title>
      <link>https://community.qlik.com/t5/App-Development/Custom-order-by/m-p/58616#M3900</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I need to be able to sort an object via load order.&lt;/P&gt;&lt;P&gt;The dimension is week number that today is loaded in the order 1-52.&lt;/P&gt;&lt;P&gt;I need this to be loaded to start with week 33 and going around to week 32; eg:&lt;/P&gt;&lt;P&gt;33&lt;/P&gt;&lt;P&gt;34&lt;/P&gt;&lt;P&gt;35&lt;/P&gt;&lt;P&gt;...&amp;gt;&lt;/P&gt;&lt;P&gt;51&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;2&lt;/P&gt;&lt;P&gt;3&lt;/P&gt;&lt;P&gt;...&amp;gt;&lt;/P&gt;&lt;P&gt;32&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have been able to solve this in the QlikView-application via the following SORT-expression in the GUI:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Mod(AbsenceWeek-31, 52)+1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;but it does not work with the Senseobject that I am using. However the Sense object seems to accept load order.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know that I can use an inline table starting with 33 but I was hoping for a way to do this without having a table that of 52 rows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It should look something like this (if it was possible)&lt;/P&gt;&lt;P&gt;Load week&lt;/P&gt;&lt;P&gt;Resident&lt;/P&gt;&lt;P&gt;DateTable&lt;/P&gt;&lt;P&gt;Order by &lt;EM&gt;"Mod(AbsenceWeek-31, 52)+1"&lt;/EM&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any Ideas how I can make that ordering when I load the table?&lt;/P&gt;&lt;P&gt;Kind regards, Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Feb 2018 14:22:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Custom-order-by/m-p/58616#M3900</guid>
      <dc:creator>Jonathan_Alm</dc:creator>
      <dc:date>2018-02-06T14:22:42Z</dc:date>
    </item>
    <item>
      <title>Re: Custom order by</title>
      <link>https://community.qlik.com/t5/App-Development/Custom-order-by/m-p/58617#M3901</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I believe it should work, but I think to change the load order of a field, it needs to be created with that sort order. week was created before this load and will use the load order from it's previous table, but if you create a new field like Week_Sort, it will be sorted with the new order.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, you cannot use a calculation in order by, so better to create a field and use that in your order by clause&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DateTable:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD ....,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Mod(AbsenceWeek-31, 52)+1 as TempField&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FROM ....;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sort:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Load week,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; week as week_sort&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident DateTable&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Order by TempField;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Feb 2018 14:39:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Custom-order-by/m-p/58617#M3901</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-02-06T14:39:43Z</dc:date>
    </item>
  </channel>
</rss>

