<?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 in load script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/sum-in-load-script/m-p/644000#M476296</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;You need something like (in an expression)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =Sum({&amp;lt;TLMKey = {18}, SLMKey = {142}, MetricKey = {3, 5}&amp;gt;} Value)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where Value is the field containing the actual metric value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to do this in script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(TLMKey = 18 And SLMKey = 142 And Match(MetricKey, 3, 5), Value)) As Discharges&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 09 Jun 2014 11:15:34 GMT</pubDate>
    <dc:creator>jonathandienst</dc:creator>
    <dc:date>2014-06-09T11:15:34Z</dc:date>
    <item>
      <title>sum in load script</title>
      <link>https://community.qlik.com/t5/QlikView/sum-in-load-script/m-p/643999#M476295</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 am still struggling with this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the following two metrics in the Load script.&amp;nbsp; IT is brining back the two metrics as Discharges which is fine but it brings them back seperately.&amp;nbsp; I also need to bring them back added together so I wan Metric Key 3 and Metric Key 5 values added together as sum of discharges which can then be brought into a report.&amp;nbsp; Any help would be great&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;if&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;((&lt;SPAN style="color: #800000;"&gt;TLMKey&lt;/SPAN&gt;=18 &lt;SPAN style="color: #0000ff;"&gt;and&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;SLMKey&lt;/SPAN&gt;=142 &lt;SPAN style="color: #0000ff;"&gt;and&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;MetricKey&lt;/SPAN&gt;=3) &lt;SPAN style="color: #0000ff;"&gt;or&lt;/SPAN&gt; (&lt;SPAN style="color: #800000;"&gt;TLMKey&lt;/SPAN&gt;=18 &lt;SPAN style="color: #0000ff;"&gt;and&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;SLMKey&lt;/SPAN&gt;=142 &lt;SPAN style="color: #0000ff;"&gt;and&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;MetricKey&lt;/SPAN&gt;=5),&lt;SPAN style="color: #800000;"&gt;MetricKey&lt;/SPAN&gt;) &lt;SPAN style="color: #0000ff;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Discharges&lt;/SPAN&gt;, &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jun 2014 11:08:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-in-load-script/m-p/643999#M476295</guid>
      <dc:creator>rcorcoran</dc:creator>
      <dc:date>2014-06-09T11:08:08Z</dc:date>
    </item>
    <item>
      <title>Re: sum in load script</title>
      <link>https://community.qlik.com/t5/QlikView/sum-in-load-script/m-p/644000#M476296</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;You need something like (in an expression)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =Sum({&amp;lt;TLMKey = {18}, SLMKey = {142}, MetricKey = {3, 5}&amp;gt;} Value)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where Value is the field containing the actual metric value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to do this in script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(TLMKey = 18 And SLMKey = 142 And Match(MetricKey, 3, 5), Value)) As Discharges&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jun 2014 11:15:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-in-load-script/m-p/644000#M476296</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2014-06-09T11:15:34Z</dc:date>
    </item>
  </channel>
</rss>

