<?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: sum multiple columns in straight table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/sum-multiple-columns-in-straight-table/m-p/679956#M671769</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;RangeSum(A,B,C)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 24 Sep 2014 07:46:32 GMT</pubDate>
    <dc:creator>MK_QSL</dc:creator>
    <dc:date>2014-09-24T07:46:32Z</dc:date>
    <item>
      <title>sum multiple columns in straight table</title>
      <link>https://community.qlik.com/t5/QlikView/sum-multiple-columns-in-straight-table/m-p/679955#M671768</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, how do I sum multiple columns in straight table? I want to create column &lt;span class="lia-unicode-emoji" title=":anguished_face:"&gt;😧&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid #000000; width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;A&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;B&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;C&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;D&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;6&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;5&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;12&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;4&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;3&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;7&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;14&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;7&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;8&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;16&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;5&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;9&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;16&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Sep 2014 07:15:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-multiple-columns-in-straight-table/m-p/679955#M671768</guid>
      <dc:creator />
      <dc:date>2014-09-24T07:15:07Z</dc:date>
    </item>
    <item>
      <title>Re: sum multiple columns in straight table</title>
      <link>https://community.qlik.com/t5/QlikView/sum-multiple-columns-in-straight-table/m-p/679956#M671769</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;RangeSum(A,B,C)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Sep 2014 07:46:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-multiple-columns-in-straight-table/m-p/679956#M671769</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-09-24T07:46:32Z</dc:date>
    </item>
    <item>
      <title>Re: sum multiple columns in straight table</title>
      <link>https://community.qlik.com/t5/QlikView/sum-multiple-columns-in-straight-table/m-p/679957#M671770</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;=&lt;A&gt;+&lt;B&gt;+&lt;C&gt;&lt;/C&gt;&lt;/B&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Expression labels are reused &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/info.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Sep 2014 07:57:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-multiple-columns-in-straight-table/m-p/679957#M671770</guid>
      <dc:creator>dirk_konings</dc:creator>
      <dc:date>2014-09-24T07:57:11Z</dc:date>
    </item>
    <item>
      <title>Re: sum multiple columns in straight table</title>
      <link>https://community.qlik.com/t5/QlikView/sum-multiple-columns-in-straight-table/m-p/679958#M671771</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;Try like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=[Expression Name1] + [Expression Name2] + [Expression Name3]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Column(1) + Column(2) + Column(3)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OR &lt;/P&gt;&lt;P&gt;= RangeSum(A, B, C)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Sep 2014 10:12:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-multiple-columns-in-straight-table/m-p/679958#M671771</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2014-09-24T10:12:42Z</dc:date>
    </item>
    <item>
      <title>Re: sum multiple columns in straight table</title>
      <link>https://community.qlik.com/t5/QlikView/sum-multiple-columns-in-straight-table/m-p/679959#M671772</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jagan that's right but you run into trouble if you have an unknown number of columns.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example I take a rolling 24 months but hide the column if there is no data so it's not Column(1)+...Column(24)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you go to far and take a column that doesn't exist it shows a -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example &lt;/P&gt;&lt;P&gt;showing Nov-2016 - Jan 2016 if I take Column(1) + Column(2) it's good but if I take Column(1)+Column(2) + column(16) it returns a -.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Same goes for if using column names which are expressions vDateSubmitted24 through vDateSubmitted1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So what I need to do is figure out the column # in a straight table for this expression and use that to determine the max column # to sum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't think you can get the column # from a straight table - I haven't been able to figure it out&lt;/P&gt;&lt;P&gt;Rangesum works/fails in same manner.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Feb 2017 15:18:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-multiple-columns-in-straight-table/m-p/679959#M671772</guid>
      <dc:creator>dgreenberg</dc:creator>
      <dc:date>2017-02-24T15:18:50Z</dc:date>
    </item>
    <item>
      <title>Re: sum multiple columns in straight table</title>
      <link>https://community.qlik.com/t5/QlikView/sum-multiple-columns-in-straight-table/m-p/679960#M671773</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ha answered my own question.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;wrap the column with an alt and if it's a non existent column or the sum column it will still work.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;alt(column(1),0) + alt(column(2),0) + alt(column(3),0) + alt(column(4),0) + alt(column(5),0) + alt(column(6),0) + alt(column(7),0) + alt(column(8),0) + alt(column(9),0)&amp;nbsp; +alt(column(10),0) + alt(column(11),0) + alt(column(12),0) + alt(column(13),0) + alt(column(14),0) + alt(column(15),0) + alt(column(16),0) + alt(column(17),0) + alt(column(18),0) &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Feb 2017 15:32:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-multiple-columns-in-straight-table/m-p/679960#M671773</guid>
      <dc:creator>dgreenberg</dc:creator>
      <dc:date>2017-02-24T15:32:42Z</dc:date>
    </item>
    <item>
      <title>Re: sum multiple columns in straight table</title>
      <link>https://community.qlik.com/t5/QlikView/sum-multiple-columns-in-straight-table/m-p/679961#M671774</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok but something odd is happening with the above. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My result is 2x what it should be because it's somehow including that column itself (the total column).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yet if I wrap it in ( )/2 I get a different result that is not correct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However if I add another expression as =TOTAL&amp;nbsp; //the name of the total column it works.&lt;/P&gt;&lt;P&gt;I can hide the TOTAL column on the presentation tab so I have a work around so far.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just not sure how I am going to get the average.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When looking at my table below keep in mind this is just what our data set contains the months could be This month (Feb 2017) going back 24 months.&amp;nbsp; Notice how the first Total column is 2x what it should be.&amp;nbsp; That's the one that says =&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;alt(column(1),0) + alt(column(2),0) &lt;/SPAN&gt;....&amp;nbsp; The second Total column says =Total&amp;nbsp; which matches the name of the previous column.&amp;nbsp; Very odd.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="table.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/154381_table.png" style="height: 122px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Feb 2017 15:44:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-multiple-columns-in-straight-table/m-p/679961#M671774</guid>
      <dc:creator>dgreenberg</dc:creator>
      <dc:date>2017-02-24T15:44:39Z</dc:date>
    </item>
    <item>
      <title>Re: sum multiple columns in straight table</title>
      <link>https://community.qlik.com/t5/QlikView/sum-multiple-columns-in-straight-table/m-p/679962#M671775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Figured out average.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not elegant but here goes:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Total/(Year(max([Date Submitted]))*12 + Month(max([Date Submitted]))&lt;/P&gt;&lt;P&gt;-(Year(min([Date Submitted]))*12 +month(min([Date Submitted])))&lt;/P&gt;&lt;P&gt;)+1)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Feb 2017 16:14:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-multiple-columns-in-straight-table/m-p/679962#M671775</guid>
      <dc:creator>dgreenberg</dc:creator>
      <dc:date>2017-02-24T16:14:57Z</dc:date>
    </item>
    <item>
      <title>Re: sum multiple columns in straight table</title>
      <link>https://community.qlik.com/t5/QlikView/sum-multiple-columns-in-straight-table/m-p/679963#M671776</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;I need to calculate the final balance based on Min Year start and Max Year start . the&amp;nbsp; date format is in the MMM-YYYY form. I'm writing the below syntax. I know somewhere is wrong. can you please guide me in writing the new syntax.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;= &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;new_date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"&amp;gt;=$(vYearStart))&amp;lt;=$(vYearMax)"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;},(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;DBAL&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)-&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;WRITE_OFF&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)-&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;SECURED_RECOVERY&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Thanks in advance.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Sowjanya&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Jul 2017 11:10:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-multiple-columns-in-straight-table/m-p/679963#M671776</guid>
      <dc:creator />
      <dc:date>2017-07-17T11:10:09Z</dc:date>
    </item>
    <item>
      <title>Re: sum multiple columns in straight table</title>
      <link>https://community.qlik.com/t5/QlikView/sum-multiple-columns-in-straight-table/m-p/1514299#M671777</link>
      <description>&lt;PRE&gt;Hey there, &lt;BR /&gt;&lt;BR /&gt;You could do it in the script by using the following way:&lt;BR /&gt;&lt;BR /&gt;Data:
LOAD A, &lt;BR /&gt;     B,&lt;BR /&gt;     C,&lt;BR /&gt;     Num#(A ,'##.###') + Num#(B ,'##.###') + Num#(C ,'##.###') as D
FROM
[YOUR PATH]
 (ooxml, embedded labels, table is sheet1);
&lt;BR /&gt;This will sum the elements in each row of A, B, and C and will put it into D for you! Then you could use from "New object Sheet" --&amp;gt; "Table Box" to show your A, B, C, and D columns.&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Nov 2018 13:57:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-multiple-columns-in-straight-table/m-p/1514299#M671777</guid>
      <dc:creator>BrightFuture</dc:creator>
      <dc:date>2018-11-29T13:57:15Z</dc:date>
    </item>
  </channel>
</rss>

