<?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 Rolling Sum in Stacked Bar Chart in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Rolling-Sum-in-Stacked-Bar-Chart/m-p/2507163#M104302</link>
    <description>&lt;P&gt;Hi all QS experts,&lt;/P&gt;
&lt;P&gt;I have an issue with the rolling 12 month bar chart.&lt;BR /&gt;&lt;BR /&gt;After applying the expression below, I found there are two issues:&lt;/P&gt;
&lt;DIV&gt;(1) It doesn't roll up, as you can see there are 0s in certain months&lt;/DIV&gt;
&lt;DIV&gt;(2) The accumulation figures will change depending on the Dimension user selected&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;(1) 0s showing in the bar chart&lt;/DIV&gt;
&lt;DIV&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="BoXiangWang_0-1740459028493.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/177814iDB2D675471AB3666/image-size/medium?v=v2&amp;amp;px=400" role="button" title="BoXiangWang_0-1740459028493.png" alt="BoXiangWang_0-1740459028493.png" /&gt;&lt;/span&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(2) After changing the dimension to B, the 2024-Dec number becomes 31, instead of 27, which 27 is accurate&lt;/P&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="BoXiangWang_1-1740459074580.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/177817i475526D54F92D4FB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="BoXiangWang_1-1740459074580.png" alt="BoXiangWang_1-1740459074580.png" /&gt;&lt;/span&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;
&lt;DIV&gt;Could you help check where could be the problem? I really don't get it.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;BR /&gt;Expression&lt;BR /&gt;=&lt;/DIV&gt;
&lt;DIV&gt;IF(date_month&amp;lt;'$(=AddMonths(min(date_month),($(vRollingMonths)-1)))', null(),&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;{&amp;lt;[date_month]={"&amp;lt;=$(=MonthEnd(vRollingDate))"}&amp;gt;}&lt;/DIV&gt;
&lt;DIV&gt;aggr(&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; Rangesum(Above(Count(Distinct {&amp;lt;leaver={1}, secondee=$(vSecondee)&amp;gt;} [dim_ppl_employee_sk]), 0, $(vRollingMonths)))&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; ,$(vDimensionTurnover), date_month)&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;)&lt;/DIV&gt;</description>
    <pubDate>Tue, 25 Feb 2025 04:52:25 GMT</pubDate>
    <dc:creator>BoXiangWang</dc:creator>
    <dc:date>2025-02-25T04:52:25Z</dc:date>
    <item>
      <title>Rolling Sum in Stacked Bar Chart</title>
      <link>https://community.qlik.com/t5/App-Development/Rolling-Sum-in-Stacked-Bar-Chart/m-p/2507163#M104302</link>
      <description>&lt;P&gt;Hi all QS experts,&lt;/P&gt;
&lt;P&gt;I have an issue with the rolling 12 month bar chart.&lt;BR /&gt;&lt;BR /&gt;After applying the expression below, I found there are two issues:&lt;/P&gt;
&lt;DIV&gt;(1) It doesn't roll up, as you can see there are 0s in certain months&lt;/DIV&gt;
&lt;DIV&gt;(2) The accumulation figures will change depending on the Dimension user selected&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;(1) 0s showing in the bar chart&lt;/DIV&gt;
&lt;DIV&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="BoXiangWang_0-1740459028493.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/177814iDB2D675471AB3666/image-size/medium?v=v2&amp;amp;px=400" role="button" title="BoXiangWang_0-1740459028493.png" alt="BoXiangWang_0-1740459028493.png" /&gt;&lt;/span&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(2) After changing the dimension to B, the 2024-Dec number becomes 31, instead of 27, which 27 is accurate&lt;/P&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="BoXiangWang_1-1740459074580.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/177817i475526D54F92D4FB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="BoXiangWang_1-1740459074580.png" alt="BoXiangWang_1-1740459074580.png" /&gt;&lt;/span&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;
&lt;DIV&gt;Could you help check where could be the problem? I really don't get it.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;BR /&gt;Expression&lt;BR /&gt;=&lt;/DIV&gt;
&lt;DIV&gt;IF(date_month&amp;lt;'$(=AddMonths(min(date_month),($(vRollingMonths)-1)))', null(),&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;{&amp;lt;[date_month]={"&amp;lt;=$(=MonthEnd(vRollingDate))"}&amp;gt;}&lt;/DIV&gt;
&lt;DIV&gt;aggr(&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; Rangesum(Above(Count(Distinct {&amp;lt;leaver={1}, secondee=$(vSecondee)&amp;gt;} [dim_ppl_employee_sk]), 0, $(vRollingMonths)))&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; ,$(vDimensionTurnover), date_month)&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;)&lt;/DIV&gt;</description>
      <pubDate>Tue, 25 Feb 2025 04:52:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Rolling-Sum-in-Stacked-Bar-Chart/m-p/2507163#M104302</guid>
      <dc:creator>BoXiangWang</dc:creator>
      <dc:date>2025-02-25T04:52:25Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling Sum in Stacked Bar Chart</title>
      <link>https://community.qlik.com/t5/App-Development/Rolling-Sum-in-Stacked-Bar-Chart/m-p/2507247#M104309</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I believe the problem is related to using the Above() function in a multi-dimensional chart (or AGGR, for that matter). By default, the Above() function works within the "current segment" of the two dimensions. In order to make it work across multiple dimensions, add the TOTAL qualifier to the Above().&lt;/P&gt;
&lt;P&gt;Another possible issue is the inner Set within the AGGR, which is not repeated outside of the AGGR. Based on the logic of your formula, you should add the Set defined in the Count function, to the outer set that you specify before the AGGR - then it will apply correctly to the whole calculation.&lt;/P&gt;
&lt;P&gt;Other than that, there could be errors with variables, field names, etc... - it's hard to predict all the possible issues without seeing the App.&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;</description>
      <pubDate>Tue, 25 Feb 2025 16:40:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Rolling-Sum-in-Stacked-Bar-Chart/m-p/2507247#M104309</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2025-02-25T16:40:26Z</dc:date>
    </item>
  </channel>
</rss>

