<?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>article Average Calculation in Member Articles</title>
    <link>https://community.qlik.com/t5/Member-Articles/Average-Calculation/ta-p/1615831</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am a beginner user in Qlik. Recently the developer made a table where I have a number of items and net sales sold in every country.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I would like to calculate the average item price in the same table by using an expression:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Sum({&amp;lt;[Flag.Current]={1}&amp;gt;}[#NetSales]/[#SalesQuantity])&amp;nbsp;&lt;/P&gt;&lt;P&gt;I basically took NetSales expression and tried to divide it in Sales Quantity, this is what I would do in a calculator, but it, of course, does not work in QS.&lt;/P&gt;&lt;P&gt;Could you please help me?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 21 Sep 2022 17:07:35 GMT</pubDate>
    <dc:creator>Elkhan</dc:creator>
    <dc:date>2022-09-21T17:07:35Z</dc:date>
    <item>
      <title>Average Calculation</title>
      <link>https://community.qlik.com/t5/Member-Articles/Average-Calculation/ta-p/1615831</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am a beginner user in Qlik. Recently the developer made a table where I have a number of items and net sales sold in every country.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I would like to calculate the average item price in the same table by using an expression:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Sum({&amp;lt;[Flag.Current]={1}&amp;gt;}[#NetSales]/[#SalesQuantity])&amp;nbsp;&lt;/P&gt;&lt;P&gt;I basically took NetSales expression and tried to divide it in Sales Quantity, this is what I would do in a calculator, but it, of course, does not work in QS.&lt;/P&gt;&lt;P&gt;Could you please help me?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Sep 2022 17:07:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Member-Articles/Average-Calculation/ta-p/1615831</guid>
      <dc:creator>Elkhan</dc:creator>
      <dc:date>2022-09-21T17:07:35Z</dc:date>
    </item>
    <item>
      <title>Re: Average Calculation</title>
      <link>https://community.qlik.com/t5/Member-Articles/Average-Calculation/tac-p/1618543#M507</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;The expression summarizes the unit prices into one value, not counting the average unit price. The question is what average do you want to calculate, try the following:&lt;/P&gt;&lt;P&gt;1) For the weighted average, try the following expression (recommended)&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Sum({&amp;lt;[Flag.Current]={1}&amp;gt;}[#NetSales]) /Sum({&amp;lt;[Flag.Current]={1}&amp;gt;}[#SalesQuantity])&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;2) For the average absolute value of unit prices, ask the developer to create a new field in the data model in which the unit price per line is calculated in the script and then just use the AVG function in the table AVG(DISTINCT #UnitPrice).&lt;/P&gt;&lt;P&gt;RudyK&lt;/P&gt;</description>
      <pubDate>Thu, 29 Aug 2019 21:26:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Member-Articles/Average-Calculation/tac-p/1618543#M507</guid>
      <dc:creator>RudyK</dc:creator>
      <dc:date>2019-08-29T21:26:45Z</dc:date>
    </item>
  </channel>
</rss>

