<?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 Sorting accumulated straight table output in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Sorting-accumulated-straight-table-output/m-p/1298040#M822575</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm having a difficult time trying to sort by output of my straight table. I have dates from a database and Overnight output. I've use the date as the dimension and used the following rangesum formula to sum the revenue related to a range of 10 dates total (anything between the date and 9 dates prior). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=RangeSum(Above(Sum(Overnight),0, 10))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately I can only sort my table by date because the output is dependent on the order of the dates. I agree with the output since I do want to make sure the range that is used is based on a calendar order of dates. However, I want to see the top 10 negative outputs by dates. So which consecutive 10 dates have the largest loss in 'Overnight'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas how to do this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator>sarahshong</dc:creator>
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>Sorting accumulated straight table output</title>
      <link>https://community.qlik.com/t5/QlikView/Sorting-accumulated-straight-table-output/m-p/1298040#M822575</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm having a difficult time trying to sort by output of my straight table. I have dates from a database and Overnight output. I've use the date as the dimension and used the following rangesum formula to sum the revenue related to a range of 10 dates total (anything between the date and 9 dates prior). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=RangeSum(Above(Sum(Overnight),0, 10))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately I can only sort my table by date because the output is dependent on the order of the dates. I agree with the output since I do want to make sure the range that is used is based on a calendar order of dates. However, I want to see the top 10 negative outputs by dates. So which consecutive 10 dates have the largest loss in 'Overnight'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas how to do this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sorting-accumulated-straight-table-output/m-p/1298040#M822575</guid>
      <dc:creator>sarahshong</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting accumulated straight table output</title>
      <link>https://community.qlik.com/t5/QlikView/Sorting-accumulated-straight-table-output/m-p/1298041#M822576</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If your date field is sorted in ascending order in the script (which would most likely be true if you have a master calendar), you might be able to use this&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Aggr(&lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;RangeSum(Above(Sum(Overnight),0, 10)), DateField)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and in case you have QV12 or above, you can make use of &lt;A href="https://community.qlik.com/qlik-blogpost/4673"&gt;The sortable Aggr function is finally here!&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;Aggr(&lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;RangeSum(Above(Sum(Overnight),0, 10)), (DateField, (NUMERIC)))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jul 2017 19:18:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sorting-accumulated-straight-table-output/m-p/1298041#M822576</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-07-26T19:18:28Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting accumulated straight table output</title>
      <link>https://community.qlik.com/t5/QlikView/Sorting-accumulated-straight-table-output/m-p/1298042#M822577</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Sunny! that worked once I included an Order by function in my load script.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jul 2017 19:49:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sorting-accumulated-straight-table-output/m-p/1298042#M822577</guid>
      <dc:creator>sarahshong</dc:creator>
      <dc:date>2017-07-26T19:49:42Z</dc:date>
    </item>
  </channel>
</rss>

