<?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 and when to use RangeSum in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-and-when-to-use-RangeSum/m-p/1163305#M905666</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In addition to what Marcus already explained, you can put it very simply like this: what is the difference between Sum() and RangeSum() and '+'. They all seem to add values right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;+&lt;/STRONG&gt; will add the left and right operand/expression. Invalid or Null operands will propagate into the result making it worthless. See Marcus' post.&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Sum()&lt;/STRONG&gt; will add all active values stored &lt;EM&gt;in its single expression parameter&lt;/EM&gt;. Meaning that you can only specify a single expression as parameter but Sum() will calculate the expression/field for all active dimension values and add them together. I like to call it a "Vertical Add"&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;RangeSum()&lt;/STRONG&gt; will add all of the values &lt;EM&gt;in the parameter list&lt;/EM&gt;, thereby replacing any invalid or null parameter with a 0 value. See Marcus' post. I like to call this one a "Horizontal Add".&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that in a load script, + and RangeSum() can be used "everywhere", but Sum() can only be used in a LOAD statement where some form of aggregation is either active (GROUP BY) or implied.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 03 Jul 2016 11:39:19 GMT</pubDate>
    <dc:creator>Peter_Cammaert</dc:creator>
    <dc:date>2016-07-03T11:39:19Z</dc:date>
    <item>
      <title>How and when to use RangeSum</title>
      <link>https://community.qlik.com/t5/QlikView/How-and-when-to-use-RangeSum/m-p/1163302#M905663</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can anyone help me in understanding RangeSum function with examples? When should we use it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Dawar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-and-when-to-use-RangeSum/m-p/1163302#M905663</guid>
      <dc:creator />
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: How and when to use RangeSum</title>
      <link>https://community.qlik.com/t5/QlikView/How-and-when-to-use-RangeSum/m-p/1163303#M905664</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A range-function returned for each not numeric parameter 0 and therefore the function returned always a valid result. For example a calculation of: 1 + 2 + 'A' or 2 + NULL() will be fail and return NULL and the same within a rangesum(1,2,'A') returned 3 respectively rangesum(2, NULL()) returned 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Therefore a range-function or quite similar the alt-function is to use where you need to make sure that your calculation returned always a valid result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 03 Jul 2016 05:30:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-and-when-to-use-RangeSum/m-p/1163303#M905664</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2016-07-03T05:30:08Z</dc:date>
    </item>
    <item>
      <title>Re: How and when to use RangeSum</title>
      <link>https://community.qlik.com/t5/QlikView/How-and-when-to-use-RangeSum/m-p/1163304#M905665</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;Range functions will replace the following &lt;A class="MCXref_0"&gt;&lt;EM&gt;Chart General Numeric Functions&lt;/EM&gt;&lt;/A&gt;: &lt;SPAN class="Bold"&gt;numsum&lt;/SPAN&gt;, &lt;SPAN class="Bold"&gt;numavg&lt;/SPAN&gt;, &lt;SPAN class="Bold"&gt;numcount&lt;/SPAN&gt;, &lt;SPAN class="Bold"&gt;nummin&lt;/SPAN&gt; and &lt;SPAN class="Bold"&gt;nummax&lt;/SPAN&gt;, which should now be regarded as obsolete. &lt;/P&gt;&lt;P class="syntax"&gt;&lt;A name="kanchor365"&gt;&lt;/A&gt;&lt;A name="Ch_rangesum"&gt;&lt;/A&gt;&lt;SPAN class="Bold"&gt;rangesum(&lt;/SPAN&gt;&lt;SPAN class="Italic"&gt;expr1 [ , expr2, ... exprN ]&lt;/SPAN&gt;&lt;SPAN class="Bold"&gt;)&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;Returns the sum of a range of 1 to N arguments. As opposed to the &lt;SPAN style="font-size: 11pt; font-weight: bold;"&gt;+&lt;/SPAN&gt; operator, &lt;SPAN class="Bold"&gt;rangesum&lt;/SPAN&gt; will treat all non-numeric values as 0. &lt;/P&gt;&lt;P&gt;The argument expressions of this function may contain &lt;A class="MCXref_0"&gt;&lt;EM&gt;Chart Inter Record Functions&lt;/EM&gt;&lt;/A&gt; with a third optional parameter, which in themselves return a range of values. &lt;/P&gt;&lt;P class="example"&gt;Examples:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE cellspacing="0" class="TableStyle-LeftBold" style="margin-right: auto;"&gt;&lt;TBODY&gt;&lt;TR class="Body-Body1"&gt;&lt;TD class="BodyE-Column1-Body1"&gt;rangesum (1,2,4)&lt;/TD&gt;&lt;TD class="BodyD-Column2-Body1"&gt;returns 7&lt;/TD&gt;&lt;/TR&gt;&lt;TR class="Body-Body1"&gt;&lt;TD class="BodyE-Column1-Body1"&gt;rangesum (1,'xyz')&lt;/TD&gt;&lt;TD class="BodyD-Column2-Body1"&gt;returns 1&lt;/TD&gt;&lt;/TR&gt;&lt;TR class="Body-Body1"&gt;&lt;TD class="BodyE-Column1-Body1"&gt;rangesum (null( ))&lt;/TD&gt;&lt;TD class="BodyD-Column2-Body1"&gt;returns 0&lt;/TD&gt;&lt;/TR&gt;&lt;TR class="Body-Body1"&gt;&lt;TD class="BodyE-Column1-Body1"&gt;rangesum (above(count(x),-1,3))&lt;/TD&gt;&lt;TD class="BodyD-Column2-Body1"&gt;returns the sum of the three results of the &lt;SPAN class="Bold"&gt;count(x)&lt;/SPAN&gt; function evaluated on the row below the current row, the current row and the row above the current row. &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 03 Jul 2016 10:41:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-and-when-to-use-RangeSum/m-p/1163304#M905665</guid>
      <dc:creator>Chanty4u</dc:creator>
      <dc:date>2016-07-03T10:41:10Z</dc:date>
    </item>
    <item>
      <title>Re: How and when to use RangeSum</title>
      <link>https://community.qlik.com/t5/QlikView/How-and-when-to-use-RangeSum/m-p/1163305#M905666</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In addition to what Marcus already explained, you can put it very simply like this: what is the difference between Sum() and RangeSum() and '+'. They all seem to add values right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;+&lt;/STRONG&gt; will add the left and right operand/expression. Invalid or Null operands will propagate into the result making it worthless. See Marcus' post.&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Sum()&lt;/STRONG&gt; will add all active values stored &lt;EM&gt;in its single expression parameter&lt;/EM&gt;. Meaning that you can only specify a single expression as parameter but Sum() will calculate the expression/field for all active dimension values and add them together. I like to call it a "Vertical Add"&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;RangeSum()&lt;/STRONG&gt; will add all of the values &lt;EM&gt;in the parameter list&lt;/EM&gt;, thereby replacing any invalid or null parameter with a 0 value. See Marcus' post. I like to call this one a "Horizontal Add".&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that in a load script, + and RangeSum() can be used "everywhere", but Sum() can only be used in a LOAD statement where some form of aggregation is either active (GROUP BY) or implied.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 03 Jul 2016 11:39:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-and-when-to-use-RangeSum/m-p/1163305#M905666</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2016-07-03T11:39:19Z</dc:date>
    </item>
  </channel>
</rss>

