Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Please help me with the below expression.

  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.

4 Replies
Gysbert_Wassenaar

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)


talk is cheap, supply exceeds demand
CELAMBARASAN
Partner - Champion
Partner - Champion

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

Not applicable
Author

 

SecondTransactonTypeCode -= {'FEE','FCR'} IS GIVING error.

CELAMBARASAN
Partner - Champion
Partner - Champion

It will underline as error but you will see expression ok. Some issue in the syntax checking.