<?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: How can you use SUM(Column(n)) ? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-can-you-use-SUM-Column-n/m-p/1057002#M464908</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;it seems, sum function is not working with column() / label name of column. But Rangesum is working..&lt;/P&gt;&lt;P&gt;e.g&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum(column(7)) -&amp;gt; gives 0&amp;nbsp; but rangesum(column(7)) gives values&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so, you can try like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;STRONG&gt;=&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;[Total cost]&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;/Rangesum(sum(TOTAL &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;[2015 price]&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;*&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;[2015 Quantity]&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;),&lt;BR /&gt;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum(TOTAL &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;[2016 Price]&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;*&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;[2016 Quantity]&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;STRONG&gt;))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-size: 9.0pt; font-family: arial, helvetica, sans-serif;"&gt;Here, [Total cost] is a Label name and check the Relative option..&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-size: 9.0pt; font-family: arial, helvetica, sans-serif;"&gt;&lt;IMG alt="Capture.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/120610_Capture.JPG" style="height: 96px; width: 620px;" /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-size: 9.0pt; font-family: arial, helvetica, sans-serif;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;Suggestion :&lt;/SPAN&gt; Instead of using column(1), column(2) , You can directly use the label name. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-size: 9.0pt; font-family: arial, helvetica, sans-serif;"&gt;like &lt;STRONG&gt;&lt;EM&gt;[2015 price]*[2015 Quantity] &lt;/EM&gt;&lt;/STRONG&gt; (careful with your original field name)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sample Attached&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 Apr 2016 03:57:04 GMT</pubDate>
    <dc:creator>settu_periasamy</dc:creator>
    <dc:date>2016-04-06T03:57:04Z</dc:date>
    <item>
      <title>How can you use SUM(Column(n)) ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-can-you-use-SUM-Column-n/m-p/1057000#M464906</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey there,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a very complex set of calculations I am doing in a straight table. I made a simple example, as seen below, to explain my problem:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/120546_Capture.JPG" style="width: 620px; height: 127px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Column A is my dimension.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Calculated expressions:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Column D : column(1) * column(2)&lt;/P&gt;&lt;P&gt;Column G : column(4) * column(5)&lt;/P&gt;&lt;P&gt;Column H : column(3) + column(6)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Column I : SUM(column(7)) / SUM(total column(7))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With Column I the problem comes in, it does not calculate. When ticking the "Relative" box on the Expressions tab it gives the correct answer, but it does not allow you to use that percentage. Is there some way to solve this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Elmarie &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Apr 2016 13:36:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-can-you-use-SUM-Column-n/m-p/1057000#M464906</guid>
      <dc:creator />
      <dc:date>2016-04-05T13:36:28Z</dc:date>
    </item>
    <item>
      <title>Re: How can you use SUM(Column(n)) ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-can-you-use-SUM-Column-n/m-p/1057001#M464907</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It does not allow to use percentage? Can you share a sample?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Apr 2016 16:25:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-can-you-use-SUM-Column-n/m-p/1057001#M464907</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-04-05T16:25:02Z</dc:date>
    </item>
    <item>
      <title>Re: How can you use SUM(Column(n)) ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-can-you-use-SUM-Column-n/m-p/1057002#M464908</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;it seems, sum function is not working with column() / label name of column. But Rangesum is working..&lt;/P&gt;&lt;P&gt;e.g&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum(column(7)) -&amp;gt; gives 0&amp;nbsp; but rangesum(column(7)) gives values&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so, you can try like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;STRONG&gt;=&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;[Total cost]&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;/Rangesum(sum(TOTAL &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;[2015 price]&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;*&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;[2015 Quantity]&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;),&lt;BR /&gt;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum(TOTAL &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;[2016 Price]&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;*&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;[2016 Quantity]&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;STRONG&gt;))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-size: 9.0pt; font-family: arial, helvetica, sans-serif;"&gt;Here, [Total cost] is a Label name and check the Relative option..&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-size: 9.0pt; font-family: arial, helvetica, sans-serif;"&gt;&lt;IMG alt="Capture.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/120610_Capture.JPG" style="height: 96px; width: 620px;" /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-size: 9.0pt; font-family: arial, helvetica, sans-serif;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;Suggestion :&lt;/SPAN&gt; Instead of using column(1), column(2) , You can directly use the label name. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-size: 9.0pt; font-family: arial, helvetica, sans-serif;"&gt;like &lt;STRONG&gt;&lt;EM&gt;[2015 price]*[2015 Quantity] &lt;/EM&gt;&lt;/STRONG&gt; (careful with your original field name)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sample Attached&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Apr 2016 03:57:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-can-you-use-SUM-Column-n/m-p/1057002#M464908</guid>
      <dc:creator>settu_periasamy</dc:creator>
      <dc:date>2016-04-06T03:57:04Z</dc:date>
    </item>
    <item>
      <title>Re: How can you use SUM(Column(n)) ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-can-you-use-SUM-Column-n/m-p/1057003#M464909</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;Use actual expression instead of column No or column Name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Apr 2016 04:50:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-can-you-use-SUM-Column-n/m-p/1057003#M464909</guid>
      <dc:creator>PrashantSangle</dc:creator>
      <dc:date>2016-04-06T04:50:45Z</dc:date>
    </item>
    <item>
      <title>Re: How can you use SUM(Column(n)) ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-can-you-use-SUM-Column-n/m-p/1057004#M464910</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The Column() function and references to the expression name operate on a strictly row-by-row basis. It is not possible to use multirow aggregations like Sum, but the inter-record functions Above() and Below() work. It is possible to use this&amp;nbsp; construct in place of Sum(Column(1)):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=Rangesum(Above(Column(1), 1, NoOfRows(TOTAL)))+RangeSum(Below(Column(1), 0, NoOfRows(TOTAL)))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(or with column names)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But it may be better to use the expression as max dreamer says, although you may need to wrap the expression in Sum(Aggr(...))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Apr 2016 05:08:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-can-you-use-SUM-Column-n/m-p/1057004#M464910</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2016-04-06T05:08:12Z</dc:date>
    </item>
    <item>
      <title>Re: How can you use SUM(Column(n)) ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-can-you-use-SUM-Column-n/m-p/1057005#M464911</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Like I said my calculations are very complex in the qvd I am developing with a vast amount of variables. So using the column names is not the solution. I just do not understand why QlikView does not have this functionality to use sum and column.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On another note, thank you Jonathan! It works perfectly now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you everyone for your help, really appreciate it!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Elmarie&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Apr 2016 07:36:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-can-you-use-SUM-Column-n/m-p/1057005#M464911</guid>
      <dc:creator />
      <dc:date>2016-04-06T07:36:37Z</dc:date>
    </item>
  </channel>
</rss>

