<?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: Using TOTAL Function in Script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Using-TOTAL-Function-in-Script/m-p/1058466#M642420</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt; &lt;/P&gt;
&lt;P&gt;Is there a way to sum based on aggregating by two fields in the load script? From what i can tell, the formula works if I only have one field like, &amp;lt;cip&amp;gt;, but i need the data aggregated by both (&amp;lt;cip, geoid&amp;gt;).&lt;/P&gt;
&lt;P style="min-height: 8pt; padding: 0px;"&gt;&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Zach,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;could you post a sample QVW or script that demonstrates a Sum(TOTAL FIELD) or Sum(TOTAL&amp;lt;cip&amp;gt; FIELD)?&lt;/P&gt;&lt;P&gt;As already pointed out by others I don't think TOTAL qualifier is allowed in the script (don't get confused by the syntax checker without running the script).&lt;/P&gt;&lt;P&gt;If you made it work, I would be interested to see your sample.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 22 Jan 2016 19:12:26 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2016-01-22T19:12:26Z</dc:date>
    <item>
      <title>Using TOTAL Function in Script</title>
      <link>https://community.qlik.com/t5/QlikView/Using-TOTAL-Function-in-Script/m-p/1058463#M642417</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to sum up a field by two other fields. See example below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SUM(TOTAL &amp;lt;cip,geoid&amp;gt; [2014 Employment]) as CIPbyGeoidWage&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The issue is that the script does not like the second field in the TOTAL function. &lt;SPAN style="font-size: 13.3333px;"&gt;&amp;lt;cip&lt;SPAN style="color: #ff0000;"&gt;,geoid&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to sum based on aggregating by two fields in the load script? From what i can tell, the formula works if I only have one field like, &amp;lt;cip&amp;gt;, but i need the data aggregated by both (&amp;lt;cip, geoid&amp;gt;).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Zach &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jan 2016 18:48:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-TOTAL-Function-in-Script/m-p/1058463#M642417</guid>
      <dc:creator>zach_paz</dc:creator>
      <dc:date>2016-01-22T18:48:43Z</dc:date>
    </item>
    <item>
      <title>Re: Using TOTAL Function in Script</title>
      <link>https://community.qlik.com/t5/QlikView/Using-TOTAL-Function-in-Script/m-p/1058464#M642418</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Zach,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm surprised that only the second attribute is being rejected. In my mind, TOTAL should not work at all in the script, because it's a Chart feature.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the script, we use GROUP BY load for aggregating data:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;cip,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; geoid,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;SUM( [2014 Employment]) as CIPbyGeoidWage&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;RESIDENT&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MyTable&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;GROUP BY&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;cip,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; geoid&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Oleg Troyansky&lt;/P&gt;&lt;P&gt;Upgrade your Qlik skills at the &lt;A href="http://masterssummit.com/"&gt;Masters Summit for Qlik &lt;/A&gt;- coming soon to Milan, Italy!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jan 2016 18:53:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-TOTAL-Function-in-Script/m-p/1058464#M642418</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2016-01-22T18:53:09Z</dc:date>
    </item>
    <item>
      <title>Re: Using TOTAL Function in Script</title>
      <link>https://community.qlik.com/t5/QlikView/Using-TOTAL-Function-in-Script/m-p/1058465#M642419</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was not aware that TOTAL keyword is allowed in script at all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would usually do this like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Left Join (Table)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD cip,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; geoid&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum([2014 Employment]) as CIPbyGeoidWage&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident Table&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Group By cip, geoid;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jan 2016 18:53:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-TOTAL-Function-in-Script/m-p/1058465#M642419</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-01-22T18:53:51Z</dc:date>
    </item>
    <item>
      <title>Re: Using TOTAL Function in Script</title>
      <link>https://community.qlik.com/t5/QlikView/Using-TOTAL-Function-in-Script/m-p/1058466#M642420</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt; &lt;/P&gt;
&lt;P&gt;Is there a way to sum based on aggregating by two fields in the load script? From what i can tell, the formula works if I only have one field like, &amp;lt;cip&amp;gt;, but i need the data aggregated by both (&amp;lt;cip, geoid&amp;gt;).&lt;/P&gt;
&lt;P style="min-height: 8pt; padding: 0px;"&gt;&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Zach,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;could you post a sample QVW or script that demonstrates a Sum(TOTAL FIELD) or Sum(TOTAL&amp;lt;cip&amp;gt; FIELD)?&lt;/P&gt;&lt;P&gt;As already pointed out by others I don't think TOTAL qualifier is allowed in the script (don't get confused by the syntax checker without running the script).&lt;/P&gt;&lt;P&gt;If you made it work, I would be interested to see your sample.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jan 2016 19:12:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-TOTAL-Function-in-Script/m-p/1058466#M642420</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-01-22T19:12:26Z</dc:date>
    </item>
  </channel>
</rss>

