<?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: Average, Aggregate and Sum - Calculating the Average by Dimension in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Average-Aggregate-and-Sum-Calculating-the-Average-by-Dimension/m-p/1567299#M41387</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think you need the word NODISTINCT.&lt;/P&gt;&lt;P&gt;Aggr(NODISTINCT SUM(VALUE)/Count(HOSPITAL),STATE)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Qlik Aggregate.png" style="width: 886px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/9831i257004A378C71ED9/image-size/large?v=v2&amp;amp;px=999" role="button" title="Qlik Aggregate.png" alt="Qlik Aggregate.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 10 Apr 2019 05:23:34 GMT</pubDate>
    <dc:creator>mcsshg2011</dc:creator>
    <dc:date>2019-04-10T05:23:34Z</dc:date>
    <item>
      <title>Average, Aggregate and Sum - Calculating the Average by Dimension</title>
      <link>https://community.qlik.com/t5/App-Development/Average-Aggregate-and-Sum-Calculating-the-Average-by-Dimension/m-p/1567281#M41385</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I am having this problem calculating the Average of &lt;STRONG&gt;VALUE&lt;/STRONG&gt; to each &lt;STRONG&gt;STATE&lt;/STRONG&gt;.&lt;BR /&gt;&lt;BR /&gt;The formula that I used is&amp;nbsp;&lt;STRONG&gt;avg(aggr(sum(VALUE)/count(HOSPITAL),STATE))&amp;nbsp;&lt;/STRONG&gt;as shown in the image.&lt;BR /&gt;&lt;BR /&gt;So as you can see this work Ok for some rows (First occurrence of &lt;STRONG&gt;HOSPITAL&lt;/STRONG&gt;) but for other rows I am getting &lt;U&gt;Null&lt;/U&gt; (even that I just let "count(HOSPITAL)" instead of "&lt;STRONG&gt;sum(VALUE)/count(HOSPITAL)"&amp;nbsp;&lt;/STRONG&gt;) I will get Null.&lt;BR /&gt;&lt;BR /&gt;The goal is that each row has the average calculated correctly like others rows (values in the bottom table for each State).&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="Capturar.PNG" style="width: 870px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/9830i24A44BD6C31CB617/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capturar.PNG" alt="Capturar.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Someone know how can I solve this problem?&amp;nbsp;&lt;IMG id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://community.qlik.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am attaching the QVF that I used, is just an example with an inline.&lt;BR /&gt;&lt;BR /&gt;load * inline [&lt;BR /&gt;HOSPITAL,VALUE,STATE&lt;BR /&gt;A,100,PA&lt;BR /&gt;B,20,CE&lt;BR /&gt;C,30,PA&lt;BR /&gt;D,80,DF&lt;BR /&gt;E,20,CE&lt;BR /&gt;F,30,RJ&lt;BR /&gt;G,50,RJ&lt;BR /&gt;H,50,PA&lt;BR /&gt;];&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 21:05:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Average-Aggregate-and-Sum-Calculating-the-Average-by-Dimension/m-p/1567281#M41385</guid>
      <dc:creator>caiogil1</dc:creator>
      <dc:date>2024-11-16T21:05:02Z</dc:date>
    </item>
    <item>
      <title>Re: Average, Aggregate and Sum - Calculating the Average by Dimension</title>
      <link>https://community.qlik.com/t5/App-Development/Average-Aggregate-and-Sum-Calculating-the-Average-by-Dimension/m-p/1567299#M41387</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think you need the word NODISTINCT.&lt;/P&gt;&lt;P&gt;Aggr(NODISTINCT SUM(VALUE)/Count(HOSPITAL),STATE)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Qlik Aggregate.png" style="width: 886px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/9831i257004A378C71ED9/image-size/large?v=v2&amp;amp;px=999" role="button" title="Qlik Aggregate.png" alt="Qlik Aggregate.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Apr 2019 05:23:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Average-Aggregate-and-Sum-Calculating-the-Average-by-Dimension/m-p/1567299#M41387</guid>
      <dc:creator>mcsshg2011</dc:creator>
      <dc:date>2019-04-10T05:23:34Z</dc:date>
    </item>
  </channel>
</rss>

