Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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?