<?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 Set Analysis with cumulative data and range with max date in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Set-Analysis-with-cumulative-data-and-range-with-max-date/m-p/2008302#M83405</link>
    <description>&lt;P&gt;Previously I needed help to create a formula to a line chart. I created a chart using set analysis to specify a range of the axis x (I want just a sample of the dimension I selected), and at the same time I want it to be a cumulative line graph. For example:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Month&lt;/STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&amp;nbsp; Value&lt;/STRONG&gt;&lt;BR /&gt;November 2020&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 300&lt;BR /&gt;December 2020&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 150&lt;BR /&gt;January 2021&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;250&lt;BR /&gt;February 2021&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 175&lt;BR /&gt;March 2021&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 450&lt;/P&gt;
&lt;P&gt;In this example, I want my graph to cover only between December 2020 and March 2021 and to be cumulative, with 150 for December, 400 for January, 575 for February. So I came up with an expression like that:&lt;/P&gt;
&lt;PRE class="lia-code-sample  language-markup"&gt;&lt;CODE&gt;=RangeSum(Above(Sum({&amp;lt;Month={"*"}-{'November 2020'}&amp;gt;}Value),0,RowNo()))&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But how can I apply the same idea but always to the range between the &lt;STRONG&gt;maximum date&lt;/STRONG&gt; (month and year) and the &lt;STRONG&gt;12 months previous&lt;/STRONG&gt; that maximum date? &lt;SPAN&gt;I tried to use the max function inside the set analysis, but it doesn't work. Please, I need some help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks a lot!&lt;/P&gt;</description>
    <pubDate>Wed, 23 Nov 2022 14:46:33 GMT</pubDate>
    <dc:creator>Polor1993</dc:creator>
    <dc:date>2022-11-23T14:46:33Z</dc:date>
    <item>
      <title>Set Analysis with cumulative data and range with max date</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-with-cumulative-data-and-range-with-max-date/m-p/2008302#M83405</link>
      <description>&lt;P&gt;Previously I needed help to create a formula to a line chart. I created a chart using set analysis to specify a range of the axis x (I want just a sample of the dimension I selected), and at the same time I want it to be a cumulative line graph. For example:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Month&lt;/STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&amp;nbsp; Value&lt;/STRONG&gt;&lt;BR /&gt;November 2020&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 300&lt;BR /&gt;December 2020&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 150&lt;BR /&gt;January 2021&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;250&lt;BR /&gt;February 2021&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 175&lt;BR /&gt;March 2021&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 450&lt;/P&gt;
&lt;P&gt;In this example, I want my graph to cover only between December 2020 and March 2021 and to be cumulative, with 150 for December, 400 for January, 575 for February. So I came up with an expression like that:&lt;/P&gt;
&lt;PRE class="lia-code-sample  language-markup"&gt;&lt;CODE&gt;=RangeSum(Above(Sum({&amp;lt;Month={"*"}-{'November 2020'}&amp;gt;}Value),0,RowNo()))&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But how can I apply the same idea but always to the range between the &lt;STRONG&gt;maximum date&lt;/STRONG&gt; (month and year) and the &lt;STRONG&gt;12 months previous&lt;/STRONG&gt; that maximum date? &lt;SPAN&gt;I tried to use the max function inside the set analysis, but it doesn't work. Please, I need some help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks a lot!&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2022 14:46:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-with-cumulative-data-and-range-with-max-date/m-p/2008302#M83405</guid>
      <dc:creator>Polor1993</dc:creator>
      <dc:date>2022-11-23T14:46:33Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with cumulative data and range with max date</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-with-cumulative-data-and-range-with-max-date/m-p/2011327#M83627</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/183460"&gt;@Polor1993&lt;/a&gt; &lt;/P&gt;
&lt;P&gt;I would create a variable for this purpose, in script for me usually works best.&lt;BR /&gt;For the period/month for your formula, you can create a variable with 'AddMonths(Max(Date),-12)'.&lt;BR /&gt;You can use this variable in your formula.&lt;BR /&gt;=RangeSum(Above(Sum({&amp;lt;Month={"&amp;gt;=$(vDateVariable)"}&amp;gt;}Value),0,RowNo()))&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Thu, 01 Dec 2022 09:07:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-with-cumulative-data-and-range-with-max-date/m-p/2011327#M83627</guid>
      <dc:creator>williejacobs</dc:creator>
      <dc:date>2022-12-01T09:07:11Z</dc:date>
    </item>
  </channel>
</rss>

