<?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 Using RangeSum and Aggr in Script or Dimension in Qlik Automate</title>
    <link>https://community.qlik.com/t5/Qlik-Automate/Using-RangeSum-and-Aggr-in-Script-or-Dimension/m-p/2453104#M4026</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; I have a requirement where I need to do a calculated dimension and use it as a dimension in qlikview bar chart. I use the below in expression tab and works fine. Not sure how to use it as a dimension,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if(rangesum( above( aggr(sum(Counts),Month),0,4) )&amp;lt;=1,'No count',if(rangesum( above( aggr(sum(Counts),Month),0,4) )&amp;gt;=61,'Normal count','Low count'))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My solution is to use this as a dimension and I calculate the count of employees under each category for a bar chart. I am using the above expression to calculate the rolling 3 months on employee level. Is it better to do it at a script level or chart level.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 16 May 2024 08:48:24 GMT</pubDate>
    <dc:creator>Krish</dc:creator>
    <dc:date>2024-05-16T08:48:24Z</dc:date>
    <item>
      <title>Using RangeSum and Aggr in Script or Dimension</title>
      <link>https://community.qlik.com/t5/Qlik-Automate/Using-RangeSum-and-Aggr-in-Script-or-Dimension/m-p/2453104#M4026</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; I have a requirement where I need to do a calculated dimension and use it as a dimension in qlikview bar chart. I use the below in expression tab and works fine. Not sure how to use it as a dimension,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if(rangesum( above( aggr(sum(Counts),Month),0,4) )&amp;lt;=1,'No count',if(rangesum( above( aggr(sum(Counts),Month),0,4) )&amp;gt;=61,'Normal count','Low count'))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My solution is to use this as a dimension and I calculate the count of employees under each category for a bar chart. I am using the above expression to calculate the rolling 3 months on employee level. Is it better to do it at a script level or chart level.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 May 2024 08:48:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Automate/Using-RangeSum-and-Aggr-in-Script-or-Dimension/m-p/2453104#M4026</guid>
      <dc:creator>Krish</dc:creator>
      <dc:date>2024-05-16T08:48:24Z</dc:date>
    </item>
    <item>
      <title>Re: Using RangeSum and Aggr in Script or Dimension</title>
      <link>https://community.qlik.com/t5/Qlik-Automate/Using-RangeSum-and-Aggr-in-Script-or-Dimension/m-p/2454272#M4050</link>
      <description>&lt;P&gt;If you want the calculation to be dynamic, you cannot have it in the script. So, an Aggr() call is the best approach.&lt;/P&gt;
&lt;P&gt;Try putting Aggr() outside the entire calculation:&lt;BR /&gt;aggr(&lt;BR /&gt;if(rangesum( above( sum(Counts),0,4) )&amp;lt;=1,'No count',&lt;BR /&gt;if(rangesum( above( sum(Counts),0,4) )&amp;gt;=61,'Normal count',&lt;BR /&gt;'Low count')),&lt;BR /&gt;Month)&lt;/P&gt;
&lt;P&gt;Then you should be able to use it as dimension. You may also need to use a set expression to remove a selection in Month, e.g. Sum({&amp;lt;Month=&amp;nbsp; &amp;gt;} Counts).&lt;/P&gt;</description>
      <pubDate>Mon, 20 May 2024 15:44:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Automate/Using-RangeSum-and-Aggr-in-Script-or-Dimension/m-p/2454272#M4050</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2024-05-20T15:44:56Z</dc:date>
    </item>
    <item>
      <title>Re: Using RangeSum and Aggr in Script or Dimension</title>
      <link>https://community.qlik.com/t5/Qlik-Automate/Using-RangeSum-and-Aggr-in-Script-or-Dimension/m-p/2454353#M4051</link>
      <description>&lt;P&gt;I tried your solution, but when I use the above aggr function as a dimension, it does the sum on Month and does not do a rolling 3 month calculation.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Krish_0-1716240384304.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/166458i3E74F0ED08DFCDD1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Krish_0-1716240384304.png" alt="Krish_0-1716240384304.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 May 2024 21:26:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Automate/Using-RangeSum-and-Aggr-in-Script-or-Dimension/m-p/2454353#M4051</guid>
      <dc:creator>Krish</dc:creator>
      <dc:date>2024-05-20T21:26:30Z</dc:date>
    </item>
  </channel>
</rss>

