<?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: Help with Weighted Averages in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Help-with-Weighted-Averages/m-p/503412#M188094</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See attached qvw.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 02 Oct 2013 16:44:58 GMT</pubDate>
    <dc:creator>Gysbert_Wassenaar</dc:creator>
    <dc:date>2013-10-02T16:44:58Z</dc:date>
    <item>
      <title>Help with Weighted Averages</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Weighted-Averages/m-p/503411#M188093</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've got two questions regarding weighted averages.&amp;nbsp; Please see the attached document to better understand what I'm trying to accomplish.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have two tables - Invoices and Goals.&amp;nbsp; Goals are a set number of items that someone must sell.&amp;nbsp; The invoices are summed up by units to see how close to each goal we can be.&amp;nbsp; Each goal has a maximum percentage of 110%.&amp;nbsp; Each supplier's "% to Goal" should be the weighted average of the "% to Goal" for each of the products that they offer.&amp;nbsp; Products with no goal record (sum of goals = 0) should be excluded from the calculation but shown in the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my attached document supplier 001 has two products, with completion percentages of 50% and 110%.&amp;nbsp; The average of these two numbers is 80%, which is correct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Problem #1 - In the "Goal Detail" table the subtotal lines only calculate using the expression.&amp;nbsp; This means for supplier 001 we are showing a % to Goal of 63.6%.&amp;nbsp; This should be 80% which is the average of the two goals (110 + 50 / 2).&amp;nbsp; How can I fix this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Problem #2 - In the "Goal Summary" grid I have the same problem with % to Goal calculation.&amp;nbsp; How can I get this column to display an average of the percentages for each goal that supplier has?&amp;nbsp; I've tried using the Aggr() function in many forms with no luck.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The attached document is a simplified example of what I'm trying to accomplish.&amp;nbsp; In my real document I'll be building on this, as well as using some set analysis.&amp;nbsp; I've also included two different "% to Goal" columns - each is just a different way to do the calculation as it is now.&amp;nbsp; One references other expressions and one calculates it's own sums.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know if you need any more information.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be appreciated!&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Oct 2013 14:47:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Weighted-Averages/m-p/503411#M188093</guid>
      <dc:creator />
      <dc:date>2013-10-02T14:47:48Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Weighted Averages</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Weighted-Averages/m-p/503412#M188094</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See attached qvw.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Oct 2013 16:44:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Weighted-Averages/m-p/503412#M188094</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-10-02T16:44:58Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Weighted Averages</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Weighted-Averages/m-p/503413#M188095</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This was exactly what I was looking for.&amp;nbsp; I knew I was close with using AVG and AGGR, I just couldn't seem to get the dimensions correct.&amp;nbsp; Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Oct 2013 17:07:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Weighted-Averages/m-p/503413#M188095</guid>
      <dc:creator />
      <dc:date>2013-10-02T17:07:21Z</dc:date>
    </item>
  </channel>
</rss>

