Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have the following expression and I would appreciate some help with adding a DISTINCT trade_num to the expression:
sum(total <udf_code> fabs(pos_lots))
Thanks,
Daniel
and all of these should work also (I think)
Sum(TOTAL <udf_code> Aggr(Avg(fabs(pos_lots)), trade_num))
Sum(TOTAL <udf_code> Aggr(Only(fabs(pos_lots)), trade_num))
I am assuming that each trade_num will have one and only one pos_lots value. If this is not true, then we would need to know which value of pos_lots need to be picked for each trade_num
Hi,
Can you tell us what this expression does and how it is related to Trade_num
Regards,
Kaushik Solanki
Hi,
The expression absolute sums the total position lots by udf code.
Trade numbers make up the total position lots and I only want to sum where trade_num is distinct.
Thanks,
Daniel
Also, if you can provide some information about the chart where it is getting used and what all are the dimensions?
Hi,
It a column in a straight table. I am trying to product the absolute pos_lots where trade_num is distinct when there are multiple rows on a table (for example different trader IDs).
Regards,
Daniel
So essentially sum the expression only when there is a single trade_num. If there are more than one instance of the same trade_num you don't want to sum them in your expression?
If there is more than one of the same trade_num, I just want to sum it once.
Hope that makes sense.
Thanks
May be this:
Sum(TOTAL <udf_code> Aggr(Sum(DISTINCT fabs(pos_lots)), trade_num))
and all of these should work also (I think)
Sum(TOTAL <udf_code> Aggr(Avg(fabs(pos_lots)), trade_num))
Sum(TOTAL <udf_code> Aggr(Only(fabs(pos_lots)), trade_num))
I am assuming that each trade_num will have one and only one pos_lots value. If this is not true, then we would need to know which value of pos_lots need to be picked for each trade_num
Thanks for your help