<?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 Need help in calculation in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Need-help-in-calculation/m-p/194540#M504148</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 think it's just a problem of definition of your average.&lt;/P&gt;&lt;P&gt;with the first formula :&lt;/P&gt;&lt;P&gt;(6 orders / 3 customer ) / (2 month) = 1 =&amp;gt; it's the average number of orders by customer and by month&lt;/P&gt;&lt;P&gt;with the second formula&lt;/P&gt;&lt;P&gt;( ( 4 orders / 3 customers) in november + ( 2 orders / 2 customers) in december) / 2 = 0.5 * ( 4/3 + 1) = 1.17&lt;/P&gt;&lt;P&gt;=&amp;gt; it's the month-average of the number of orders by customer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;jj&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 24 Dec 2009 19:28:23 GMT</pubDate>
    <dc:creator />
    <dc:date>2009-12-24T19:28:23Z</dc:date>
    <item>
      <title>Need help in calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-calculation/m-p/194534#M504140</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all!&lt;/P&gt;&lt;P&gt;We have two tables (see attached qvw):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;Dates:&lt;BR /&gt;LOAD * INLINE&lt;BR /&gt;[date_c, month&lt;BR /&gt;2009-11-1, 11&lt;BR /&gt;2009-11-1, 11&lt;BR /&gt;2009-11-2, 11&lt;BR /&gt;2009-12-1, 12&lt;BR /&gt;2009-12-1, 12&lt;BR /&gt;];&lt;BR /&gt;Orders:&lt;BR /&gt;LOAD * INLINE&lt;BR /&gt;[date_c, customer, ordercnt&lt;BR /&gt;2009-11-1, first, 1&lt;BR /&gt;2009-11-1, second, 1&lt;BR /&gt;2009-11-2, first, 1&lt;BR /&gt;2009-12-1, first, 1&lt;BR /&gt;2009-12-1, second, 1&lt;BR /&gt;];&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;And we have text object with formula: =Sum(ordercnt)/Count(Distinct customer)&lt;/P&gt;&lt;P&gt;In November the result is 1,5. This is correct. (We have 3 orders and two customers).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In December the result is 1. This is correct. (We have 2 orders and two customers).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Without selections result is 2,5. This is correct too. (We have 5 orders and only two customers).&lt;BR /&gt;But i need somthing different. I need 1,25 in result expresion. (1,5+1)/2 (Average value of this expression in two months)&lt;/P&gt;&lt;P&gt;Thnx&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Dec 2009 00:55:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-calculation/m-p/194534#M504140</guid>
      <dc:creator />
      <dc:date>2009-12-22T00:55:11Z</dc:date>
    </item>
    <item>
      <title>Need help in calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-calculation/m-p/194535#M504141</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;=(Sum(ordercnt)/Count(Distinct customer))/Count(DISTINCT month)&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Dec 2009 01:05:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-calculation/m-p/194535#M504141</guid>
      <dc:creator />
      <dc:date>2009-12-22T01:05:01Z</dc:date>
    </item>
    <item>
      <title>Need help in calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-calculation/m-p/194536#M504144</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;replace your expression in the text box with&lt;/P&gt;&lt;P&gt;=avg(aggr(Sum(ordercnt)/Count(Distinct customer) , month))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;jj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Dec 2009 01:05:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-calculation/m-p/194536#M504144</guid>
      <dc:creator />
      <dc:date>2009-12-22T01:05:56Z</dc:date>
    </item>
    <item>
      <title>Need help in calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-calculation/m-p/194537#M504145</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was putting that together right before you posted it; the AGGR function is the best way to solve this. &lt;IMG alt="Yes" src="http://community.qlik.com/emoticons/emotion-21.gif" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Dec 2009 01:11:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-calculation/m-p/194537#M504145</guid>
      <dc:creator />
      <dc:date>2009-12-22T01:11:44Z</dc:date>
    </item>
    <item>
      <title>Need help in calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-calculation/m-p/194538#M504146</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Jason, I made some progress &lt;IMG alt="Smile" src="http://community.qlik.com/emoticons/emotion-1.gif" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Dec 2009 01:14:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-calculation/m-p/194538#M504146</guid>
      <dc:creator />
      <dc:date>2009-12-22T01:14:47Z</dc:date>
    </item>
    <item>
      <title>Need help in calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-calculation/m-p/194539#M504147</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;But i change rules at play)&lt;/P&gt;&lt;P&gt;Lets add one column and one row to Orders table:&lt;BR /&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;Orders:&lt;BR /&gt;LOAD * INLINE&lt;BR /&gt;[date_c, customer, region, ordercnt&lt;BR /&gt;2009-11-1, first, a, 1&lt;BR /&gt;2009-11-1, second, b, 1&lt;BR /&gt;2009-11-2, first, a, 1&lt;BR /&gt;2009-11-2, third, a, 1&lt;BR /&gt;2009-12-1, first, a, 1&lt;BR /&gt;2009-12-1, second, b, 1&lt;BR /&gt;];&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;And create bar chart with one dimension "Region". And expression "Sum(ordercnt)/Count(Distinct customer)"&lt;BR /&gt;&lt;BR /&gt;Region A in november got 1,5. In december 1&lt;BR /&gt;Without selections result is 2, but i need 1,25&lt;BR /&gt;With formula =(Sum(ordercnt)/Count(Distinct customer))/Count(DISTINCT month) result is 1&lt;BR /&gt;With formula=avg(aggr(Sum(ordercnt)/Count(Distinct customer) , month)) result is 1,17 (?)&lt;BR /&gt; &lt;BR /&gt;Now i am working in 8,5 version &lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Dec 2009 15:17:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-calculation/m-p/194539#M504147</guid>
      <dc:creator />
      <dc:date>2009-12-23T15:17:39Z</dc:date>
    </item>
    <item>
      <title>Need help in calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-calculation/m-p/194540#M504148</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 think it's just a problem of definition of your average.&lt;/P&gt;&lt;P&gt;with the first formula :&lt;/P&gt;&lt;P&gt;(6 orders / 3 customer ) / (2 month) = 1 =&amp;gt; it's the average number of orders by customer and by month&lt;/P&gt;&lt;P&gt;with the second formula&lt;/P&gt;&lt;P&gt;( ( 4 orders / 3 customers) in november + ( 2 orders / 2 customers) in december) / 2 = 0.5 * ( 4/3 + 1) = 1.17&lt;/P&gt;&lt;P&gt;=&amp;gt; it's the month-average of the number of orders by customer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;jj&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Dec 2009 19:28:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-calculation/m-p/194540#M504148</guid>
      <dc:creator />
      <dc:date>2009-12-24T19:28:23Z</dc:date>
    </item>
  </channel>
</rss>

