<?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 Function in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/AVG-Function/m-p/253206#M1206582</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Yes, it's correct, I want to have an average duration only when both dates are set, in these case the right value is not AVGTOT (Total mode set to "Expression Total"), but rather AVGAVE (total mode set to "Avg of rows).&lt;/P&gt;&lt;P&gt;In this case, the right calculation is AVGAVE 'cause the right sum is 247, divided by 80 (the row where both GoodIssueDate and InsertOrderDate has a value) give me 3,0875.&lt;/P&gt;&lt;P&gt;If u compare column AVGAVE with value in column "Somma Giorni" u will see that in some circumstances u have wrong value in "Somma Giorni". It's double probably due to others dimensions that affect the whole result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What finally I'm looking for is to have the right calculation (in this case 3,0875) no matter which dimensions I've grouped by (see on the graph above, by MACROAREA_DESCR)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope it clarify my doubt.&lt;/P&gt;&lt;P&gt;I believe some other dimensions (not displayed) are creating confusion providing wrong figures&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Sergio&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 03 May 2010 13:30:07 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-05-03T13:30:07Z</dc:date>
    <item>
      <title>AVG Function</title>
      <link>https://community.qlik.com/t5/QlikView/AVG-Function/m-p/253198#M1206566</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm getting crazy with an easy request, but I'm new to qlikview.&lt;/P&gt;&lt;P&gt;I've OrderTable with Header and Position and I'm just calculating the lead time (GoodIssueDate - InsertOrderDate) grouping it by country.&lt;/P&gt;&lt;P&gt;Basically I need to have an avg lead time calculation :&lt;/P&gt;&lt;P&gt;And I put an expression Avg(GoodIssueDate - InsertOrderDate) and it works if I select "Average" under "Total Mode" on the Expressions tab&lt;/P&gt;&lt;P&gt;If I select Total Expressions it give me wrong result. Problem is that if I have all the line orders items result is ok, if I have it grouped by country it give me a wrong result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any Idea ?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Sergio&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Apr 2010 13:05:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/AVG-Function/m-p/253198#M1206566</guid>
      <dc:creator />
      <dc:date>2010-04-21T13:05:52Z</dc:date>
    </item>
    <item>
      <title>AVG Function</title>
      <link>https://community.qlik.com/t5/QlikView/AVG-Function/m-p/253199#M1206568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sergio,&lt;/P&gt;&lt;P&gt;Could u plz explain me abu ur fields. i.e goodissuedate and inserorderdate both 2 r date format. and also same format means dd/mm/yyyy.&lt;/P&gt;&lt;P&gt;-Sathish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Apr 2010 14:06:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/AVG-Function/m-p/253199#M1206568</guid>
      <dc:creator>sathishkumar_go</dc:creator>
      <dc:date>2010-04-21T14:06:33Z</dc:date>
    </item>
    <item>
      <title>AVG Function</title>
      <link>https://community.qlik.com/t5/QlikView/AVG-Function/m-p/253200#M1206570</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes both are the same.&lt;/P&gt;&lt;P&gt;Basically what I don't understand is the difference result I get with "Total Expression" undel Total Mode compared to "Average"....&lt;/P&gt;&lt;P&gt;If I extract record from the table graph in excel and I'm doing manual calculation it correspond to the "average" way.&lt;/P&gt;&lt;P&gt;So it seems that "Total Expression" calculate something more I can't see in the graph table (fields in other table...). Any idea about different behavior&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sergio&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Apr 2010 10:50:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/AVG-Function/m-p/253200#M1206570</guid>
      <dc:creator />
      <dc:date>2010-04-30T10:50:39Z</dc:date>
    </item>
    <item>
      <title>AVG Function</title>
      <link>https://community.qlik.com/t5/QlikView/AVG-Function/m-p/253201#M1206572</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As I understand,&lt;/P&gt;&lt;P&gt;You should use &lt;STRONG&gt;SUM&lt;/STRONG&gt; in order to show the results for "group by country".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try This&lt;/P&gt;&lt;P&gt;Avg(SUM(GoodIssueDate) - SUM(InsertOrderDate))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And please give feedback that it works or not&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Apr 2010 13:09:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/AVG-Function/m-p/253201#M1206572</guid>
      <dc:creator />
      <dc:date>2010-04-30T13:09:42Z</dc:date>
    </item>
    <item>
      <title>AVG Function</title>
      <link>https://community.qlik.com/t5/QlikView/AVG-Function/m-p/253202#M1206574</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;Dear Tu?ba,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;It doesn't works, it get me out zero, as result.&lt;/B&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;I've posted my file in &lt;A href="http://community.qlik.com/forums/t/28543.aspx"&gt;http://community.qlik.com/forums/t/28543.aspx&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Thanks for any support&lt;/P&gt;&lt;P&gt;Sergio&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 02 May 2010 09:08:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/AVG-Function/m-p/253202#M1206574</guid>
      <dc:creator />
      <dc:date>2010-05-02T09:08:59Z</dc:date>
    </item>
    <item>
      <title>AVG Function</title>
      <link>https://community.qlik.com/t5/QlikView/AVG-Function/m-p/253203#M1206576</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sergio,&lt;/P&gt;&lt;P&gt;Use this expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;if(isnull(GoodIssueDate - InsertOrderDate),0,GoodIssueDate - InsertOrderDate)&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;And set total mode as Average of rows and number format to integer.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 02 May 2010 18:15:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/AVG-Function/m-p/253203#M1206576</guid>
      <dc:creator />
      <dc:date>2010-05-02T18:15:42Z</dc:date>
    </item>
    <item>
      <title>AVG Function</title>
      <link>https://community.qlik.com/t5/QlikView/AVG-Function/m-p/253204#M1206578</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear dragonauta,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It doesn't provide me the right result. If I try to collect information by region or whatever (look to my file) it provide me the wrong result. It seems that collecting by some dimensions, system is using others dimensions that give me wrong avg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 May 2010 10:55:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/AVG-Function/m-p/253204#M1206578</guid>
      <dc:creator />
      <dc:date>2010-05-03T10:55:51Z</dc:date>
    </item>
    <item>
      <title>AVG Function</title>
      <link>https://community.qlik.com/t5/QlikView/AVG-Function/m-p/253205#M1206580</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Your data contains nulls for InsertOrderDate and also for GoodIssueDate, also for some entries you have no day difference between the two.&lt;/P&gt;&lt;P&gt;Is it correct that you want only an average duration of entries where both the dates are set?&lt;/P&gt;&lt;P&gt;For selection year 2010 you have 83 rows which have both dates set. The sum of delay days is 265, average 265/83=3.19&lt;/P&gt;&lt;P&gt;I see that you get this for the formula Avg(GoodIssueDate - InsertOrderDate) with Total Mode set to "Expression Totals". Do you also consider this the right value?&lt;/P&gt;&lt;P&gt;Saw that we end up in differences between AVGTOT and AVGAVE only when filtering on the OrderDate. If the filter is set on either InsertOrderDate or GoodIssueDate the values match.&lt;/P&gt;&lt;P&gt;I wasn't however able to see how AVGAVE is calculated for the OrderDate selection where we can have either InsertOrderDate and GoodIssueDate being NULL.&lt;/P&gt;&lt;P&gt;Juerg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 May 2010 13:05:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/AVG-Function/m-p/253205#M1206580</guid>
      <dc:creator />
      <dc:date>2010-05-03T13:05:22Z</dc:date>
    </item>
    <item>
      <title>AVG Function</title>
      <link>https://community.qlik.com/t5/QlikView/AVG-Function/m-p/253206#M1206582</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Yes, it's correct, I want to have an average duration only when both dates are set, in these case the right value is not AVGTOT (Total mode set to "Expression Total"), but rather AVGAVE (total mode set to "Avg of rows).&lt;/P&gt;&lt;P&gt;In this case, the right calculation is AVGAVE 'cause the right sum is 247, divided by 80 (the row where both GoodIssueDate and InsertOrderDate has a value) give me 3,0875.&lt;/P&gt;&lt;P&gt;If u compare column AVGAVE with value in column "Somma Giorni" u will see that in some circumstances u have wrong value in "Somma Giorni". It's double probably due to others dimensions that affect the whole result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What finally I'm looking for is to have the right calculation (in this case 3,0875) no matter which dimensions I've grouped by (see on the graph above, by MACROAREA_DESCR)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope it clarify my doubt.&lt;/P&gt;&lt;P&gt;I believe some other dimensions (not displayed) are creating confusion providing wrong figures&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Sergio&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 May 2010 13:30:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/AVG-Function/m-p/253206#M1206582</guid>
      <dc:creator />
      <dc:date>2010-05-03T13:30:07Z</dc:date>
    </item>
    <item>
      <title>AVG Function</title>
      <link>https://community.qlik.com/t5/QlikView/AVG-Function/m-p/253207#M1206583</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sergio&lt;/P&gt;&lt;P&gt;Can you explain why you are using SUM() for the SommaGiorni detail formula? This doubles in one case the 7, in the other the 9 days.&lt;/P&gt;&lt;P&gt;I have tried to look into the tables but can not find an explanation for the double count.&lt;/P&gt;&lt;P&gt;Juerg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 May 2010 14:35:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/AVG-Function/m-p/253207#M1206583</guid>
      <dc:creator />
      <dc:date>2010-05-03T14:35:28Z</dc:date>
    </item>
    <item>
      <title>AVG Function</title>
      <link>https://community.qlik.com/t5/QlikView/AVG-Function/m-p/253208#M1206584</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for all your feedback. I've solved it doing the calculation on load side, so it avoid any duplication and dirty data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Sergio&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 May 2010 08:21:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/AVG-Function/m-p/253208#M1206584</guid>
      <dc:creator />
      <dc:date>2010-05-18T08:21:41Z</dc:date>
    </item>
  </channel>
</rss>

