<?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: Sort on a drill down dimension - qlik sense in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Sort-on-a-drill-down-dimension-qlik-sense/m-p/693435#M10349</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Hi ,&amp;nbsp; I've come up with a way to do this using data model techniques. In this example (similar but not same as yours) i have a drill from Year to Month (MMM) to Date&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Need to create a table for each level in the drill down and use ORDER BY DESC to filter the negative values of Year,Month,Date to get the ascending order you want in the chart. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;In the sample below, my drill down dimension is made up of OrderYear,OrderMonth,OrderDate.&amp;nbsp; The 'fact' keys are just for joining and sorting . In your case you could add a weeks table. Hope this helps. Let me know if you can't get it to work.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;OrdersHeader:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; OrderDate*-1 as OrderDateFact,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Year(OrderDate)*-1 as OrderYearFact,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Month(OrderDate)*-1 as OrderMonthFact,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CustomerID,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; EmployeeID,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Freight,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; OrderID,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ShipperID&lt;/P&gt;&lt;P&gt;FROM [lib://Individual XLS/OrdersHeader.xlsx]&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is OrdersHeader);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Years:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;load distinct&lt;/P&gt;&lt;P&gt;&amp;nbsp; OrderYearFact,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; fabs(OrderYearFact) as OrderYear&lt;/P&gt;&lt;P&gt;resident OrdersHeader&lt;/P&gt;&lt;P&gt;order by OrderYearFact desc;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Months:&lt;/P&gt;&lt;P&gt;load distinct&lt;/P&gt;&lt;P&gt;&amp;nbsp; OrderMonthFact,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; left(monthName(date(fabs(OrderDateFact),3)),3) as OrderMonth&lt;/P&gt;&lt;P&gt;resident OrdersHeader&lt;/P&gt;&lt;P&gt;order by OrderMonthFact desc;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dates:&lt;/P&gt;&lt;P&gt;load distinct&lt;/P&gt;&lt;P&gt;&amp;nbsp; OrderDateFact,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; date(fabs(OrderDateFact)) as OrderDate&lt;/P&gt;&lt;P&gt;resident OrdersHeader&lt;/P&gt;&lt;P&gt;order by OrderDateFact desc;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/68012_Capture.PNG.png" style="width: 620px; height: 407px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture1.PNG.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/68013_Capture1.PNG.png" style="width: 620px; height: 278px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture2.PNG.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/68014_Capture2.PNG.png" style="width: 620px; height: 291px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 30 Sep 2014 15:35:50 GMT</pubDate>
    <dc:creator>JonnyPoole</dc:creator>
    <dc:date>2014-09-30T15:35:50Z</dc:date>
    <item>
      <title>Sort on a drill down dimension - qlik sense</title>
      <link>https://community.qlik.com/t5/App-Development/Sort-on-a-drill-down-dimension-qlik-sense/m-p/693434#M10348</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good day , Ive created a &lt;STRONG style="font-size: 12pt;"&gt;drill down dimension&lt;/STRONG&gt; which is used in a bar chart .&lt;/P&gt;&lt;P&gt;1. =month(the_date)&amp;nbsp; (which shows april , may , june ... ect)&lt;/P&gt;&lt;P&gt;2. ='Week'&amp;amp;Ceil(Day(the_date)/7)&amp;nbsp;&amp;nbsp; ( which shows week 1 , week 2 , week 3... )&lt;/P&gt;&lt;P&gt;3. =The_date&amp;nbsp;&amp;nbsp; ( Which shows 01/04/2014 , 02/04/2014 .... ect )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do i sort the number 2 and 3 in order .&amp;nbsp;&amp;nbsp; It must show week 1 , week 2 for dimension 2 and sort the dates in order for dimension 3.&amp;nbsp; ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Sep 2014 11:10:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Sort-on-a-drill-down-dimension-qlik-sense/m-p/693434#M10348</guid>
      <dc:creator>vvvvvvizard</dc:creator>
      <dc:date>2014-09-25T11:10:05Z</dc:date>
    </item>
    <item>
      <title>Re: Sort on a drill down dimension - qlik sense</title>
      <link>https://community.qlik.com/t5/App-Development/Sort-on-a-drill-down-dimension-qlik-sense/m-p/693435#M10349</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Hi ,&amp;nbsp; I've come up with a way to do this using data model techniques. In this example (similar but not same as yours) i have a drill from Year to Month (MMM) to Date&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Need to create a table for each level in the drill down and use ORDER BY DESC to filter the negative values of Year,Month,Date to get the ascending order you want in the chart. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;In the sample below, my drill down dimension is made up of OrderYear,OrderMonth,OrderDate.&amp;nbsp; The 'fact' keys are just for joining and sorting . In your case you could add a weeks table. Hope this helps. Let me know if you can't get it to work.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;OrdersHeader:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; OrderDate*-1 as OrderDateFact,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Year(OrderDate)*-1 as OrderYearFact,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Month(OrderDate)*-1 as OrderMonthFact,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CustomerID,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; EmployeeID,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Freight,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; OrderID,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ShipperID&lt;/P&gt;&lt;P&gt;FROM [lib://Individual XLS/OrdersHeader.xlsx]&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is OrdersHeader);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Years:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;load distinct&lt;/P&gt;&lt;P&gt;&amp;nbsp; OrderYearFact,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; fabs(OrderYearFact) as OrderYear&lt;/P&gt;&lt;P&gt;resident OrdersHeader&lt;/P&gt;&lt;P&gt;order by OrderYearFact desc;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Months:&lt;/P&gt;&lt;P&gt;load distinct&lt;/P&gt;&lt;P&gt;&amp;nbsp; OrderMonthFact,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; left(monthName(date(fabs(OrderDateFact),3)),3) as OrderMonth&lt;/P&gt;&lt;P&gt;resident OrdersHeader&lt;/P&gt;&lt;P&gt;order by OrderMonthFact desc;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dates:&lt;/P&gt;&lt;P&gt;load distinct&lt;/P&gt;&lt;P&gt;&amp;nbsp; OrderDateFact,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; date(fabs(OrderDateFact)) as OrderDate&lt;/P&gt;&lt;P&gt;resident OrdersHeader&lt;/P&gt;&lt;P&gt;order by OrderDateFact desc;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/68012_Capture.PNG.png" style="width: 620px; height: 407px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture1.PNG.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/68013_Capture1.PNG.png" style="width: 620px; height: 278px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture2.PNG.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/68014_Capture2.PNG.png" style="width: 620px; height: 291px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Sep 2014 15:35:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Sort-on-a-drill-down-dimension-qlik-sense/m-p/693435#M10349</guid>
      <dc:creator>JonnyPoole</dc:creator>
      <dc:date>2014-09-30T15:35:50Z</dc:date>
    </item>
    <item>
      <title>Re: Sort on a drill down dimension - qlik sense</title>
      <link>https://community.qlik.com/t5/App-Development/Sort-on-a-drill-down-dimension-qlik-sense/m-p/693436#M10350</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 had the same problem,thanks for this, worked fine for me!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2015 09:38:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Sort-on-a-drill-down-dimension-qlik-sense/m-p/693436#M10350</guid>
      <dc:creator>martinien</dc:creator>
      <dc:date>2015-01-06T09:38:42Z</dc:date>
    </item>
  </channel>
</rss>

