Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am using 3 sum satements to calcualte the sum where SECR_LVL_CD_1 is different for each of them.Can I use only one expression instead of 3 different expressions?
Sum(If( WorkCurrentFlag='Y'
and PtshpCurrentFlag='Y'
and [Source Code]='NFSC'
and Match(SecondTransactonTypeCode='FEE','FCR')=0
and [SECR_LVL_CD_1]='ANNUITY', [GL Post Amount] * alt([Partnership Percent],1)))
+
Sum(If( WorkCurrentFlag='Y'
and PtshpCurrentFlag='Y'
and [Source Code]='NFSC'
and Match(SecondTransactonTypeCode='FEE','FCR')=0
and [SECR_LVL_CD_1]='INSURANCE',[GL Post Amount] * alt([Partnership Percent],1)))
+
Sum(If( WorkCurrentFlag='Y'
and PtshpCurrentFlag='Y'
and [Source Code]='NFSC'
and Match(SecondTransactonTypeCode='FEE','FCR')=0
and [SECR_LVL_CD_1]='ANNUITIES',[GL Post Amount] * alt([Partnership Percent],1)))
Thanks in adavnce.
I think this could replace it:
Sum({<WorkCurrentFlag={'Y'},PtshpCurrentFlag={'Y'},[Source Code]={'NFSC'},SecondTransactonTypeCode-={'FEE','FCR'}, [SECR_LVL_CD_1]={'ANNUITY','INSURANCE','ANNUITIES' }>} [GL Post Amount] * alt([Partnership Percent],1))
The expression editor doesn't understand -=, but that's a bug in the expression editor
(/me crosses his fingers that no quotes and parentheses are missing)
Try something like
Sum({<WorkCurrentFlag={'Y'},PtshpCurrentFlag={'Y'},[Source Code]={'NFSC'},SecondTransactonTypeCode-={'FEE','FCR'}, [SECR_LVL_CD_1]={'ANNUITY','INSURANCE','ANNUITIES' }>} [GL Post Amount] * alt([Partnership Percent],1))
SecondTransactonTypeCode -= {'FEE','FCR'} IS GIVING error.
It will underline as error but you will see expression ok. Some issue in the syntax checking.