<?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: Average selling price Calc in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Average-selling-price-Calc/m-p/778329#M1037812</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ahmed&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;quick question, what does Qty measures as I would assume that we looking at quantity of items, but you have negative values in your data source, Once I understand that I bliv we can come up with an appropriate formula&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;Dlamini&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 13 Jan 2015 09:46:27 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-01-13T09:46:27Z</dc:date>
    <item>
      <title>Average selling price Calc</title>
      <link>https://community.qlik.com/t5/QlikView/Average-selling-price-Calc/m-p/778322#M1037803</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a requirement like this: Calculate Average selling Price of Instruments. I am using expression like this but its giving me wrong Average.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;num&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ItemID&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'XT, GT'}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[TotalLineAmountInReportCurrency]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)/&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Count&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ItemID&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'XT', GT},Qty&amp;gt;}Distinct InvoicesourceCustId),'$##,##0') &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;I am Having Problem putting the Qty in the expression.&amp;nbsp; But i have to count/sum the Qty to get the average price.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Count/sum for quantity? Any feedback would be a great help.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Thnaks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Shan&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jan 2015 07:49:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-selling-price-Calc/m-p/778322#M1037803</guid>
      <dc:creator>AH</dc:creator>
      <dc:date>2015-01-13T07:49:04Z</dc:date>
    </item>
    <item>
      <title>Re: Average selling price Calc</title>
      <link>https://community.qlik.com/t5/QlikView/Average-selling-price-Calc/m-p/778323#M1037804</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use avg(aggr(yourexpression,fields))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jan 2015 07:58:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-selling-price-Calc/m-p/778323#M1037804</guid>
      <dc:creator />
      <dc:date>2015-01-13T07:58:57Z</dc:date>
    </item>
    <item>
      <title>Re: Average selling price Calc</title>
      <link>https://community.qlik.com/t5/QlikView/Average-selling-price-Calc/m-p/778324#M1037805</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you trying to do this calc?&lt;/P&gt;&lt;P&gt;(Sum(Amt)/Count(CustID))/ Sum(Qty)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is XT and GT two different ItemIDs? Then add quotes around each ItemID like below&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0000ff;"&gt;num&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;(&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0000ff;"&gt;Sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;ItemID&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;={'XT', 'GT'}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;[TotalLineAmountInReportCurrency]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;)/&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0000ff;"&gt;Count&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;ItemID&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;={'XT', 'GT'}&amp;gt;}Distinct InvoicesourceCustId)) / Sum(&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;{&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;ItemID&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;={'XT', 'GT'}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 11px;"&gt;Qty)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;,'$##,##0')&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jan 2015 08:00:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-selling-price-Calc/m-p/778324#M1037805</guid>
      <dc:creator>anbu1984</dc:creator>
      <dc:date>2015-01-13T08:00:00Z</dc:date>
    </item>
    <item>
      <title>Re: Average selling price Calc</title>
      <link>https://community.qlik.com/t5/QlikView/Average-selling-price-Calc/m-p/778325#M1037806</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Santosh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply but I dont get it what you said.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Shan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jan 2015 08:04:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-selling-price-Calc/m-p/778325#M1037806</guid>
      <dc:creator>AH</dc:creator>
      <dc:date>2015-01-13T08:04:06Z</dc:date>
    </item>
    <item>
      <title>Re: Average selling price Calc</title>
      <link>https://community.qlik.com/t5/QlikView/Average-selling-price-Calc/m-p/778326#M1037807</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The expression looks convincing but its not working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Shan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jan 2015 08:04:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-selling-price-Calc/m-p/778326#M1037807</guid>
      <dc:creator>AH</dc:creator>
      <dc:date>2015-01-13T08:04:39Z</dc:date>
    </item>
    <item>
      <title>Re: Average selling price Calc</title>
      <link>https://community.qlik.com/t5/QlikView/Average-selling-price-Calc/m-p/778327#M1037809</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you post sample data and expected output&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jan 2015 08:09:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-selling-price-Calc/m-p/778327#M1037809</guid>
      <dc:creator>anbu1984</dc:creator>
      <dc:date>2015-01-13T08:09:45Z</dc:date>
    </item>
    <item>
      <title>Re: Average selling price Calc</title>
      <link>https://community.qlik.com/t5/QlikView/Average-selling-price-Calc/m-p/778328#M1037811</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Anbu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to calculate the average for (CCP and CSA combination) , and (X1 and X25 Combination) . Please find the attach data file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The expected average for 1st combi should be around 1500 and for the second combo should be around 5000. But Thats just an idea i got from BA. Its not the exact figure any ballpark range should be fine if the calculation is ok.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Shan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jan 2015 08:30:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-selling-price-Calc/m-p/778328#M1037811</guid>
      <dc:creator>AH</dc:creator>
      <dc:date>2015-01-13T08:30:30Z</dc:date>
    </item>
    <item>
      <title>Re: Average selling price Calc</title>
      <link>https://community.qlik.com/t5/QlikView/Average-selling-price-Calc/m-p/778329#M1037812</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ahmed&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;quick question, what does Qty measures as I would assume that we looking at quantity of items, but you have negative values in your data source, Once I understand that I bliv we can come up with an appropriate formula&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;Dlamini&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jan 2015 09:46:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-selling-price-Calc/m-p/778329#M1037812</guid>
      <dc:creator />
      <dc:date>2015-01-13T09:46:27Z</dc:date>
    </item>
    <item>
      <title>Re: Average selling price Calc</title>
      <link>https://community.qlik.com/t5/QlikView/Average-selling-price-Calc/m-p/778330#M1037814</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dlamini,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Qty is the Quantity. Dont worry about the negative amount. Just consider them as Just number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Shan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jan 2015 09:49:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-selling-price-Calc/m-p/778330#M1037814</guid>
      <dc:creator>AH</dc:creator>
      <dc:date>2015-01-13T09:49:19Z</dc:date>
    </item>
  </channel>
</rss>

