<?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 Weighted average calculation in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Weighted-average-calculation/m-p/1125584#M370497</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need a little help calculating weighted average in QlikView.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In database table, with customer orders, i have column for quantity and column for price per unit. I need to calculate weighted average price for customer in expression on bar chart:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(Price * Quantity)/ total Quantity = weighted average price for customer orders&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried few things, but I couldn't calculate it correctly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bojan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 03 Jun 2016 21:55:49 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-06-03T21:55:49Z</dc:date>
    <item>
      <title>Weighted average calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Weighted-average-calculation/m-p/1125584#M370497</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need a little help calculating weighted average in QlikView.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In database table, with customer orders, i have column for quantity and column for price per unit. I need to calculate weighted average price for customer in expression on bar chart:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(Price * Quantity)/ total Quantity = weighted average price for customer orders&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried few things, but I couldn't calculate it correctly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bojan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jun 2016 21:55:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Weighted-average-calculation/m-p/1125584#M370497</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-06-03T21:55:49Z</dc:date>
    </item>
    <item>
      <title>Re: Weighted average calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Weighted-average-calculation/m-p/1125585#M370498</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be this in a straight table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dimension:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;CustomerOrder&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum(Price * Quantity)/Sum(Quantity)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or this in a text box object&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum(Aggr(&lt;/STRONG&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;Sum(Price * Quantity)/Sum(Quantity), CustomerOrder))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jun 2016 22:34:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Weighted-average-calculation/m-p/1125585#M370498</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-06-03T22:34:53Z</dc:date>
    </item>
    <item>
      <title>Re: Weighted average calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Weighted-average-calculation/m-p/1125586#M370499</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This with expression helped, thank you very much, I wasn't thinking in that direction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jun 2016 20:39:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Weighted-average-calculation/m-p/1125586#M370499</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-06-06T20:39:16Z</dc:date>
    </item>
    <item>
      <title>Re: Weighted average calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Weighted-average-calculation/m-p/1125587#M370500</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;And how would you apply this solution (e.g. Sum(Price * Quantity)/Sum(Quantity))&amp;nbsp; in a set analysis?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;namely where you defined Price as&amp;nbsp; sum( {&amp;lt;measure={'Price}&amp;gt;} Value) and Quantity as sum( {&amp;lt;measure={'Quantity'}&amp;gt;} Value) &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jul 2018 19:19:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Weighted-average-calculation/m-p/1125587#M370500</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-07-16T19:19:46Z</dc:date>
    </item>
    <item>
      <title>Re: Weighted average calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Weighted-average-calculation/m-p/1125588#M370501</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I guess something like this&lt;/P&gt;&lt;P&gt;&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;&lt;STRONG&gt;Sum(Aggr(Sum({&amp;lt;measure={'Price}&amp;gt;} Value)*S&lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;um({&amp;lt;measure={'Quantity'}&amp;gt;} Value), Item))/&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;S&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;um({&amp;lt;measure={'Quantity'}&amp;gt;} Value)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jul 2018 19:21:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Weighted-average-calculation/m-p/1125588#M370501</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-07-16T19:21:57Z</dc:date>
    </item>
    <item>
      <title>Re: Weighted average calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Weighted-average-calculation/m-p/1768153#M454424</link>
      <description>&lt;P&gt;This is wonderful!!!! thankssssssssss!!!!!!!!!!!!!&lt;/P&gt;</description>
      <pubDate>Sun, 13 Dec 2020 18:16:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Weighted-average-calculation/m-p/1768153#M454424</guid>
      <dc:creator>veronicahernand</dc:creator>
      <dc:date>2020-12-13T18:16:43Z</dc:date>
    </item>
  </channel>
</rss>

