<?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/394518#M1157897</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, but I'm trying to do this in a Pivot Table and it seems to be working at Dimensionality=2, but not 1 or 0.&amp;nbsp; I've been playing around with the formula but still haven't found the answer.&amp;nbsp; Any other suggestions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think part of the problem is the field/number I want to be a weighted average is already an "average" number (i.e. Avg. Rev).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've attached a file with sample data, this time trying to calculate average Margin%.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 04 Feb 2013 21:02:36 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-02-04T21:02:36Z</dc:date>
    <item>
      <title>Help with Weighted Averages</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Weighted-Averages/m-p/394516#M1157895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've searched but haven't found my solution.&amp;nbsp; I need to create a weighted average.&amp;nbsp; I want to weight it based on LinesNr.&amp;nbsp; The measure I want to weight is Rev.&amp;nbsp; I created a simple expression that seems to work at the subtotal level, (2?), but not the line-item level (3?).&amp;nbsp; It is LW_Avg = Sum(Rev) * Sum(LinesNr).&amp;nbsp; Then I created another expression which is LW_Avg / LinesNr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the proper way to get a weighted average at the right subtotal level?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Feb 2013 19:26:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Weighted-Averages/m-p/394516#M1157895</guid>
      <dc:creator />
      <dc:date>2013-02-01T19:26:13Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Weighted Averages</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Weighted-Averages/m-p/394517#M1157896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could be &lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;= Sum(Rev * LinesNr) / Sum(&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;LinesNr&lt;/SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;With one or two expressions, it is up to you.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;JG&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Feb 2013 20:39:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Weighted-Averages/m-p/394517#M1157896</guid>
      <dc:creator />
      <dc:date>2013-02-01T20:39:38Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Weighted Averages</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Weighted-Averages/m-p/394518#M1157897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, but I'm trying to do this in a Pivot Table and it seems to be working at Dimensionality=2, but not 1 or 0.&amp;nbsp; I've been playing around with the formula but still haven't found the answer.&amp;nbsp; Any other suggestions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think part of the problem is the field/number I want to be a weighted average is already an "average" number (i.e. Avg. Rev).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've attached a file with sample data, this time trying to calculate average Margin%.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Feb 2013 21:02:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Weighted-Averages/m-p/394518#M1157897</guid>
      <dc:creator />
      <dc:date>2013-02-04T21:02:36Z</dc:date>
    </item>
  </channel>
</rss>

