<?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: Different Total calculation in Pivot Table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Different-Total-calculation-in-Pivot-Table/m-p/858105#M470092</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;maybe with dimensionality() and secondarydimensionality()&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/docs/DOC-7969"&gt;How to use - Dimensionality()&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 09 Jun 2015 15:45:08 GMT</pubDate>
    <dc:creator>maxgro</dc:creator>
    <dc:date>2015-06-09T15:45:08Z</dc:date>
    <item>
      <title>Different Total calculation in Pivot Table</title>
      <link>https://community.qlik.com/t5/QlikView/Different-Total-calculation-in-Pivot-Table/m-p/858104#M470091</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;I have a pivot table and i need different total calculation depending the dimension.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="KPI_data3.jpg" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/88825_KPI_data3.jpg" style="height: 61px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the expression: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=AVG(TOTAL &amp;lt;MONTH_SHORT_NAME, HAUL&amp;gt; Aggr(SUM({&amp;lt;MIS_KPI_ID = {'AVO_PROMEDIO'}&amp;gt;} VALOR_KPI),MONTH_SHORT_NAME, &lt;SPAN style="font-size: 13.3333330154419px;"&gt;HAUL&lt;/SPAN&gt;))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The total of HAUL (horizontal row) is an average, but the total of MONTH SHORT NAME (vertical column) is a SUM expression. How can i do this expression to make differents total calculations?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jun 2015 15:33:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Different-Total-calculation-in-Pivot-Table/m-p/858104#M470091</guid>
      <dc:creator />
      <dc:date>2015-06-09T15:33:06Z</dc:date>
    </item>
    <item>
      <title>Re: Different Total calculation in Pivot Table</title>
      <link>https://community.qlik.com/t5/QlikView/Different-Total-calculation-in-Pivot-Table/m-p/858105#M470092</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;maybe with dimensionality() and secondarydimensionality()&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/docs/DOC-7969"&gt;How to use - Dimensionality()&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jun 2015 15:45:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Different-Total-calculation-in-Pivot-Table/m-p/858105#M470092</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2015-06-09T15:45:08Z</dc:date>
    </item>
    <item>
      <title>Re: Different Total calculation in Pivot Table</title>
      <link>https://community.qlik.com/t5/QlikView/Different-Total-calculation-in-Pivot-Table/m-p/858106#M470093</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The simple version.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If(SecondaryDimensionality()=0, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SUM(HAUL), //If total, then sum&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AVG(HAUL) //else avg&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Martin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jun 2015 06:53:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Different-Total-calculation-in-Pivot-Table/m-p/858106#M470093</guid>
      <dc:creator>martin_dideriks</dc:creator>
      <dc:date>2015-06-10T06:53:03Z</dc:date>
    </item>
    <item>
      <title>Re: Different Total calculation in Pivot Table</title>
      <link>https://community.qlik.com/t5/QlikView/Different-Total-calculation-in-Pivot-Table/m-p/858107#M470094</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Wouldn't the following work?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;SUM({&amp;lt;MIS_KPI_ID = {'AVO_PROMEDIO'}&amp;gt;} VALOR_KPI) / COUNT( distinct &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;MONTH_SHORT_NAME )&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Within a column, there is only one month, which means that you get the Sum. But in a row, there are several months, so you get the average.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jun 2015 07:36:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Different-Total-calculation-in-Pivot-Table/m-p/858107#M470094</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2015-06-10T07:36:58Z</dc:date>
    </item>
    <item>
      <title>Re: Different Total calculation in Pivot Table</title>
      <link>https://community.qlik.com/t5/QlikView/Different-Total-calculation-in-Pivot-Table/m-p/858108#M470095</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks &lt;A href="https://community.qlik.com/qlik-users/43652"&gt;martin.dideriksen&lt;/A&gt;‌ the solution works fine, but i have a problem with the aggregations (for more detail see attachment).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When i have all the dimensions expanded the total is correct:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="KPI1.jpg" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/89768_KPI1.jpg" style="height: 128px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;But if i collapse the dimensions, the total is wrong:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="KPI2.jpg" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/89770_KPI2.jpg" style="height: 89px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;I'm not able to solve the aggr expression for totals. This is my expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="color: #000080;"&gt;If(secondaryDimensionality()=0,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Avg(TOTAL &amp;lt;MONTH_SHORT_NAME,ORIGEN_KPI,SECTOR_KPI,CIA_KPI,ID_AREANEG_KPI&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Aggr(Sum(NUM_VALUE),MONTH_SHORT_NAME,ORIGEN_KPI,SECTOR_KPI,CIA_KPI,ID_AREANEG_KPI)), &lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum(TOTAL &amp;lt;MONTH_SHORT_NAME,ORIGEN_KPI,SECTOR_KPI,CIA_KPI,ID_AREANEG_KPI&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Aggr(Sum(NUM_VALUE),MONTH_SHORT_NAME,ORIGEN_KPI,SECTOR_KPI,CIA_KPI,ID_AREANEG_KPI))&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="color: #000080;"&gt;&amp;nbsp; )&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I modify this expression?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for help me!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jun 2015 13:34:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Different-Total-calculation-in-Pivot-Table/m-p/858108#M470095</guid>
      <dc:creator />
      <dc:date>2015-06-17T13:34:44Z</dc:date>
    </item>
    <item>
      <title>Re: Different Total calculation in Pivot Table</title>
      <link>https://community.qlik.com/t5/QlikView/Different-Total-calculation-in-Pivot-Table/m-p/858109#M470096</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The solution to fix the expression has given me &lt;A href="https://community.qlik.com/qlik-users/4003"&gt;hic&lt;/A&gt;‌ :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM style="font-weight: inherit; font-family: inherit; color: #000080;"&gt;If(secondaryDimensionality()=0,&lt;/EM&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000080;"&gt;&lt;EM style="font-weight: inherit; font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;SUM&lt;/STRONG&gt;&lt;/SPAN&gt;(TOTAL &amp;lt;MONTH_SHORT_NAME,ORIGEN_KPI,SECTOR_KPI,CIA_KPI,ID_AREANEG_KPI&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Aggr(Sum(NUM_VALUE),MONTH_SHORT_NAME,ORIGEN_KPI,SECTOR_KPI,CIA_KPI,ID_AREANEG_KPI))&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;/COUNT( distinct MONTH_SHORT_NAME )&lt;/STRONG&gt;&lt;/SPAN&gt;,&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000080;"&gt;&lt;EM style="font-weight: inherit; font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum(TOTAL &amp;lt;MONTH_SHORT_NAME,ORIGEN_KPI,SECTOR_KPI,CIA_KPI,ID_AREANEG_KPI&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Aggr(Sum(NUM_VALUE),MONTH_SHORT_NAME,ORIGEN_KPI,SECTOR_KPI,CIA_KPI,ID_AREANEG_KPI))&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM style="font-weight: inherit; font-family: inherit; color: #000080;"&gt;&amp;nbsp; )&lt;/EM&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM style="font-weight: inherit; font-family: inherit; color: #000080;"&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM style="font-weight: inherit; font-family: inherit; color: #000080;"&gt;Thanks all for help me!&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jun 2015 15:40:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Different-Total-calculation-in-Pivot-Table/m-p/858109#M470096</guid>
      <dc:creator />
      <dc:date>2015-06-17T15:40:09Z</dc:date>
    </item>
  </channel>
</rss>

