<?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 by month in a chart in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Average-by-month-in-a-chart/m-p/1253936#M396484</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Claus, for number 3) Ignore filters, you can set the expression posted by Sunny to:&lt;/P&gt;&lt;P&gt;Pick(Only({1} Dim), Sum({1}ODV_EH_MP), Avg({1}ODV_EH_MP))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 30 Nov 2016 14:10:12 GMT</pubDate>
    <dc:creator>rubenmarin</dc:creator>
    <dc:date>2016-11-30T14:10:12Z</dc:date>
    <item>
      <title>Average by month in a chart</title>
      <link>https://community.qlik.com/t5/QlikView/Average-by-month-in-a-chart/m-p/1253934#M396482</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 try to calculate an average by month and area in a chart.&lt;/P&gt;&lt;P&gt;I tried several suggestion from different sources but none fits my requirements to 100%.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My questions are:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; Is it possible to do the calculation of the sum per AREA for area 1 and 2 dynamical in one formula? &lt;BR /&gt; I tried this in the formula "sum per month" in my example. This works as long I don't calculate the average in the chart.&lt;BR /&gt; When I add the calculation of the average I get only one overall sum.&lt;BR /&gt; &lt;BR /&gt;Further any kind of filters should have no effect to the calculation. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="chart.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/145285_chart.JPG" style="width: 620px; height: 270px;" /&gt;&lt;/P&gt;&lt;P&gt;I attached my sample below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks for your support!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Claus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Nov 2016 13:57:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-by-month-in-a-chart/m-p/1253934#M396482</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-11-30T13:57:54Z</dc:date>
    </item>
    <item>
      <title>Re: Average by month in a chart</title>
      <link>https://community.qlik.com/t5/QlikView/Average-by-month-in-a-chart/m-p/1253935#M396483</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check the attached out&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Nov 2016 14:02:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-by-month-in-a-chart/m-p/1253935#M396483</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-11-30T14:02:09Z</dc:date>
    </item>
    <item>
      <title>Re: Average by month in a chart</title>
      <link>https://community.qlik.com/t5/QlikView/Average-by-month-in-a-chart/m-p/1253936#M396484</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Claus, for number 3) Ignore filters, you can set the expression posted by Sunny to:&lt;/P&gt;&lt;P&gt;Pick(Only({1} Dim), Sum({1}ODV_EH_MP), Avg({1}ODV_EH_MP))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Nov 2016 14:10:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-by-month-in-a-chart/m-p/1253936#M396484</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2016-11-30T14:10:12Z</dc:date>
    </item>
    <item>
      <title>Re: Average by month in a chart</title>
      <link>https://community.qlik.com/t5/QlikView/Average-by-month-in-a-chart/m-p/1253937#M396485</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Many thanks for your really fast answer!&lt;/P&gt;&lt;P&gt;It works correct, but I hoped there is a solution without changes on the script?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Claus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Nov 2016 14:25:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-by-month-in-a-chart/m-p/1253937#M396485</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-11-30T14:25:50Z</dc:date>
    </item>
    <item>
      <title>Re: Average by month in a chart</title>
      <link>https://community.qlik.com/t5/QlikView/Average-by-month-in-a-chart/m-p/1253938#M396486</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There might be a way (using ValueList), but it might get very messy.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Nov 2016 14:28:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-by-month-in-a-chart/m-p/1253938#M396486</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-11-30T14:28:34Z</dc:date>
    </item>
    <item>
      <title>Re: Average by month in a chart</title>
      <link>https://community.qlik.com/t5/QlikView/Average-by-month-in-a-chart/m-p/1253939#M396487</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Many thanks Ruben! This also working correct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Claus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Nov 2016 14:47:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-by-month-in-a-chart/m-p/1253939#M396487</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-11-30T14:47:37Z</dc:date>
    </item>
    <item>
      <title>Re: Average by month in a chart</title>
      <link>https://community.qlik.com/t5/QlikView/Average-by-month-in-a-chart/m-p/1253940#M396488</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, I guess its easier to add this inline table to the script instead of using the function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As far as I tested the DIM function I can add as many values as maybe needed in the future due to upcoming new&amp;nbsp; areas. This will help to solve my questions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks again and best regards,&lt;/P&gt;&lt;P&gt;Claus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Nov 2016 14:52:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-by-month-in-a-chart/m-p/1253940#M396488</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-11-30T14:52:05Z</dc:date>
    </item>
    <item>
      <title>Re: Average by month in a chart</title>
      <link>https://community.qlik.com/t5/QlikView/Average-by-month-in-a-chart/m-p/1253941#M396489</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as already mentioned the solution works perfect within a diagram or chart!&lt;/P&gt;&lt;P&gt;I adopted the solution to calculate Sales, Sell-out or Market Shares within diagrams and also within pivot charts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The calculation by the below example formula works for Sales or Sell-out aggregated by month perfect:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Pick(Only({1} Dim), SUM($(vShowVar_measure)), &lt;/P&gt;&lt;P&gt; sum( {1&amp;lt;MARKET=p(MARKET),PERIOD=p(PERIOD)&amp;gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TOTAL&amp;lt;PERIOD,MARKET,PRODUCT&amp;gt; ($(vShowVar_measure))) / count( {1} Distinct($(vShowVar_area))))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when I try to adopt the solution into the below formulas I get errors (no data available).&lt;/P&gt;&lt;P&gt;I have to calculate the values for rolling 3 month to get a straightened result for the values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=aggr(RangeAvg(above(&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Pick(Only({1} Dim), SUM($(vShowVar_measure)), &lt;BR /&gt;//Start des BenchmarkTeiles&lt;BR /&gt; sum( {1&amp;lt;MARKET=p(MARKET),PERIOD=p(PERIOD)&amp;gt;} &lt;BR /&gt;&amp;nbsp;&amp;nbsp; TOTAL&amp;lt;PERIOD,MARKET,PRODUCT&amp;gt; ($(vShowVar_measure))) / count( {1} Distinct($(vShowVar_area))))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;,0,3)),$(vShowVar_area),PERIOD)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A second example which is unfortunately not working within my QV project.&lt;/P&gt;&lt;P&gt;Here I tried to calculate a market share.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Pick(Only({1} Dim), sum($(vShowVar_measure)), &lt;/P&gt;&lt;P&gt; sum($(vShowVar_measure))/aggr(sum({1&amp;lt;PERIOD=p(PERIOD),MARKET=p(MARKET)&amp;gt;} &lt;BR /&gt;TOTAL &amp;lt;PERIOD,MARKET,PRODUCT, $(vShowVar_area)&amp;gt; $(vShowVar_measure)),$(vShowVar_area),PERIOD))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The calculation of rolling 3 month or the market share are working with this formulas perfect within pivot tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would be very thankful if you could have a look on this examples.&lt;BR /&gt;I 'm not sure, but maybe the errors are in combination to the aggr function?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks in advance and best regards&lt;/P&gt;&lt;P&gt;Claus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jan 2017 08:34:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-by-month-in-a-chart/m-p/1253941#M396489</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-01-13T08:34:04Z</dc:date>
    </item>
    <item>
      <title>Re: Average by month in a chart</title>
      <link>https://community.qlik.com/t5/QlikView/Average-by-month-in-a-chart/m-p/1253942#M396490</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Would you be able to share the updated qvw where you are having this issue? Just for looking at the expression doesn't really explain much + it has been some time and I don't even remember what all we did here &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jan 2017 10:17:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-by-month-in-a-chart/m-p/1253942#M396490</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-01-13T10:17:44Z</dc:date>
    </item>
  </channel>
</rss>

