Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Error in expression with multiple if conditions.

Is  there anything wrong I am doing here? 

I have to calulate the sum([GL Post Amount] * (alt([Partnership Percent],1)))  for the below if conditions.

sum(IF([Source Code]='NFSC' ,
         IF(SECR_LVL_CD_1 <> 'INSURANCE',
          IF(SECR_LVL_CD_1 <> 'ANNUITY',
           IF(SECR_LVL_CD_1 <> 'ANNUITIES',
            IF(SecondTransactonTypeCode='FEE'))))),[GL Post Amount] * (alt([Partnership Percent],1)))

Thanks in adavance.

1 Solution

Accepted Solutions
pgrenier
Partner - Creator III
Partner - Creator III

Good day,

One thing is for sure, you can easily simplify your expression:

Sum(If([Source Code]='NFSC' and Match([SECR_LVL_CD_1], 'INSURANCE','ANNUITY','ANNUITIES')=0 andSecondTransactonTypeCode='FEE', [GL Post Amount] * alt([Partnership Percent],1) ,0))

Regards,

Philippe

View solution in original post

1 Reply
pgrenier
Partner - Creator III
Partner - Creator III

Good day,

One thing is for sure, you can easily simplify your expression:

Sum(If([Source Code]='NFSC' and Match([SECR_LVL_CD_1], 'INSURANCE','ANNUITY','ANNUITIES')=0 andSecondTransactonTypeCode='FEE', [GL Post Amount] * alt([Partnership Percent],1) ,0))

Regards,

Philippe