<?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 fields in load script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Sum-fields-in-load-script/m-p/714887#M1083357</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Even better, thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 Jun 2014 17:27:07 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-06-20T17:27:07Z</dc:date>
    <item>
      <title>Sum fields in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-fields-in-load-script/m-p/714883#M1083353</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to sum the values in several fields into one "sum" field.&amp;nbsp; Here's what I have so far:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD customerID,&lt;/P&gt;&lt;P&gt;product1purchases,&lt;/P&gt;&lt;P&gt;product2purchases,&lt;/P&gt;&lt;P&gt;product3purchases,&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(product1purchases+product2purchases+product3purchases) as totalpurchases&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;from &lt;TABLE&gt;;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The line in bold doesn't work.&amp;nbsp; I tried using sum() and that didn't work either.&amp;nbsp; I know how to do this in a chart, but I want to do this in the load script if at all possible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I feel like I'm missing something obvious.&amp;nbsp; Any ideas?&lt;/P&gt;&lt;/TABLE&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2014 00:16:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-fields-in-load-script/m-p/714883#M1083353</guid>
      <dc:creator />
      <dc:date>2014-06-20T00:16:01Z</dc:date>
    </item>
    <item>
      <title>Re: Sum fields in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-fields-in-load-script/m-p/714884#M1083354</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;PFA. It should work fine. Can you send me your script please?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2014 00:22:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-fields-in-load-script/m-p/714884#M1083354</guid>
      <dc:creator />
      <dc:date>2014-06-20T00:22:24Z</dc:date>
    </item>
    <item>
      <title>Re: Sum fields in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-fields-in-load-script/m-p/714885#M1083355</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That helped!&amp;nbsp; I tested it and found that most of the fields had null values and these were tripping it up.&amp;nbsp; If anyone reads this and has the same issue, here's what my solution was:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD customerID,&lt;/P&gt;&lt;P&gt;product1purchases,&lt;/P&gt;&lt;P&gt;product2purchases,&lt;/P&gt;&lt;P&gt;product3purchases,&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(if(product1purchases=1,product1purchases,0)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; +if(product2purchases=1,product2purchases,0)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; +if(product3purchases=1,product3purchases,0)) as totalpurchases&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;from &lt;TABLE&gt;; &lt;P&gt;&lt;/P&gt;&lt;/TABLE&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2014 00:38:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-fields-in-load-script/m-p/714885#M1083355</guid>
      <dc:creator />
      <dc:date>2014-06-20T00:38:40Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Sum fields in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-fields-in-load-script/m-p/714886#M1083356</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sophia, In this case Rangesum would be more appropriate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PFA the example.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2014 00:53:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-fields-in-load-script/m-p/714886#M1083356</guid>
      <dc:creator />
      <dc:date>2014-06-20T00:53:08Z</dc:date>
    </item>
    <item>
      <title>Re: Sum fields in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-fields-in-load-script/m-p/714887#M1083357</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Even better, thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2014 17:27:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-fields-in-load-script/m-p/714887#M1083357</guid>
      <dc:creator />
      <dc:date>2014-06-20T17:27:07Z</dc:date>
    </item>
  </channel>
</rss>

