<?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: Avg and Stdev to consider nulls values in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Avg-and-Stdev-to-consider-nulls-values/m-p/388027#M486921</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok. I'll discover that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 27 Feb 2013 13:11:26 GMT</pubDate>
    <dc:creator>wkolbnik</dc:creator>
    <dc:date>2013-02-27T13:11:26Z</dc:date>
    <item>
      <title>Avg and Stdev to consider nulls values</title>
      <link>https://community.qlik.com/t5/QlikView/Avg-and-Stdev-to-consider-nulls-values/m-p/388021#M486915</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, guys!&lt;/P&gt;&lt;P&gt;How to get AVG function &lt;SPAN style="color: #000000; font-family: arial, sans-serif; background-color: #ffffff;"&gt;consider&lt;/SPAN&gt; null values inside AGGR funtion?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example we selected three dates. What we need is:&lt;/P&gt;&lt;P&gt;1) Aggregate Item Sales by Dates. So we have 3 values for each Item. For that purpose I use "AGGR(Sum(Sales),Date,Item)"&lt;/P&gt;&lt;P&gt;2) &lt;SPAN style="color: #000000; font-family: arial, sans-serif; background-color: #ffffff;"&gt;Calculate AVG from this 3 values.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: arial, sans-serif; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Problem: If in Source Data there is no row with Sales for that Date, AGGR(Sum(Sales),Date,Item) returns null, instead of Zero.&lt;/P&gt;&lt;P&gt;AVG function make calculation only among values, whitch are not Nulls. So average becomes wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to solve that problem? It is not so impotant for calculating Average, because there is another way to calculate it, but I need it to behave that way &lt;/P&gt;&lt;P&gt;for STDEV function.&lt;/P&gt;&lt;P&gt;If it is impossible, I dont understand how to make XYZ-analisys work in Qlikview at all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We thought about unnormalization source data or something, but we think this not the better way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="33966" class="jive-image-thumbnail jive-image" onclick="" alt="Qlikview question.png" src="/legacyfs/online/33966_Qlikview question.png" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Source data looks like this &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="33974" class="jive-image-thumbnail jive-image" onclick="" alt="Qlikview-Data structure.png" src="/legacyfs/online/33974_Qlikview-Data structure.png" width="450" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Feb 2013 10:36:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Avg-and-Stdev-to-consider-nulls-values/m-p/388021#M486915</guid>
      <dc:creator>wkolbnik</dc:creator>
      <dc:date>2013-02-27T10:36:43Z</dc:date>
    </item>
    <item>
      <title>Re: Avg and Stdev to consider nulls values</title>
      <link>https://community.qlik.com/t5/QlikView/Avg-and-Stdev-to-consider-nulls-values/m-p/388022#M486916</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;Try &lt;SPAN style="text-decoration: line-through;"&gt;AGGR(rangesum(0,Sum(Sales)),Date,Item)&lt;/SPAN&gt; won't work. Maybe this will: &lt;/SPAN&gt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;sum(Sales)/count(DISTINCT Date])&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Feb 2013 10:54:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Avg-and-Stdev-to-consider-nulls-values/m-p/388022#M486916</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-02-27T10:54:23Z</dc:date>
    </item>
    <item>
      <title>Re: Avg and Stdev to consider nulls values</title>
      <link>https://community.qlik.com/t5/QlikView/Avg-and-Stdev-to-consider-nulls-values/m-p/388023#M486917</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I already tried this way of thinking. On the picture where "Right average" &lt;/P&gt;&lt;P&gt; As I said It will work for Average, but what to do with Stdev?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Feb 2013 11:09:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Avg-and-Stdev-to-consider-nulls-values/m-p/388023#M486917</guid>
      <dc:creator>wkolbnik</dc:creator>
      <dc:date>2013-02-27T11:09:17Z</dc:date>
    </item>
    <item>
      <title>Re: Avg and Stdev to consider nulls values</title>
      <link>https://community.qlik.com/t5/QlikView/Avg-and-Stdev-to-consider-nulls-values/m-p/388024#M486918</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you using a master calender that contains all dates in that range? &lt;/P&gt;&lt;P&gt;I think this should solve your issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See for example Henric's blog post here:&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" class="loading active_link" href="https://community.qlik.com/blogs/qlikviewdesignblog/2012/10/16/the-master-calendar" title="http://community.qlik.com/blogs/qlikviewdesignblog/2012/10/16/the-master-calendar"&gt;http://community.qlik.com/blogs/qlikviewdesignblog/2012/10/16/the-master-calendar&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or search the forum for master calender, there are tons of threads.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Feb 2013 11:42:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Avg-and-Stdev-to-consider-nulls-values/m-p/388024#M486918</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2013-02-27T11:42:33Z</dc:date>
    </item>
    <item>
      <title>Re: Avg and Stdev to consider nulls values</title>
      <link>https://community.qlik.com/t5/QlikView/Avg-and-Stdev-to-consider-nulls-values/m-p/388025#M486919</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;QlikView does the correct thing here - it divides by the number of &lt;EM&gt;&lt;STRONG&gt;possible&lt;/STRONG&gt;&lt;/EM&gt; dates: Possible in relation to the dimensional value. But you want to divide by all dates. Hence, Sum(Sales)/Count(distinct total Date) should do the trick.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="33979" class="jive-image-thumbnail jive-image" onclick="" alt="Null_In_Average.png" src="https://community.qlik.com/legacyfs/online/33979_Null_In_Average.png" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Feb 2013 12:38:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Avg-and-Stdev-to-consider-nulls-values/m-p/388025#M486919</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2013-02-27T12:38:56Z</dc:date>
    </item>
    <item>
      <title>Re: Avg and Stdev to consider nulls values</title>
      <link>https://community.qlik.com/t5/QlikView/Avg-and-Stdev-to-consider-nulls-values/m-p/388026#M486920</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I already tried this way of thinking. On the picture where "Right average"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As I said&lt;/P&gt;&lt;P&gt;It will work for Average, but what to do with Stdev?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Feb 2013 13:03:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Avg-and-Stdev-to-consider-nulls-values/m-p/388026#M486920</guid>
      <dc:creator>wkolbnik</dc:creator>
      <dc:date>2013-02-27T13:03:05Z</dc:date>
    </item>
    <item>
      <title>Re: Avg and Stdev to consider nulls values</title>
      <link>https://community.qlik.com/t5/QlikView/Avg-and-Stdev-to-consider-nulls-values/m-p/388027#M486921</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok. I'll discover that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Feb 2013 13:11:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Avg-and-Stdev-to-consider-nulls-values/m-p/388027#M486921</guid>
      <dc:creator>wkolbnik</dc:creator>
      <dc:date>2013-02-27T13:11:26Z</dc:date>
    </item>
    <item>
      <title>Re: Avg and Stdev to consider nulls values</title>
      <link>https://community.qlik.com/t5/QlikView/Avg-and-Stdev-to-consider-nulls-values/m-p/388028#M486922</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You're right. Then I do not see any other solution than generating the missing combinations and filling these with zeros. (See more on &lt;A _jive_internal="true" class="loading" href="https://community.qlik.com/docs/DOC-3786" title="http://community.qlik.com/docs/DOC-3786"&gt;http://community.qlik.com/docs/DOC-3786&lt;/A&gt; in the section "Generating all combinations of several fields - Cartesian product using Join")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I realize that this may lead to too many records, and so it might not be possible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Feb 2013 13:39:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Avg-and-Stdev-to-consider-nulls-values/m-p/388028#M486922</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2013-02-27T13:39:49Z</dc:date>
    </item>
    <item>
      <title>Re: Avg and Stdev to consider nulls values</title>
      <link>https://community.qlik.com/t5/QlikView/Avg-and-Stdev-to-consider-nulls-values/m-p/1761859#M486923</link>
      <description>&lt;P&gt;I&amp;nbsp;have a similar problem for Stdev() function.&lt;BR /&gt;Solution with generating the missing combinations, not realistic for my data set, too many records!&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;So mean, correct XYZ-analysis not possible in QlikVIew ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Nov 2020 09:15:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Avg-and-Stdev-to-consider-nulls-values/m-p/1761859#M486923</guid>
      <dc:creator>Fran_by</dc:creator>
      <dc:date>2020-11-16T09:15:50Z</dc:date>
    </item>
  </channel>
</rss>

