<?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 on chart calculating incorrectly in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Average-on-chart-calculating-incorrectly/m-p/915794#M981986</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, Gysbert!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just in case anyone else might need the syntax:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=IF(GetCurrentField(MonthWeek) = 'Cal.MonthYear',&lt;/P&gt;&lt;P&gt;&amp;nbsp; Avg({&amp;lt;FullDate = {"&amp;gt;2014-08-01"}&amp;gt;} AGGR(Count(DISTINCT Fix.Key),Cal.MonthYear)),&lt;/P&gt;&lt;P&gt;&amp;nbsp; Avg({&amp;lt;FullDate = {"&amp;gt;2014-08-01"}&amp;gt;} AGGR(Count(DISTINCT Fix.Key),Cal.WeekStartMon))&lt;/P&gt;&lt;P&gt;&amp;nbsp; )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 10 Aug 2015 14:25:45 GMT</pubDate>
    <dc:creator>mikecrengland</dc:creator>
    <dc:date>2015-08-10T14:25:45Z</dc:date>
    <item>
      <title>Average on chart calculating incorrectly</title>
      <link>https://community.qlik.com/t5/QlikView/Average-on-chart-calculating-incorrectly/m-p/915789#M981981</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm new to QlikView and came across a problem I don't know how to solve. I have a chart that is showing aggregate data by month - the data is displaying correctly. However, the average line as well as the displayed average amount are showing incorrectly - the average shown is 713, but the actual average for the time period is 1188.25. &lt;/P&gt;&lt;P&gt;When I manually select the date range included in the actual data associated with this chart, the average shows correctly.&lt;/P&gt;&lt;P&gt;Is there a way to set up the chart to only look at the correct date range even when all selections are cleared and the date dimension goes further back in time than I need in the chart?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Aug 2015 14:45:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-on-chart-calculating-incorrectly/m-p/915789#M981981</guid>
      <dc:creator />
      <dc:date>2015-08-07T14:45:55Z</dc:date>
    </item>
    <item>
      <title>Re: Average on chart calculating incorrectly</title>
      <link>https://community.qlik.com/t5/QlikView/Average-on-chart-calculating-incorrectly/m-p/915790#M981982</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You probably want the average of the monthly values. I don't know the expression you use to calculate the monthly values. You need to embed that expression in the aggr function before you can calculate the average of it over the months: avg(aggr( ...your_expression_here... ), MonthYear))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And then you're using a cycle group, so the chart dimension will change. So you need something like avg(aggr( &lt;SPAN style="font-size: 13.3333330154419px;"&gt;...your_expression_here... ), $(='[' &amp;amp; GetCurrentField('CycleGroupNameHere') &amp;amp;']')))&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Aug 2015 15:14:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-on-chart-calculating-incorrectly/m-p/915790#M981982</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2015-08-07T15:14:52Z</dc:date>
    </item>
    <item>
      <title>Re: Average on chart calculating incorrectly</title>
      <link>https://community.qlik.com/t5/QlikView/Average-on-chart-calculating-incorrectly/m-p/915791#M981983</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Thanks for the feedback. Here is the average expression I am using currently:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Avg(AGGR(Count(DISTINCT Fix.Key),Cal.MonthYear)).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Cal is the date dimension and Fix is the dimension I'm measuring in the graph.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Aug 2015 17:02:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-on-chart-calculating-incorrectly/m-p/915791#M981983</guid>
      <dc:creator />
      <dc:date>2015-08-07T17:02:28Z</dc:date>
    </item>
    <item>
      <title>Re: Average on chart calculating incorrectly</title>
      <link>https://community.qlik.com/t5/QlikView/Average-on-chart-calculating-incorrectly/m-p/915792#M981984</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gysbert -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(I work with Brad) I don't think he emphasized enough the date problem. We have some data that starts in June, but the data he's trying to get an average on starts in September. What I think is happening is that the aggregation function is counting June, July and August in the average, bringing it down. We can't figure out how to eliminate those 'empty' months when selections are cleared. &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Thanks!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;mike&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 08 Aug 2015 16:37:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-on-chart-calculating-incorrectly/m-p/915792#M981984</guid>
      <dc:creator>mikecrengland</dc:creator>
      <dc:date>2015-08-08T16:37:25Z</dc:date>
    </item>
    <item>
      <title>Re: Average on chart calculating incorrectly</title>
      <link>https://community.qlik.com/t5/QlikView/Average-on-chart-calculating-incorrectly/m-p/915793#M981985</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;If you want to limit the months that the average is calculated over you can use a set analysis expression. Perhaps this one: &lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Count(&lt;STRONG style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;{&amp;lt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Cal.MonthYear&lt;/SPAN&gt;={'Sep-2014'}&amp;gt;}&lt;/STRONG&gt;DISTINCT Fix.Key&lt;/SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 08 Aug 2015 16:44:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-on-chart-calculating-incorrectly/m-p/915793#M981985</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2015-08-08T16:44:24Z</dc:date>
    </item>
    <item>
      <title>Re: Average on chart calculating incorrectly</title>
      <link>https://community.qlik.com/t5/QlikView/Average-on-chart-calculating-incorrectly/m-p/915794#M981986</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, Gysbert!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just in case anyone else might need the syntax:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=IF(GetCurrentField(MonthWeek) = 'Cal.MonthYear',&lt;/P&gt;&lt;P&gt;&amp;nbsp; Avg({&amp;lt;FullDate = {"&amp;gt;2014-08-01"}&amp;gt;} AGGR(Count(DISTINCT Fix.Key),Cal.MonthYear)),&lt;/P&gt;&lt;P&gt;&amp;nbsp; Avg({&amp;lt;FullDate = {"&amp;gt;2014-08-01"}&amp;gt;} AGGR(Count(DISTINCT Fix.Key),Cal.WeekStartMon))&lt;/P&gt;&lt;P&gt;&amp;nbsp; )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Aug 2015 14:25:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-on-chart-calculating-incorrectly/m-p/915794#M981986</guid>
      <dc:creator>mikecrengland</dc:creator>
      <dc:date>2015-08-10T14:25:45Z</dc:date>
    </item>
  </channel>
</rss>

