<?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 Trouble with getting average over selected months in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Trouble-with-getting-average-over-selected-months/m-p/239339#M503853</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hi Jon,&lt;/P&gt;&lt;P&gt;use AGGR function.&lt;/P&gt;&lt;P&gt;Something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;&lt;BR /&gt;=Sum(aggr(count(distinct Member),YourMonths)) / Count(distinct YourMonths)&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Alex&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 12 May 2010 18:10:18 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-05-12T18:10:18Z</dc:date>
    <item>
      <title>Trouble with getting average over selected months</title>
      <link>https://community.qlik.com/t5/QlikView/Trouble-with-getting-average-over-selected-months/m-p/239338#M503852</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I am still fairly new to Qlikview so hopefully I can articulate my question. Currently I am displaying a field that has this&lt;/P&gt;&lt;P&gt;count(distinct Member)&lt;/P&gt;&lt;P&gt;And this will display the unique member count over the selected period of time (the selection is always in whole months). What I would like to display is the average number of members per month or:&lt;/P&gt;&lt;P&gt;(count(distinct (Members for first month selected)) + count(distinct (Members for the second month selected)) +.......+ count( distinct (Members for the Last month selected)))/ count(distinct [Submit MonthStart Dt]))&lt;/P&gt;&lt;P&gt;The denominator I know how to do and that will display the month count for me. The Numerator is the part I am having a problem with. I am trying to make it so no matter how many months are selected the same piece of code will work. Does anyone know a way I can do this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for looking at my issue,&lt;/P&gt;&lt;P&gt;Jon&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 May 2010 17:25:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trouble-with-getting-average-over-selected-months/m-p/239338#M503852</guid>
      <dc:creator />
      <dc:date>2010-05-12T17:25:41Z</dc:date>
    </item>
    <item>
      <title>Trouble with getting average over selected months</title>
      <link>https://community.qlik.com/t5/QlikView/Trouble-with-getting-average-over-selected-months/m-p/239339#M503853</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hi Jon,&lt;/P&gt;&lt;P&gt;use AGGR function.&lt;/P&gt;&lt;P&gt;Something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;&lt;BR /&gt;=Sum(aggr(count(distinct Member),YourMonths)) / Count(distinct YourMonths)&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Alex&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 May 2010 18:10:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trouble-with-getting-average-over-selected-months/m-p/239339#M503853</guid>
      <dc:creator />
      <dc:date>2010-05-12T18:10:18Z</dc:date>
    </item>
    <item>
      <title>Trouble with getting average over selected months</title>
      <link>https://community.qlik.com/t5/QlikView/Trouble-with-getting-average-over-selected-months/m-p/239340#M503854</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yep. Or even more simply:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;avg(aggr(count(distinct Member),YourMonths))&lt;/P&gt;&lt;P&gt;The aggr() function essentially tells it to make a little temporary table with "YourMonths" as the dimension, and count(distinct Member) as the expression. Then you tell it you want the avg() of those, giving you your average members per month. You don't actually need to count distinct YourMonths yourself, because that's exactly how many rows the little temporary table will have, so that's what the avg() will use. (Crossing fingers that I'm right. *chuckle*)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 May 2010 01:07:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trouble-with-getting-average-over-selected-months/m-p/239340#M503854</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-05-13T01:07:12Z</dc:date>
    </item>
  </channel>
</rss>

