Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
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