<?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, with calculated column in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Pivot-table-with-calculated-column/m-p/404140#M560058</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;Gysbert, Thanks for this solution. It's working fine&lt;/SPAN&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 29 Apr 2013 15:15:32 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-04-29T15:15:32Z</dc:date>
    <item>
      <title>Pivot table, with calculated column</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-table-with-calculated-column/m-p/404136#M560054</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;This is an actualization of a previous post, Thanks to Gysbert Wassenaar to solve one of my problems.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have this entry data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 213px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl68" height="21" style="text-align: center;" width="49"&gt;Month&lt;/TD&gt;&lt;TD class="xl66" style="border-left-style: none; text-align: center;" width="64"&gt;DataType&lt;/TD&gt;&lt;TD class="xl66" style="border-left-style: none; text-align: center;" width="50"&gt;Value1&lt;/TD&gt;&lt;TD class="xl67" style="border-left-style: none; text-align: center;" width="50"&gt;Value2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl72" height="21"&gt;01&lt;/TD&gt;&lt;TD class="xl64" style="border-left: none;"&gt;R&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-left: none;"&gt;10&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl72" height="20"&gt;01&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;O&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;12&lt;/TD&gt;&lt;TD align="right" class="xl70" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl73" height="21" style="border-top: none;"&gt;02&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;R&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;11&lt;/TD&gt;&lt;TD align="right" class="xl70" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl74" height="21" style="border-top: none;"&gt;02&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;O&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;15&lt;/TD&gt;&lt;TD align="right" class="xl71" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and I would like to obtain this result&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 541px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl75" height="21" width="64"&gt;Month&lt;/TD&gt;&lt;TD class="xl73" colspan="3" style="border-right-width: 1pt; border-right-style: solid; border-right-color: black; text-align: center;" width="159"&gt;Total&lt;/TD&gt;&lt;TD class="xl83" colspan="3" style="text-align: center;" width="159"&gt;02&lt;/TD&gt;&lt;TD class="xl81" colspan="3" style="border-right-width: 1pt; border-right-style: solid; border-right-color: black; border-left-style: none; text-align: center;" width="159"&gt;01&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl72" height="21"&gt;DataType&lt;/TD&gt;&lt;TD class="xl71" style="text-align: center;"&gt;R&lt;/TD&gt;&lt;TD class="xl80" style="border-top-style: none; border-left-style: none; text-align: center;"&gt;O&lt;/TD&gt;&lt;TD class="xl89" style="border-top-style: none; text-align: center;"&gt;%&lt;/TD&gt;&lt;TD class="xl88" style="border-top-style: none; border-left-style: none; text-align: center;"&gt;R&lt;/TD&gt;&lt;TD class="xl81" style="border-top-style: none; border-left-style: none; text-align: center;"&gt;O&lt;/TD&gt;&lt;TD class="xl81" style="border-top-style: none; border-left-style: none; text-align: center;"&gt;%&lt;/TD&gt;&lt;TD class="xl81" style="border-top-style: none; border-left-style: none; text-align: center;"&gt;R&lt;/TD&gt;&lt;TD class="xl81" style="border-top-style: none; border-left-style: none; text-align: center;"&gt;O&lt;/TD&gt;&lt;TD class="xl82" style="border-top-style: none; border-left-style: none; text-align: center;"&gt;%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="20" style="border-top: none;"&gt;Value1&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;21&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-left: none;"&gt;27&lt;/TD&gt;&lt;TD align="right" class="xl90"&gt;77,78%&lt;/TD&gt;&lt;TD align="right" class="xl84"&gt;11&lt;/TD&gt;&lt;TD align="right" class="xl85" style="border-left: none;"&gt;15&lt;/TD&gt;&lt;TD align="right" class="xl86" style="border-left: none;"&gt;73,33%&lt;/TD&gt;&lt;TD align="right" class="xl85" style="border-left: none;"&gt;10&lt;/TD&gt;&lt;TD align="right" class="xl85" style="border-left: none;"&gt;12&lt;/TD&gt;&lt;TD align="right" class="xl87" style="border-left: none;"&gt;83,33%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="21" style="border-top: none;"&gt;Value2&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: none;"&gt;2&lt;/TD&gt;&lt;TD align="right" class="xl70" style="border-top: none; border-left: none;"&gt;3&lt;/TD&gt;&lt;TD align="right" class="xl91" style="border-top: none;"&gt;66,67%&lt;/TD&gt;&lt;TD align="right" class="xl79" style="border-top: none;"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl76" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;&lt;TD align="right" class="xl77" style="border-top: none; border-left: none;"&gt;50,00%&lt;/TD&gt;&lt;TD align="right" class="xl76" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl76" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl78" style="border-top: none; border-left: none;"&gt;100,00%&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where the rows Value1 and Value2 are expresions and the colum % is an aditional value of the dimension DataType&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Value1 = sum(Value1)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; in % column sum({&amp;lt;DataType={'R'}&amp;gt;} Value1) / sum({&amp;lt;DataType={'O'}&amp;gt;} Value1)&lt;/P&gt;&lt;P&gt;Value2 = sum(Value2)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; in % column sum({&amp;lt;DataType={'R'}&amp;gt;} Value2) / sum({&amp;lt;DataType={'O'}&amp;gt;} Value2)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but the result obtained is this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 382px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl71" height="21" width="64"&gt;Month&lt;/TD&gt;&lt;TD class="xl79" colspan="2" style="text-align: center;" width="106"&gt;Total&lt;/TD&gt;&lt;TD class="xl77" colspan="2" style="text-align: center;" width="106"&gt;02&lt;/TD&gt;&lt;TD class="xl78" colspan="2" style="border-left-style: none; text-align: center;" width="106"&gt;01&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl70" height="21"&gt;DataType&lt;/TD&gt;&lt;TD class="xl69" style="text-align: center;"&gt;R&lt;/TD&gt;&lt;TD class="xl74" style="border-top-style: none; border-left-style: none; text-align: center;"&gt;O&lt;/TD&gt;&lt;TD class="xl77" style="border-top-style: none; border-left-style: none; text-align: center;"&gt;R&lt;/TD&gt;&lt;TD class="xl78" style="border-top-style: none; border-left-style: none; text-align: center;"&gt;O&lt;/TD&gt;&lt;TD class="xl78" style="border-top-style: none; border-left-style: none; text-align: center;"&gt;R&lt;/TD&gt;&lt;TD class="xl78" style="border-top-style: none; border-left-style: none; text-align: center;"&gt;O&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="20" style="border-top: none;"&gt;Value1&lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;21&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-left: none;"&gt;27&lt;/TD&gt;&lt;TD align="right" class="xl75"&gt;11&lt;/TD&gt;&lt;TD align="right" class="xl76" style="border-left: none;"&gt;15&lt;/TD&gt;&lt;TD align="right" class="xl76" style="border-left: none;"&gt;10&lt;/TD&gt;&lt;TD align="right" class="xl76" style="border-left: none;"&gt;12&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="21" style="border-top: none;"&gt;Value2&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none;"&gt;2&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;3&lt;/TD&gt;&lt;TD align="right" class="xl73" style="border-top: none;"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl72" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;&lt;TD align="right" class="xl72" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl72" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Apr 2013 13:03:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-table-with-calculated-column/m-p/404136#M560054</guid>
      <dc:creator />
      <dc:date>2013-04-26T13:03:23Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot table, with calculated column</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-table-with-calculated-column/m-p/404137#M560055</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See attached example.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Apr 2013 13:40:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-table-with-calculated-column/m-p/404137#M560055</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-04-26T13:40:27Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot table, with calculated column</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-table-with-calculated-column/m-p/404138#M560056</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Gysbert, Thanks for this solution. It's working fine, but the number of records generated is too high. We are working with millions of records (and Value1, Value2 are really Value1, Value2 .. Value60) and inplementing this solution, the application performance is greatly deteriorated. Is there any other way to get the desired result without greatly increasing the number of records?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Apr 2013 09:11:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-table-with-calculated-column/m-p/404138#M560056</guid>
      <dc:creator />
      <dc:date>2013-04-29T09:11:51Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot table, with calculated column</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-table-with-calculated-column/m-p/404139#M560057</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See attached example. No idea how this holds up under millions of records. You may have to resort to creating summary tables in the script.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Apr 2013 11:20:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-table-with-calculated-column/m-p/404139#M560057</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-04-29T11:20:51Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot table, with calculated column</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-table-with-calculated-column/m-p/404140#M560058</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;Gysbert, Thanks for this solution. It's working fine&lt;/SPAN&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Apr 2013 15:15:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-table-with-calculated-column/m-p/404140#M560058</guid>
      <dc:creator />
      <dc:date>2013-04-29T15:15:32Z</dc:date>
    </item>
  </channel>
</rss>

