Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have the following expression and I would like to include where the hdr_num is DISTINCT. Is this possible?
Thanks,
Daniel
Fabs(sum(if(trade_type_name='APO' and opt_pc_name='Put',(opt_strike_price)*payment_qty, if(trade_type_name='APO' and opt_pc_name='Call',(-opt_strike_price)*payment_qty))))
Daniel
You can try below expression,
If(opt_pc_name = 'Put', Sum(Aggr(sum(DISTINCT{<opt_pc_name={`Put`}>}opt_strike_price*payment_qty),hdr_num)),
Sum(Aggr(sum(DISTINCT{<opt_pc_name={`Call`}>}opt_strike_price*-payment_qty),hdr_num)) )
Maybe like
Fabs(sum( {<hdr_num = {"=count(hdr_num)=1"}>}
if(trade_type_name='APO' and opt_pc_name='Put',
(opt_strike_price)*payment_qty,
if(trade_type_name='APO' and opt_pc_name='Call',
(-opt_strike_price)*payment_qty))))
Thanks Marina.
Unfortunately I require distinct rather than a count where it equals 1.
Regards
Daniel
{<hdr_num = {"=count(distinct hdr_num)=1"}>} ?
May as below:
Fabs(sum( {<hdr_num = {"=Count(DISTINCT hdr_num)"}>}
if(trade_type_name='APO' and opt_pc_name='Put', (opt_strike_price)*payment_qty,
if(trade_type_name='APO' and opt_pc_name='Call', (-opt_strike_price)*payment_qty))))
No, because the count(...) is just a search string so you can select the hdr_num you want in your set.
So maybe it should be where count distinct equals count:
So maybe {<hdr_num = {"=count(distinct hdr_num)=count(hdr_num)"}>} ?
Thanks for your replies.
I have the below expressions that calculate the value correctly, however I am unsure how to join them together in one field:
Sum(Aggr(sum(DISTINCT{<opt_pc_name={`Put`}>}opt_strike_price*payment_qty),hdr_num))
Sum(Aggr(sum(DISTINCT{<opt_pc_name={`Call`}>}opt_strike_price*-payment_qty),hdr_num))
Regards,
Daniel
Like Below,
Sum(Aggr(sum(DISTINCT{<opt_pc_name={`Put` & 'Call'}>}opt_strike_price*payment_qty),hdr_num))
Hi Anil,
Thanks for the reply.
The Call is * -payment_qty and the Put is * payment_qty
Regards,
Daniel
Daniel,
Can you please post sample Application for us?