Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
danielnevitt
Creator
Creator

Sum absolute volume by field

Hi,

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).

I thought the solution would be either of the following, however this returns an erro:

Sum(aggr(sum(DISTINCT atr.abs_pos_vol),hdr_num)) as abs_pos_vol_distinct,
Sum(DISTINCT atr.abs_pos_vol),hdr_num)) as abs_pos_vol_distinct;

Any help would be much appreciated.

Regards,
Daniel

Labels (1)
  • Other

1 Reply
pooja_prabhu_n
Creator III
Creator III

Hi,

We can not use Aggr() function in load script, you can try that expression in front end.

In load script you can try group by

sum(DISTINCT atr.abs_pos_vol) as abs_pos_vol_distinct

group by hdr_num;

what is the error that you are getting  when trying to calculate the sum?