<?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: Pivot table calculation in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Pivot-table-calculation/m-p/653134#M238728</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The 'All Types' lines that you want at the bottom cannot be created without a change in the data model. So that's why you should add a small table in the load script: &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;"&gt;Load RecNo()-1 as IsTotal Autogenerate 2;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I use this table together with the Dim1 to create the 4 dimensional values that you want (1,2,3,All types) by using a calculated dimension:&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;"&gt;=Aggr(Only(If(IsTotal,'All Types',Dim1)),Dim1,IsTotal)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Image1.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/62247_Image1.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 11 Jul 2014 06:15:59 GMT</pubDate>
    <dc:creator>hic</dc:creator>
    <dc:date>2014-07-11T06:15:59Z</dc:date>
    <item>
      <title>Pivot table calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-table-calculation/m-p/653128#M238722</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;Please see attached XLS file for an example I would like to build in QV. Creating the "base" pivot table is easy but getting stuck in trying to add blue shaded column and rows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any idea how to achieve this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jul 2014 14:31:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-table-calculation/m-p/653128#M238722</guid>
      <dc:creator />
      <dc:date>2014-07-10T14:31:39Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot table calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-table-calculation/m-p/653129#M238723</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The rightmost column can be created using a formula like&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(Dimensionality()=2, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Count&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;(X)/Count(total &amp;lt;Dim1&amp;gt; X),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Count(X)/Count(total X))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the bottom rows are trickier. For that you need to change the data model.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jul 2014 14:47:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-table-calculation/m-p/653129#M238723</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2014-07-10T14:47:46Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot table calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-table-calculation/m-p/653130#M238724</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I just realized that you can get the bottom rows doing the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Add the following Load statement to your script:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Load RecNo()-1 as IsTotal Autogenerate 2;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you can define your Dim1 in the pivot as (Calculated Dimension):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =Aggr(Only(If(IsTotal,'All Types',Dim1)),Dim1,IsTotal)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jul 2014 15:04:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-table-calculation/m-p/653130#M238724</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2014-07-10T15:04:07Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot table calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-table-calculation/m-p/653131#M238725</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is a specific chart but I do it using 2 charts (Pivot Table and Straight Table), and change origina data see XLS file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope it will usefull for you. Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jul 2014 15:15:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-table-calculation/m-p/653131#M238725</guid>
      <dc:creator />
      <dc:date>2014-07-10T15:15:10Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot table calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-table-calculation/m-p/653132#M238726</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Henric,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your response. Not quite sure I am following your train of thought. Can you please explain your approach?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marko&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jul 2014 19:08:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-table-calculation/m-p/653132#M238726</guid>
      <dc:creator />
      <dc:date>2014-07-10T19:08:20Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot table calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-table-calculation/m-p/653133#M238727</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Oswaldo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your response. I was thinking of adding straight table but would love to fulfil business requirement, if possible, to have it all displayed in the pivot chart. This will be my last resort.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marko&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jul 2014 19:09:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-table-calculation/m-p/653133#M238727</guid>
      <dc:creator />
      <dc:date>2014-07-10T19:09:47Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot table calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-table-calculation/m-p/653134#M238728</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The 'All Types' lines that you want at the bottom cannot be created without a change in the data model. So that's why you should add a small table in the load script: &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;"&gt;Load RecNo()-1 as IsTotal Autogenerate 2;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I use this table together with the Dim1 to create the 4 dimensional values that you want (1,2,3,All types) by using a calculated dimension:&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;"&gt;=Aggr(Only(If(IsTotal,'All Types',Dim1)),Dim1,IsTotal)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Image1.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/62247_Image1.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Jul 2014 06:15:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-table-calculation/m-p/653134#M238728</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2014-07-11T06:15:59Z</dc:date>
    </item>
  </channel>
</rss>

