<?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: Aggregations problems in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Aggregations-problems/m-p/481035#M179767</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try below code... This should work...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SUM(Sales) / Aggr(SUM({1}TOTAL &amp;lt;Region&amp;gt; Sales),Region,Store)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 23 Nov 2013 08:45:00 GMT</pubDate>
    <dc:creator>MK_QSL</dc:creator>
    <dc:date>2013-11-23T08:45:00Z</dc:date>
    <item>
      <title>Aggregations problems</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregations-problems/m-p/481033#M179765</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the sales for each salesman that belongs to a store in a particular region;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to know what is the participation of each store in its region.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I created a table with dimension as store and expression as : =sum(Sales) / sum(Aggr( NODISTINCT sum(Sales), Region))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I have wrong values, I get t&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;he following result : &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Sales.jpg" class="jive-image" src="https://community.qlik.com/legacyfs/online/49447_Sales.jpg" style="font-size: 10pt; line-height: 1.5em;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Whereas the results should be :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Store 1 : 100%&lt;/P&gt;&lt;P&gt;Store 2 : 50%&lt;/P&gt;&lt;P&gt;Store 3 : 50 %&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have attached a file with my project.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for you help !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sadjad&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Nov 2013 19:52:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregations-problems/m-p/481033#M179765</guid>
      <dc:creator />
      <dc:date>2013-11-22T19:52:57Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregations problems</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregations-problems/m-p/481034#M179766</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sadjad&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are looking for the sales that each store has as a total of the region's sales - and it's not the aggr() function that you need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Add the Region as a dimension (you can hide this later) and add the expression :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;= sum(Sales) / sum(total &amp;lt;Region&amp;gt;Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will give you the store's sales as a percent of the total for the region.Is this what you are looking for?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Erica&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS&amp;nbsp; you had "relative" ticked in the expression.This returns your value as a % relative to the total in the column, ie it will force that column to add up to 100%.This is useful, but not for your purpose&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Nov 2013 21:28:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregations-problems/m-p/481034#M179766</guid>
      <dc:creator />
      <dc:date>2013-11-22T21:28:25Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregations problems</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregations-problems/m-p/481035#M179767</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try below code... This should work...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SUM(Sales) / Aggr(SUM({1}TOTAL &amp;lt;Region&amp;gt; Sales),Region,Store)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Nov 2013 08:45:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregations-problems/m-p/481035#M179767</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2013-11-23T08:45:00Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregations problems</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregations-problems/m-p/481036#M179768</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Erica,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I hide the dimension Region in my table &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;= sum(Sales) / sum(total &amp;lt;Region&amp;gt;Sales)&lt;/SPAN&gt; gives me the total of sales for all Countries and I want the total for each country.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The one that seems to work is sum(Sales)/ sum(Aggr (sum(total&amp;lt;Region&amp;gt; Sales),Region,Store))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Nov 2013 12:39:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregations-problems/m-p/481036#M179768</guid>
      <dc:creator />
      <dc:date>2013-11-25T12:39:45Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregations problems</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregations-problems/m-p/481037#M179769</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good to hear it worked &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Nov 2013 21:09:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregations-problems/m-p/481037#M179769</guid>
      <dc:creator />
      <dc:date>2013-11-25T21:09:00Z</dc:date>
    </item>
  </channel>
</rss>

