<?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 How to do weighted average in Qlikview? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-do-weighted-average-in-Qlikview/m-p/1314122#M847448</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I am using the below formula to find average value for my analysis:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=AGGR(AVG({&amp;lt;[Service Type]={'Transaction Cost'}&amp;gt;} &lt;SPAN style="font-size: 10pt;"&gt;[Total Services Charges]), Bank, Country))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem I am facing is average value including all the values is $195(example) but it is showing $90 which is average of average value of 2 countries i.e. average value for India is $80 and Average value for US is $100. So it is finding average of average instead it should do weighted average and return $95 instead of $90.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone help me with this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator />
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>How to do weighted average in Qlikview?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-do-weighted-average-in-Qlikview/m-p/1314122#M847448</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I am using the below formula to find average value for my analysis:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=AGGR(AVG({&amp;lt;[Service Type]={'Transaction Cost'}&amp;gt;} &lt;SPAN style="font-size: 10pt;"&gt;[Total Services Charges]), Bank, Country))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem I am facing is average value including all the values is $195(example) but it is showing $90 which is average of average value of 2 countries i.e. average value for India is $80 and Average value for US is $100. So it is finding average of average instead it should do weighted average and return $95 instead of $90.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone help me with this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-do-weighted-average-in-Qlikview/m-p/1314122#M847448</guid>
      <dc:creator />
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to do weighted average in Qlikview?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-do-weighted-average-in-Qlikview/m-p/1314123#M847450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your aggr() functions is missing an outer aggregation.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/3779"&gt;Use Aggregation Functions!&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To tell you more, it's necessary to know the data at more granular level, what you need to consider as grouping entities for your average and in which context you are using the expression.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/3208"&gt;Average – Which average?&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It might be enough to do something like&lt;/P&gt;&lt;P&gt;=&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Sum({&amp;lt;[Service Type]={'Transaction Cost'}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;[Total Services Charges]) / Count(Distinct Bank)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but that's a wild guess.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Mar 2017 20:40:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-do-weighted-average-in-Qlikview/m-p/1314123#M847450</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2017-03-30T20:40:50Z</dc:date>
    </item>
  </channel>
</rss>

