<?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 Calculate the average with missing data in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculate-the-average-with-missing-data/m-p/226866#M79031</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi James,&lt;/P&gt;&lt;P&gt;Please try the following expression instead of AVG(Sales).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;=sum(Sales)/count(TOTAL Month)&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Rgds,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 29 Jan 2010 12:47:54 GMT</pubDate>
    <dc:creator>amit_shetty78</dc:creator>
    <dc:date>2010-01-29T12:47:54Z</dc:date>
    <item>
      <title>Calculate the average with missing data</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-the-average-with-missing-data/m-p/226865#M79030</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I have a dataset which only stores monthly sales of materials when actual sales have occured.&lt;/P&gt;&lt;P&gt;When calculating the average, Qlikview doesn't take the months without sales into account.&lt;/P&gt;&lt;P&gt;I'm looking for a solution to calculate the average correct without adding extra records for the months without sales.&lt;/P&gt;&lt;P&gt;Here is screenshot of the situation:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="error loading image" class="jive-image error-loading-image" src="https://community.qlik.com/legacyfs/online/-988_sourceID:988" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The average sales based on the 4 months should be 87,5. Now Qlikview is only considering months 1-3.&lt;/P&gt;&lt;P&gt;Do you have any ideas? Thanks.&lt;/P&gt;&lt;P&gt;James.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jan 2010 12:21:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-the-average-with-missing-data/m-p/226865#M79030</guid>
      <dc:creator />
      <dc:date>2010-01-29T12:21:49Z</dc:date>
    </item>
    <item>
      <title>Calculate the average with missing data</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-the-average-with-missing-data/m-p/226866#M79031</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi James,&lt;/P&gt;&lt;P&gt;Please try the following expression instead of AVG(Sales).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;=sum(Sales)/count(TOTAL Month)&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Rgds,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jan 2010 12:47:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-the-average-with-missing-data/m-p/226866#M79031</guid>
      <dc:creator>amit_shetty78</dc:creator>
      <dc:date>2010-01-29T12:47:54Z</dc:date>
    </item>
    <item>
      <title>Calculate the average with missing data</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-the-average-with-missing-data/m-p/226867#M79032</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Amit,&lt;/P&gt;&lt;P&gt;When selection is made on material 1, then average is still not correct.&lt;/P&gt;&lt;P&gt;See screenshot:&lt;/P&gt;&lt;P&gt;&lt;A href="http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Discussions.Components.Files/11/1185.sales2.jpg"&gt;&lt;IMG alt="" border="0" src="http://community.qlik.com/resized-image.ashx/__size/550x0/__key/CommunityServer.Discussions.Components.Files/11/1185.sales2.jpg" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;James.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jan 2010 13:13:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-the-average-with-missing-data/m-p/226867#M79032</guid>
      <dc:creator />
      <dc:date>2010-01-29T13:13:36Z</dc:date>
    </item>
    <item>
      <title>Calculate the average with missing data</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-the-average-with-missing-data/m-p/226868#M79033</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi James,&lt;/P&gt;&lt;P&gt;This is because Material 1 is not associated to month 4. You would have noticed that when Material 1 was explicitly selected '4' was excluded from the month's selection making the count of months to 3.&lt;/P&gt;&lt;P&gt;One suggestion could be that instead of keeping the sales value in month 4 blank, you can put in sales value as 0 for Material 1 in the 4th Month.&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;Rgds, Amit.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jan 2010 14:51:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-the-average-with-missing-data/m-p/226868#M79033</guid>
      <dc:creator>amit_shetty78</dc:creator>
      <dc:date>2010-01-29T14:51:11Z</dc:date>
    </item>
    <item>
      <title>Calculate the average with missing data</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-the-average-with-missing-data/m-p/226869#M79034</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi Amit,&lt;/P&gt;&lt;P&gt;In order to keep the number of records as small as possible, I don't want to add records with zero sales as I mentioned before.&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;James.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 31 Jan 2010 00:18:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-the-average-with-missing-data/m-p/226869#M79034</guid>
      <dc:creator />
      <dc:date>2010-01-31T00:18:24Z</dc:date>
    </item>
  </channel>
</rss>

