<?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 Avg(Aggr) formula in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Avg-Aggr-formula/m-p/1896230#M73936</link>
    <description>&lt;P&gt;Hello, I'm working on set analysis formula. I have to create a bar graph that will show distribution of people by departments, by age for a particular period of time(2021). During one year person can move from one department to another and from one age band to another(get older).&lt;/P&gt;
&lt;P&gt;So I'm trying to create a formula with avg and aggr, but it's not working. Can you please help?&lt;/P&gt;
&lt;P&gt;This is my formula&lt;/P&gt;
&lt;P&gt;avg(aggr(avg({&amp;lt; Year = {'2021'}&amp;gt;}&lt;BR /&gt;aggr({&amp;lt; Year= {'2021'}&amp;gt;}&lt;BR /&gt;avg({&amp;lt;Year = {'2021'}&amp;gt;} &lt;BR /&gt;aggr({&amp;lt;Year = {'2021'}&amp;gt;}&lt;BR /&gt;sum({&amp;lt;Year= {'2021'}&amp;gt;}HeadCount),MonthID))&lt;BR /&gt;,AgeBand)),Dep1))&lt;/P&gt;
&lt;P&gt;Also, I was trying this formula, but it is not giving me the exact result(close, but not exact number)&lt;/P&gt;
&lt;P&gt;avg(aggr(sum({&amp;lt;Year = {'2021'}&amp;gt;}HeadCount),MonthID, AgeBand,Dep1))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ethel_0-1645567132427.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/72862i8701E02AF8974048/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ethel_0-1645567132427.png" alt="Ethel_0-1645567132427.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks a lot in advance!&lt;/P&gt;</description>
    <pubDate>Tue, 22 Feb 2022 22:08:20 GMT</pubDate>
    <dc:creator>Ethel</dc:creator>
    <dc:date>2022-02-22T22:08:20Z</dc:date>
    <item>
      <title>Avg(Aggr) formula</title>
      <link>https://community.qlik.com/t5/App-Development/Avg-Aggr-formula/m-p/1896230#M73936</link>
      <description>&lt;P&gt;Hello, I'm working on set analysis formula. I have to create a bar graph that will show distribution of people by departments, by age for a particular period of time(2021). During one year person can move from one department to another and from one age band to another(get older).&lt;/P&gt;
&lt;P&gt;So I'm trying to create a formula with avg and aggr, but it's not working. Can you please help?&lt;/P&gt;
&lt;P&gt;This is my formula&lt;/P&gt;
&lt;P&gt;avg(aggr(avg({&amp;lt; Year = {'2021'}&amp;gt;}&lt;BR /&gt;aggr({&amp;lt; Year= {'2021'}&amp;gt;}&lt;BR /&gt;avg({&amp;lt;Year = {'2021'}&amp;gt;} &lt;BR /&gt;aggr({&amp;lt;Year = {'2021'}&amp;gt;}&lt;BR /&gt;sum({&amp;lt;Year= {'2021'}&amp;gt;}HeadCount),MonthID))&lt;BR /&gt;,AgeBand)),Dep1))&lt;/P&gt;
&lt;P&gt;Also, I was trying this formula, but it is not giving me the exact result(close, but not exact number)&lt;/P&gt;
&lt;P&gt;avg(aggr(sum({&amp;lt;Year = {'2021'}&amp;gt;}HeadCount),MonthID, AgeBand,Dep1))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ethel_0-1645567132427.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/72862i8701E02AF8974048/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ethel_0-1645567132427.png" alt="Ethel_0-1645567132427.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks a lot in advance!&lt;/P&gt;</description>
      <pubDate>Tue, 22 Feb 2022 22:08:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Avg-Aggr-formula/m-p/1896230#M73936</guid>
      <dc:creator>Ethel</dc:creator>
      <dc:date>2022-02-22T22:08:20Z</dc:date>
    </item>
  </channel>
</rss>

