<?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 Aggr per Year in Pivot in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Aggr-per-Year-in-Pivot/m-p/162277#M35838</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, how would you represent those data on the same graph, both:&lt;/P&gt;&lt;P&gt;- on X axe: time (here year)&lt;/P&gt;&lt;P&gt;- on Y: several curves showing&lt;/P&gt;&lt;P&gt;- the sales for each customer&lt;/P&gt;&lt;P&gt;- the average for each year&lt;/P&gt;&lt;P&gt;I am trying to find a solution on this kind of topic without success&lt;/P&gt;&lt;P&gt;Thanks you for your help,&lt;/P&gt;&lt;P&gt;Bruno&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 07 Feb 2011 17:32:19 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-02-07T17:32:19Z</dc:date>
    <item>
      <title>Aggr per Year in Pivot</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-per-Year-in-Pivot/m-p/162271#M35832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;customer table:&lt;/P&gt;&lt;P&gt;Customer:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt; Customer_ID, Sales, Year&lt;BR /&gt; 1, 10, 2009&lt;BR /&gt; 2, 20, 2009&lt;BR /&gt; 2, 15, 2009&lt;BR /&gt; 3, 10, 2009&lt;BR /&gt; 4, 40, 2008&lt;BR /&gt; 5, 50, 2008&lt;BR /&gt; 5, 10, 2009&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;I currently use &lt;B&gt;avg(total aggr(sum(Sales), Customer_ID))&lt;/B&gt; to calculate the average.&lt;/P&gt;&lt;P&gt;unfortunately this is working only for the whole data because of total.&lt;/P&gt;&lt;P&gt;What I' trying to show is the average overall Customers per year.&lt;/P&gt;&lt;P&gt;2009: average is 13&lt;BR /&gt;2008: average is 45&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Aloah&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Aug 2009 19:15:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-per-Year-in-Pivot/m-p/162271#M35832</guid>
      <dc:creator />
      <dc:date>2009-08-20T19:15:19Z</dc:date>
    </item>
    <item>
      <title>Aggr per Year in Pivot</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-per-Year-in-Pivot/m-p/162272#M35833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For your example data, a Year dimension with avg(Sales) expression produces the numbers you want. I'm guessing that you need something more complicated than that, but your example data doesn't need it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Aug 2009 03:34:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-per-Year-in-Pivot/m-p/162272#M35833</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2009-08-21T03:34:11Z</dc:date>
    </item>
    <item>
      <title>Aggr per Year in Pivot</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-per-Year-in-Pivot/m-p/162273#M35834</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi John,&lt;/P&gt;&lt;P&gt;I'm using two dimensions (Customer_ID and Year). With avg(sales) I'dont get the avg over all customers per year. Or did I get it wrong?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Aug 2009 14:32:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-per-Year-in-Pivot/m-p/162273#M35834</guid>
      <dc:creator />
      <dc:date>2009-08-21T14:32:40Z</dc:date>
    </item>
    <item>
      <title>Aggr per Year in Pivot</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-per-Year-in-Pivot/m-p/162274#M35835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You said:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;"What I'm trying to show is the average overall Customers per year.&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;2009: average is 13&lt;BR /&gt;2008: average is 45"&lt;/P&gt;&lt;P&gt;From that, I assumed that that was what you wanted to see. That's a chart with ONE dimension, Year, and one expression, avg(Sales). I guess that wasn't what you wanted.&lt;/P&gt;&lt;P&gt;So again guessing what you want, are you trying to compare the sales of EACH customer with some sort of average across customers for the year? That would make sense. So do you want this?&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;Year Customer_ID Sales Average&lt;BR /&gt;2008 4 40 45&lt;BR /&gt;2008 5 50 45&lt;BR /&gt;2009 1 10 13&lt;BR /&gt;2009 2 35 13&lt;BR /&gt;2009 3 10 13&lt;BR /&gt;2009 5 10 13&lt;/P&gt;&lt;P&gt;If that's what you meant, the Average column would be this:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;avg(total &amp;lt;Year&amp;gt; Sales)&lt;/P&gt;&lt;P&gt;However, now I'm not so sure that that's what you want either. Since you have two different batches of sales for Customer 2, wouldn't you want your average to be (10 + 35 + 10 + 10) / 4 = 16.25 instead of (10 + 20 + 15 + 10 + 10) / 5 = 13? Don't you want this?&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;Year Customer_ID Sales Average&lt;BR /&gt;2008 4 40 45&lt;BR /&gt;2008 5 50 45&lt;BR /&gt;2009 1 10 16.25&lt;BR /&gt;2009 2 35 16.25&lt;BR /&gt;2009 3 10 16.25&lt;BR /&gt;2009 5 10 16.25&lt;/P&gt;&lt;P&gt;If that's what you want, the Average column would be this:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;avg(total &amp;lt;Year&amp;gt; aggr(sum(Sales),Year,Customer_ID))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 Aug 2009 01:48:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-per-Year-in-Pivot/m-p/162274#M35835</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2009-08-22T01:48:07Z</dc:date>
    </item>
    <item>
      <title>Aggr per Year in Pivot</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-per-Year-in-Pivot/m-p/162275#M35836</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi John,&lt;/P&gt;&lt;P&gt;wow. thanks for help. Sorry for my ambiguous description of what I was looking for.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 Aug 2009 02:15:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-per-Year-in-Pivot/m-p/162275#M35836</guid>
      <dc:creator />
      <dc:date>2009-08-22T02:15:02Z</dc:date>
    </item>
    <item>
      <title>Aggr per Year in Pivot</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-per-Year-in-Pivot/m-p/162276#M35837</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Excellent examples!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Nov 2009 07:02:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-per-Year-in-Pivot/m-p/162276#M35837</guid>
      <dc:creator />
      <dc:date>2009-11-23T07:02:20Z</dc:date>
    </item>
    <item>
      <title>Aggr per Year in Pivot</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-per-Year-in-Pivot/m-p/162277#M35838</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, how would you represent those data on the same graph, both:&lt;/P&gt;&lt;P&gt;- on X axe: time (here year)&lt;/P&gt;&lt;P&gt;- on Y: several curves showing&lt;/P&gt;&lt;P&gt;- the sales for each customer&lt;/P&gt;&lt;P&gt;- the average for each year&lt;/P&gt;&lt;P&gt;I am trying to find a solution on this kind of topic without success&lt;/P&gt;&lt;P&gt;Thanks you for your help,&lt;/P&gt;&lt;P&gt;Bruno&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Feb 2011 17:32:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-per-Year-in-Pivot/m-p/162277#M35838</guid>
      <dc:creator />
      <dc:date>2011-02-07T17:32:19Z</dc:date>
    </item>
  </channel>
</rss>

