<?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: Calculating column percentage in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculating-column-percentage/m-p/574177#M213879</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;If this is a straight table, select sum of rows for the % expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If this is a pivot: Use this aggr expression to get the total of the percentages (as opose&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum(Aggr(Sales / Sum(Total &amp;lt;Id&amp;gt; Sales), Id, &lt;EM&gt;&amp;lt;other dimensions&amp;gt;&lt;/EM&gt;))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;other dimensions must include all the table dimensions - so if Date and Customer are other dimensions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum(Aggr(Sales / Sum(Total &amp;lt;Id&amp;gt; Sales), Id, &lt;EM&gt;Date, Customer&lt;/EM&gt;))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That will give you the sum of the %ages.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS I am assuming that the expression for Column(1) is Sum(Sales)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 14 Apr 2014 14:13:17 GMT</pubDate>
    <dc:creator>jonathandienst</dc:creator>
    <dc:date>2014-04-14T14:13:17Z</dc:date>
    <item>
      <title>Calculating column percentage</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-column-percentage/m-p/574176#M213878</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I need to calculate a percentage in a column:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;Column(1) / Sum(Total &amp;lt;Id&amp;gt; Sales)&lt;/STRONG&gt;, &lt;/P&gt;&lt;P&gt;but the percentage has an error, because instead to use 34700, the value use it's 29629 (=34700 - 1538 - 3533), 1538 and 3533 are repeat (colour red and blue). but, I don't know. why happened with it?&amp;nbsp; Thank you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 329px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl70" height="20" style="text-align: center;" width="80"&gt;&lt;STRONG&gt;Id&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD class="xl70" style="border-left-style: none; text-align: center;" width="80"&gt;&lt;STRONG&gt;Sales&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD class="xl80" style="text-align: center;" width="89"&gt;&lt;P&gt;&lt;STRONG&gt;% Correct&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: 8pt; color: #ff6600;"&gt;using 34700&lt;/SPAN&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD class="xl81" style="text-align: center;" width="80"&gt;&lt;P&gt;&lt;STRONG&gt;% Wrong&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: 8pt; color: #ff6600;"&gt;using 29629&lt;/SPAN&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl71" height="20" style="border-top-style: none; text-align: center;" width="80"&gt;Mark1&lt;/TD&gt;&lt;TD class="xl75" style="border-top-style: none; border-left-style: none; text-align: right;" width="80"&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;1538&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" class="xl74" style="text-align: right;"&gt;4,43%&lt;/TD&gt;&lt;TD align="right" class="xl73" style="text-align: right;"&gt;5,19%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl71" height="20" style="border-top-style: none; text-align: center;" width="80"&gt;Mark1&lt;/TD&gt;&lt;TD class="xl76" style="border-top-style: none; border-left-style: none; text-align: right;" width="80"&gt;5177&lt;/TD&gt;&lt;TD align="right" class="xl74" style="text-align: right;"&gt;14,92%&lt;/TD&gt;&lt;TD align="right" class="xl73" style="text-align: right;"&gt;17,47%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl71" height="20" style="border-top-style: none; text-align: center;" width="80"&gt;Mark1&lt;/TD&gt;&lt;TD class="xl76" style="border-top-style: none; border-left-style: none; text-align: right;" width="80"&gt;2577&lt;/TD&gt;&lt;TD align="right" class="xl74" style="text-align: right;"&gt;7,43%&lt;/TD&gt;&lt;TD align="right" class="xl73" style="text-align: right;"&gt;8,70%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl71" height="20" style="border-top-style: none; text-align: center;" width="80"&gt;Mark1&lt;/TD&gt;&lt;TD class="xl77" style="border-top-style: none; border-left-style: none; text-align: right;" width="80"&gt;&lt;SPAN style="color: #3366ff;"&gt;&lt;STRONG&gt;3533&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" class="xl74" style="text-align: right;"&gt;10,18%&lt;/TD&gt;&lt;TD align="right" class="xl73" style="text-align: right;"&gt;11,92%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl71" height="20" style="border-top-style: none; text-align: center;" width="80"&gt;Mark1&lt;/TD&gt;&lt;TD class="xl76" style="border-top-style: none; border-left-style: none; text-align: right;" width="80"&gt;210&lt;/TD&gt;&lt;TD align="right" class="xl74" style="text-align: right;"&gt;0,61%&lt;/TD&gt;&lt;TD align="right" class="xl73" style="text-align: right;"&gt;0,71%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl71" height="20" style="border-top-style: none; text-align: center;" width="80"&gt;Mark1&lt;/TD&gt;&lt;TD class="xl76" style="border-top-style: none; border-left-style: none; text-align: right;" width="80"&gt;3894&lt;/TD&gt;&lt;TD align="right" class="xl74" style="text-align: right;"&gt;11,22%&lt;/TD&gt;&lt;TD align="right" class="xl73" style="text-align: right;"&gt;13,14%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl71" height="20" style="border-top-style: none; text-align: center;" width="80"&gt;Mark1&lt;/TD&gt;&lt;TD class="xl76" style="border-top-style: none; border-left-style: none; text-align: right;" width="80"&gt;130&lt;/TD&gt;&lt;TD align="right" class="xl74" style="text-align: right;"&gt;0,37%&lt;/TD&gt;&lt;TD align="right" class="xl73" style="text-align: right;"&gt;0,44%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl71" height="20" style="border-top-style: none; text-align: center;" width="80"&gt;Mark1&lt;/TD&gt;&lt;TD class="xl76" style="border-top-style: none; border-left-style: none; text-align: right;" width="80"&gt;172&lt;/TD&gt;&lt;TD align="right" class="xl74" style="text-align: right;"&gt;0,50%&lt;/TD&gt;&lt;TD align="right" class="xl73" style="text-align: right;"&gt;0,58%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl71" height="20" style="border-top-style: none; text-align: center;" width="80"&gt;Mark1&lt;/TD&gt;&lt;TD class="xl75" style="border-top-style: none; border-left-style: none; text-align: right;" width="80"&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;1538&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" class="xl74" style="text-align: right;"&gt;4,43%&lt;/TD&gt;&lt;TD align="right" class="xl73" style="text-align: right;"&gt;5,19%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl71" height="20" style="border-top-style: none; text-align: center;" width="80"&gt;Mark1&lt;/TD&gt;&lt;TD class="xl77" style="border-top-style: none; border-left-style: none; text-align: right;" width="80"&gt;&lt;SPAN style="color: #3366ff;"&gt;&lt;STRONG&gt;3533&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" class="xl74" style="text-align: right;"&gt;10,18%&lt;/TD&gt;&lt;TD align="right" class="xl73" style="text-align: right;"&gt;11,92%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl71" height="20" style="border-top-style: none; text-align: center;" width="80"&gt;Mark1&lt;/TD&gt;&lt;TD class="xl76" style="border-top-style: none; border-left-style: none; text-align: right;" width="80"&gt;9200&lt;/TD&gt;&lt;TD align="right" class="xl74" style="text-align: right;"&gt;26,51%&lt;/TD&gt;&lt;TD align="right" class="xl73" style="text-align: right;"&gt;31,05%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl71" height="20" style="border-top-style: none; text-align: center;" width="80"&gt;Mark1&lt;/TD&gt;&lt;TD class="xl76" style="border-top-style: none; border-left-style: none; text-align: right;" width="80"&gt;3198&lt;/TD&gt;&lt;TD align="right" class="xl74"&gt;9,22%&lt;/TD&gt;&lt;TD align="right" class="xl73"&gt;10,79%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl82" height="20" style="text-align: right;" width="80"&gt;&lt;STRONG&gt;Sum OK&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD align="right" class="xl78"&gt;&lt;STRONG&gt;34700&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl83" height="20" style="text-align: right;" width="80"&gt;&lt;STRONG&gt;Sum Wrong&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD align="right" class="xl79"&gt;&lt;STRONG&gt;29629&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Apr 2014 14:05:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-column-percentage/m-p/574176#M213878</guid>
      <dc:creator />
      <dc:date>2014-04-14T14:05:19Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating column percentage</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-column-percentage/m-p/574177#M213879</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;If this is a straight table, select sum of rows for the % expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If this is a pivot: Use this aggr expression to get the total of the percentages (as opose&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum(Aggr(Sales / Sum(Total &amp;lt;Id&amp;gt; Sales), Id, &lt;EM&gt;&amp;lt;other dimensions&amp;gt;&lt;/EM&gt;))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;other dimensions must include all the table dimensions - so if Date and Customer are other dimensions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum(Aggr(Sales / Sum(Total &amp;lt;Id&amp;gt; Sales), Id, &lt;EM&gt;Date, Customer&lt;/EM&gt;))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That will give you the sum of the %ages.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS I am assuming that the expression for Column(1) is Sum(Sales)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Apr 2014 14:13:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-column-percentage/m-p/574177#M213879</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2014-04-14T14:13:17Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating column percentage</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-column-percentage/m-p/574178#M213880</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check enclosed file...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Apr 2014 14:15:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-column-percentage/m-p/574178#M213880</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-04-14T14:15:36Z</dc:date>
    </item>
  </channel>
</rss>

