<?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 Aggregate Average? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Aggregate-Average/m-p/821228#M1045182</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;Can someone help me with below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a formula that sums number of hours across a period of time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am dividing this by the unique employees over the same period so I can see the average amount of hours worked per employee.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attached is basically the output. As you can see, there is a gap of 2. Can someone help me explain what I can do to fix this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The only formula I'm using is sum(hours)/count(distinct(employees)).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This issue is, the line chart does not total to 62 but rather 64.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can see the unique employees for each month. The total unique employees is 127 (perhaps some more individuals were added/removed each month).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 25 Nov 2014 23:00:21 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-11-25T23:00:21Z</dc:date>
    <item>
      <title>Aggregate Average?</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregate-Average/m-p/821228#M1045182</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;Can someone help me with below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a formula that sums number of hours across a period of time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am dividing this by the unique employees over the same period so I can see the average amount of hours worked per employee.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attached is basically the output. As you can see, there is a gap of 2. Can someone help me explain what I can do to fix this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The only formula I'm using is sum(hours)/count(distinct(employees)).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This issue is, the line chart does not total to 62 but rather 64.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can see the unique employees for each month. The total unique employees is 127 (perhaps some more individuals were added/removed each month).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Nov 2014 23:00:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregate-Average/m-p/821228#M1045182</guid>
      <dc:creator />
      <dc:date>2014-11-25T23:00:21Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregate Average?</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregate-Average/m-p/821229#M1045183</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One thought:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;count( distinct employees)&amp;nbsp; will count the unique employees over the 3 months.&amp;nbsp; If the same employee was in more than one month, it will NOT double count that employee.&amp;nbsp; Is that what you want ? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To count unique employees in each month and then add up the monthly totals you could modify to&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;count( distinct&amp;nbsp;&amp;nbsp; Employees&amp;amp;Month)&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;... so that if the same employee was in multiple months , they would EACH count toward the grand total.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum(hours) will not have this issue&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Nov 2014 03:22:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregate-Average/m-p/821229#M1045183</guid>
      <dc:creator>JonnyPoole</dc:creator>
      <dc:date>2014-11-26T03:22:36Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregate Average?</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregate-Average/m-p/821230#M1045184</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;P&gt;floor(sum(hours)/count(distinct(employees)))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Nov 2014 03:32:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregate-Average/m-p/821230#M1045184</guid>
      <dc:creator />
      <dc:date>2014-11-26T03:32:26Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregate Average?</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregate-Average/m-p/821231#M1045185</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;Try this expression to get month wise employee count and sum upto total&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;count( distinct&amp;nbsp;&amp;nbsp; Employees&amp;amp;Month) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;OR&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Sum(Aggr(Count(Distinct Employees), Month))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Hope this helps you.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Jagan.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Nov 2014 03:58:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregate-Average/m-p/821231#M1045185</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2014-11-26T03:58:36Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregate Average?</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregate-Average/m-p/821232#M1045186</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;This is because you are trying to add ratios with different divisors (unique employees). In other words, the sum of the ratios (64) is not the same as the ratio of the sums (62). To sum the ratios, use this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum(Aggr(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;sum(hours)/count(distinct(employees)), MONTH))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where you must replace MONTH with the correct month field name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Nov 2014 05:37:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregate-Average/m-p/821232#M1045186</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2014-11-26T05:37:22Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregate Average?</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregate-Average/m-p/821233#M1045187</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks everyone. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I ended up using sum(WeeklyHours)/count(distinct(Employees&amp;amp;[Dimension]))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Nov 2014 05:45:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregate-Average/m-p/821233#M1045187</guid>
      <dc:creator />
      <dc:date>2014-11-26T05:45:57Z</dc:date>
    </item>
  </channel>
</rss>

