<?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: Maximum of Cumulative Sums in a dynamic date range in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Maximum-of-Cumulative-Sums-in-a-dynamic-date-range/m-p/88697#M5915</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I did not end up using this solution, but thank you! The reference the article made to Aggr tables made me realize that I didn't fully understand how Aggr worked. After learning that, i was able to solve with Range Sum&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used the below:&lt;/P&gt;&lt;P&gt;Max(Aggr(RangeSum(Above(Sum(Daily Net), 0, RowNo())), Department, (Date, (TEXT, Ascending))))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I should mention I stated the date format incorrectly originally - the format I have is YYYY/MM/DD, so the Text sort used in my solution conveniently works.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 Jun 2018 18:55:30 GMT</pubDate>
    <dc:creator>elijahabel</dc:creator>
    <dc:date>2018-06-28T18:55:30Z</dc:date>
    <item>
      <title>Maximum of Cumulative Sums in a dynamic date range</title>
      <link>https://community.qlik.com/t5/App-Development/Maximum-of-Cumulative-Sums-in-a-dynamic-date-range/m-p/88694#M5912</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a problem where I need to be able to display the maximum cumulative sum within a selected date range.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data would look like the following, except we would have multiple departments as well:&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="149" style="border: 1px solid #000000; width: 318px; height: 143px;" width="316"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Date&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Department&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Daily Net&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;6/3/2018&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;A&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;50&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;6/4/2018&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;A&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;60&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;6/5/2018&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;A&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;6/6/2018&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;A&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;-50&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;6/7/2018&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;A&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;20&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As such, the Cumulative sum values if this date range (6/3/2018-6/7/2018) were selected would be:&lt;/P&gt;&lt;P&gt;50,&lt;/P&gt;&lt;P&gt;110,&lt;/P&gt;&lt;P&gt;120,&lt;/P&gt;&lt;P&gt;70,&lt;/P&gt;&lt;P&gt;90&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to be able to show in a table the below (but it would have multiple departments):&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="74" jive-data-cell="{&amp;quot;color&amp;quot;:&amp;quot;#575757&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;left&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;2&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;transparent&amp;quot;,&amp;quot;fontFamily&amp;quot;:&amp;quot;arial,helvetica,sans-serif&amp;quot;,&amp;quot;verticalAlign&amp;quot;:&amp;quot;baseline&amp;quot;}" jive-data-header="{&amp;quot;color&amp;quot;:&amp;quot;#FFFFFF&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;#6690BC&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;center&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;2&amp;quot;}" style="border: 1px solid rgb(0, 0, 0); width: 330px; height: 58px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Department&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Max Cumulative Sum&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;A&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;120&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;B&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;50&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Date range should be able to be changed dynamically, and the calculation would need to dynamically change depending on the selected range.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have looked into the RangeSum and Before functions, but my table does not include the date column, so i don't think that would work. The other option would be set analysis, but I'm not sure how to make it cumulative since in the examples I have seen, the dates are hardcoded or a static variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for all help beforehand!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jun 2018 19:56:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Maximum-of-Cumulative-Sums-in-a-dynamic-date-range/m-p/88694#M5912</guid>
      <dc:creator>elijahabel</dc:creator>
      <dc:date>2018-06-27T19:56:50Z</dc:date>
    </item>
    <item>
      <title>Re: Maximum of Cumulative Sums in a dynamic date range</title>
      <link>https://community.qlik.com/t5/App-Development/Maximum-of-Cumulative-Sums-in-a-dynamic-date-range/m-p/88695#M5913</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Take a look at Cronstrom's "As-Of" table (&lt;A href="https://community.qlik.com/qlik-blogpost/4531"&gt;The As-Of Table&lt;/A&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jun 2018 21:19:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Maximum-of-Cumulative-Sums-in-a-dynamic-date-range/m-p/88695#M5913</guid>
      <dc:creator>jwjackso</dc:creator>
      <dc:date>2018-06-27T21:19:39Z</dc:date>
    </item>
    <item>
      <title>Re: Maximum of Cumulative Sums in a dynamic date range</title>
      <link>https://community.qlik.com/t5/App-Development/Maximum-of-Cumulative-Sums-in-a-dynamic-date-range/m-p/88696#M5914</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be these expressions:&lt;/P&gt;&lt;P&gt;RangeSum(Above(TOTAL Sum(Daily Net), 1, RowNo(TOTAL)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RangeSum(Sum(Daily Net), Above( total Sum(Daily Net))).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jun 2018 17:02:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Maximum-of-Cumulative-Sums-in-a-dynamic-date-range/m-p/88696#M5914</guid>
      <dc:creator>BalaBhaskar_Qlik</dc:creator>
      <dc:date>2018-06-28T17:02:48Z</dc:date>
    </item>
    <item>
      <title>Re: Maximum of Cumulative Sums in a dynamic date range</title>
      <link>https://community.qlik.com/t5/App-Development/Maximum-of-Cumulative-Sums-in-a-dynamic-date-range/m-p/88697#M5915</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I did not end up using this solution, but thank you! The reference the article made to Aggr tables made me realize that I didn't fully understand how Aggr worked. After learning that, i was able to solve with Range Sum&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used the below:&lt;/P&gt;&lt;P&gt;Max(Aggr(RangeSum(Above(Sum(Daily Net), 0, RowNo())), Department, (Date, (TEXT, Ascending))))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I should mention I stated the date format incorrectly originally - the format I have is YYYY/MM/DD, so the Text sort used in my solution conveniently works.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jun 2018 18:55:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Maximum-of-Cumulative-Sums-in-a-dynamic-date-range/m-p/88697#M5915</guid>
      <dc:creator>elijahabel</dc:creator>
      <dc:date>2018-06-28T18:55:30Z</dc:date>
    </item>
    <item>
      <title>Re: Maximum of Cumulative Sums in a dynamic date range</title>
      <link>https://community.qlik.com/t5/App-Development/Maximum-of-Cumulative-Sums-in-a-dynamic-date-range/m-p/88698#M5916</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for the response, I mentioned the correct formula above. This was on the right track though.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jun 2018 18:56:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Maximum-of-Cumulative-Sums-in-a-dynamic-date-range/m-p/88698#M5916</guid>
      <dc:creator>elijahabel</dc:creator>
      <dc:date>2018-06-28T18:56:04Z</dc:date>
    </item>
  </channel>
</rss>

