<?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 Sum absolute volume by field in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Sum-absolute-volume-by-field/m-p/1923369#M1218649</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I'm trying to create a field in the load script to calculate the sum of the absolute position volume (abs_pos_vol) by trade number (hdr_num).&lt;/P&gt;
&lt;P&gt;I thought the solution would be either of the following, however this returns an erro:&lt;/P&gt;
&lt;P&gt;Sum(aggr(sum(DISTINCT atr.abs_pos_vol),hdr_num)) as abs_pos_vol_distinct,&lt;BR /&gt;Sum(DISTINCT atr.abs_pos_vol),hdr_num)) as abs_pos_vol_distinct;&lt;/P&gt;
&lt;P&gt;Any help would be much appreciated.&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Daniel&lt;/P&gt;</description>
    <pubDate>Wed, 27 Apr 2022 12:49:57 GMT</pubDate>
    <dc:creator>danielnevitt</dc:creator>
    <dc:date>2022-04-27T12:49:57Z</dc:date>
    <item>
      <title>Sum absolute volume by field</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-absolute-volume-by-field/m-p/1923369#M1218649</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I'm trying to create a field in the load script to calculate the sum of the absolute position volume (abs_pos_vol) by trade number (hdr_num).&lt;/P&gt;
&lt;P&gt;I thought the solution would be either of the following, however this returns an erro:&lt;/P&gt;
&lt;P&gt;Sum(aggr(sum(DISTINCT atr.abs_pos_vol),hdr_num)) as abs_pos_vol_distinct,&lt;BR /&gt;Sum(DISTINCT atr.abs_pos_vol),hdr_num)) as abs_pos_vol_distinct;&lt;/P&gt;
&lt;P&gt;Any help would be much appreciated.&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Daniel&lt;/P&gt;</description>
      <pubDate>Wed, 27 Apr 2022 12:49:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-absolute-volume-by-field/m-p/1923369#M1218649</guid>
      <dc:creator>danielnevitt</dc:creator>
      <dc:date>2022-04-27T12:49:57Z</dc:date>
    </item>
    <item>
      <title>Re: Sum absolute volume by field</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-absolute-volume-by-field/m-p/1923422#M1218656</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;We can not use Aggr() function in load script, you can try that expression in front end.&lt;/P&gt;
&lt;P&gt;In load script you can try group by&lt;/P&gt;
&lt;P&gt;sum(&lt;SPAN&gt;DISTINCT atr.abs_pos_vol) as&amp;nbsp;abs_pos_vol_distinct&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;group by&amp;nbsp;hdr_num;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;what is the error that you are getting&amp;nbsp; when trying to calculate the sum?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Apr 2022 13:52:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-absolute-volume-by-field/m-p/1923422#M1218656</guid>
      <dc:creator>pooja_prabhu_n</dc:creator>
      <dc:date>2022-04-27T13:52:00Z</dc:date>
    </item>
  </channel>
</rss>

