<?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: Aggr in Pivot Table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Aggr-in-Pivot-Table/m-p/1520211#M748286</link>
    <description>It works! Thanks a lot!!&lt;BR /&gt;&lt;BR /&gt;What if we have more than 3 dimensions with the same situation?&lt;BR /&gt;How do we counter this kind of scenario?&lt;BR /&gt;</description>
    <pubDate>Thu, 13 Dec 2018 08:53:35 GMT</pubDate>
    <dc:creator>Arthur_Fong</dc:creator>
    <dc:date>2018-12-13T08:53:35Z</dc:date>
    <item>
      <title>Aggr in Pivot Table</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-in-Pivot-Table/m-p/1520101#M748282</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I would like to perform aggr in pivot table where the sub-total should be averaged out accordingly.&lt;/P&gt;&lt;P&gt;In the screenshot below for Feb, it seems that it is taking (200+200+300)/3 =233.3333&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Aggr.PNG" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/2082i0529178FA5A6A395/image-size/large?v=v2&amp;amp;px=999" role="button" title="Aggr.PNG" alt="Aggr.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;But I would like to have the sub-total (200+300) to be averaged out, which returns 250.&lt;/P&gt;&lt;P&gt;Any idea how can i achieve this?&lt;/P&gt;&lt;P&gt;Attached is a sample qvw for this scenario.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks and regards,&lt;/P&gt;&lt;P&gt;Arthur Fong&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 04:58:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-in-Pivot-Table/m-p/1520101#M748282</guid>
      <dc:creator>Arthur_Fong</dc:creator>
      <dc:date>2024-11-16T04:58:34Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr in Pivot Table</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-in-Pivot-Table/m-p/1520145#M748283</link>
      <description>Hi Jkfong93,&lt;BR /&gt;The "total" that you want is 250 or 350?&lt;BR /&gt;Because I saw in Feb, B1 + B2 + B3 = 200 + 200 + 300, then divide 2(Group B and C) = 350&lt;BR /&gt;Or do you also want to distinct the value then the value is same?&lt;BR /&gt;Thanks.&lt;BR /&gt;Aiolos</description>
      <pubDate>Thu, 13 Dec 2018 06:56:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-in-Pivot-Table/m-p/1520145#M748283</guid>
      <dc:creator>uacg0009</dc:creator>
      <dc:date>2018-12-13T06:56:00Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr in Pivot Table</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-in-Pivot-Table/m-p/1520149#M748284</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;After using avg with aggr function, I want to sum the sub-total(Total by Branch) highlighted in yellow (200+300), then perform avg again to get the Final Total(Total by Group).&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Aggr.PNG" style="width: 934px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/2087i6545EF8CE850B9DB/image-size/large?v=v2&amp;amp;px=999" role="button" title="Aggr.PNG" alt="Aggr.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;In this case, it will be (200+300)/2 = 250.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks and regards,&lt;/P&gt;&lt;P&gt;Arthur Fong&lt;/P&gt;</description>
      <pubDate>Thu, 13 Dec 2018 07:08:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-in-Pivot-Table/m-p/1520149#M748284</guid>
      <dc:creator>Arthur_Fong</dc:creator>
      <dc:date>2018-12-13T07:08:49Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr in Pivot Table</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-in-Pivot-Table/m-p/1520191#M748285</link>
      <description>&lt;P&gt;Hi Arthur!&lt;/P&gt;&lt;P&gt;In your expression you aggregate by Group, branch and month. Your Total is incorrect because, in total, you actually want to aggregate by group and month (not branch!). I suggest you use the following expression:&lt;/P&gt;&lt;PRE&gt;if(SecondaryDimensionality() &amp;lt;&amp;gt; 0,
	//Non total cells
	avg({&amp;lt;Month=&amp;gt;}AGGR(AVG({&amp;lt;Month=&amp;gt;}Value),Group,Branch,Month))
,
	//total cells
	avg({&amp;lt;Month=&amp;gt;}AGGR(AVG({&amp;lt;Month=&amp;gt;}Value),Group,Month))
)&lt;/PRE&gt;&lt;P&gt;Hope it helps!&lt;/P&gt;&lt;P&gt;Bests,&lt;/P&gt;&lt;P&gt;Jaime.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Dec 2018 08:22:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-in-Pivot-Table/m-p/1520191#M748285</guid>
      <dc:creator>jaibau1993</dc:creator>
      <dc:date>2018-12-13T08:22:04Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr in Pivot Table</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-in-Pivot-Table/m-p/1520211#M748286</link>
      <description>It works! Thanks a lot!!&lt;BR /&gt;&lt;BR /&gt;What if we have more than 3 dimensions with the same situation?&lt;BR /&gt;How do we counter this kind of scenario?&lt;BR /&gt;</description>
      <pubDate>Thu, 13 Dec 2018 08:53:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-in-Pivot-Table/m-p/1520211#M748286</guid>
      <dc:creator>Arthur_Fong</dc:creator>
      <dc:date>2018-12-13T08:53:35Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr in Pivot Table</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-in-Pivot-Table/m-p/1520241#M748287</link>
      <description>&lt;P&gt;I'm glad it worked! &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If you have N dimensions, you have to aggregate in the corresponding TOTAL by the N dimensions&amp;nbsp;&lt;STRONG&gt;except&lt;/STRONG&gt; those you want to totalize.&lt;/P&gt;&lt;P&gt;The (possible) tricky thing is that you have to locate where the TOTAL cell is in your table using Dimensionality() and SecondaryDimensionality() in IF statements. I suggest you to create two new expressions in your table with&amp;nbsp;&lt;SPAN&gt;Dimensionality() and SecondaryDimensionality() respectively so you can check where is your total cell.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Bests,&lt;/P&gt;&lt;P&gt;Jaime.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Dec 2018 09:30:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-in-Pivot-Table/m-p/1520241#M748287</guid>
      <dc:creator>jaibau1993</dc:creator>
      <dc:date>2018-12-13T09:30:32Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr in Pivot Table</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-in-Pivot-Table/m-p/1520243#M748288</link>
      <description>&lt;P&gt;By the way, note that your original expression is equivalent to&lt;/P&gt;&lt;PRE&gt;AVG({&amp;lt;Month=&amp;gt;}Value)&lt;/PRE&gt;&lt;P&gt;so a simpler version of my answer would be&lt;/P&gt;&lt;PRE&gt;if(SecondaryDimensionality() &amp;lt;&amp;gt; 0,
	//Non total cells
	AVG({&amp;lt;Month=&amp;gt;}Value)
,
	//total cells
	avg({&amp;lt;Month=&amp;gt;}AGGR(AVG({&amp;lt;Month=&amp;gt;}Value),Group,Month))
)&lt;/PRE&gt;</description>
      <pubDate>Thu, 13 Dec 2018 09:32:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-in-Pivot-Table/m-p/1520243#M748288</guid>
      <dc:creator>jaibau1993</dc:creator>
      <dc:date>2018-12-13T09:32:58Z</dc:date>
    </item>
  </channel>
</rss>

