<?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 function with multiple dimensions in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/AGGR-function-with-multiple-dimensions/m-p/1202003#M626982</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is something I just don't get about a certain AGGR expression I am using.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Consider the following pivot-table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="1.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/139675_1.png" style="height: 122px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;I use the COUNT(EMPLID) expression to get a simple line count.&lt;/P&gt;&lt;P&gt;I use 3 dimensions, Onderwerp SchooljaarExamen and CijferCategorie. &lt;/P&gt;&lt;P&gt;It works perfectly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am however more interested in the relative amount per Onderwerp/Schooljaar so I need the total per schooljaar per onderwerp&lt;/P&gt;&lt;P&gt;Like this:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="2.png" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/139689_2.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;As you can see it totals the amount per year nicely per onderwerp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ok, the standard solution is to use an aggr function to aggregate the same result.&lt;/P&gt;&lt;P&gt;Like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="3.png" class="jive-image image-3" src="https://community.qlik.com/legacyfs/online/139690_3.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;Which yield exactly the same table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Almost there I thought, now I just have to reintroduce the CijferCategorie-dimension, and it should (imho) yield the same totals. If that works I can use the AGGR expression in the first table.&lt;/P&gt;&lt;P&gt;But then I get this:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="4.png" class="image-4 jive-image" src="https://community.qlik.com/legacyfs/online/139691_4.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;The totals pop up in totally unpredictable fields. Dimensions partially disappear...&lt;/P&gt;&lt;P&gt;Even if I change the expression to =AGGR(COUNT( EMPLID), SchooljaarExamen, Cijfercategorie, Onderwerp) I get the same result.&lt;/P&gt;&lt;P&gt;I just don't get what's happening here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The questions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Can I get it to work using this train of thought?&lt;/P&gt;&lt;P&gt;2. Or is there perhaps an easier way to change the numbers in the first table to relative per year/cijfercategorie&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Herbert&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 Oct 2016 10:39:57 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-10-05T10:39:57Z</dc:date>
    <item>
      <title>AGGR function with multiple dimensions</title>
      <link>https://community.qlik.com/t5/QlikView/AGGR-function-with-multiple-dimensions/m-p/1202003#M626982</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is something I just don't get about a certain AGGR expression I am using.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Consider the following pivot-table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="1.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/139675_1.png" style="height: 122px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;I use the COUNT(EMPLID) expression to get a simple line count.&lt;/P&gt;&lt;P&gt;I use 3 dimensions, Onderwerp SchooljaarExamen and CijferCategorie. &lt;/P&gt;&lt;P&gt;It works perfectly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am however more interested in the relative amount per Onderwerp/Schooljaar so I need the total per schooljaar per onderwerp&lt;/P&gt;&lt;P&gt;Like this:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="2.png" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/139689_2.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;As you can see it totals the amount per year nicely per onderwerp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ok, the standard solution is to use an aggr function to aggregate the same result.&lt;/P&gt;&lt;P&gt;Like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="3.png" class="jive-image image-3" src="https://community.qlik.com/legacyfs/online/139690_3.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;Which yield exactly the same table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Almost there I thought, now I just have to reintroduce the CijferCategorie-dimension, and it should (imho) yield the same totals. If that works I can use the AGGR expression in the first table.&lt;/P&gt;&lt;P&gt;But then I get this:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="4.png" class="image-4 jive-image" src="https://community.qlik.com/legacyfs/online/139691_4.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;The totals pop up in totally unpredictable fields. Dimensions partially disappear...&lt;/P&gt;&lt;P&gt;Even if I change the expression to =AGGR(COUNT( EMPLID), SchooljaarExamen, Cijfercategorie, Onderwerp) I get the same result.&lt;/P&gt;&lt;P&gt;I just don't get what's happening here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The questions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Can I get it to work using this train of thought?&lt;/P&gt;&lt;P&gt;2. Or is there perhaps an easier way to change the numbers in the first table to relative per year/cijfercategorie&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Herbert&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Oct 2016 10:39:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/AGGR-function-with-multiple-dimensions/m-p/1202003#M626982</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-10-05T10:39:57Z</dc:date>
    </item>
    <item>
      <title>Re: AGGR function with multiple dimensions</title>
      <link>https://community.qlik.com/t5/QlikView/AGGR-function-with-multiple-dimensions/m-p/1202004#M626983</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you looking to get this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;183/1516&lt;/P&gt;&lt;P&gt;1/1430&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;and so on?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;May be try this:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;Count(EMPLID)/&lt;SPAN style="color: #ff0000;"&gt;Count(TOTAL &amp;lt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Onderwerp, &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;SchooljaarExamen&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;gt; &lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG style="color: #ff0000;"&gt;EMPLID)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Oct 2016 16:29:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/AGGR-function-with-multiple-dimensions/m-p/1202004#M626983</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-10-05T16:29:14Z</dc:date>
    </item>
    <item>
      <title>Re: AGGR function with multiple dimensions</title>
      <link>https://community.qlik.com/t5/QlikView/AGGR-function-with-multiple-dimensions/m-p/1202005#M626984</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;Yes, that is exactly what I want, thanks a lot (again &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;But I'm still interested to understand why the aggr does not do the exact same thing. I can't understand why it behaves so strangely when I reintroduce the CijferCategorie dimension in the 4th picture.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards, Herbert&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Oct 2016 10:28:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/AGGR-function-with-multiple-dimensions/m-p/1202005#M626984</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-10-06T10:28:57Z</dc:date>
    </item>
    <item>
      <title>Re: AGGR function with multiple dimensions</title>
      <link>https://community.qlik.com/t5/QlikView/AGGR-function-with-multiple-dimensions/m-p/1202006#M626985</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We can force Aggr() to do it, but why use a complicated option when you can simplify things &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Oct 2016 17:12:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/AGGR-function-with-multiple-dimensions/m-p/1202006#M626985</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-10-06T17:12:36Z</dc:date>
    </item>
  </channel>
</rss>

