Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Expression error.....??

Dear All,

Part of my table is shown below.

BCOD ME_CODE REF_NO POL_NO CLA_CODE PREMUMBRO_ORCAGE_ORCGRO_ORCDIRECT MEORC_COM
BA00DIRBA0014D0028343BA0005HH000233HH151950329013410
BA0014D0028344BA95HH000112HH164000356014480
5568BA0014D0028243BA0007HH000275HH117730248010870
BA0014D0028258BA02HH000198HH5303501127048370
BA0014D0028484BA0012HH000333HH5319501107050180
6297BA0014D0028454BA0014HH0000355HH27100057502479575
54781BA0014D0028455BA0014HH0000356HH6495000625625

The expression I used to calculate "DIRECT ME" is as follows.

ALT(SUM({<'BRO_ORC'={'0'},AGE_ORC={'0'},GRO_ORC={'0'}>}(COM_PRE*ME_COM+SR*ME_RS+TC*ME_TC))/100)

I want to calculate "DIRECT ME" , only when there is "0" value against the three columns(BRO_COM,AGE_COM,GRO_COM)

Please help me.

Regards,

Priyantha.

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

If(BRO_ORC=0 and AGE_ORC=0 and GRO_ORC=0,ALT(SUM(COM_PRE*ME_COM+SR*ME_RS+TC*ME_TC)/100))

View solution in original post

4 Replies
anbu1984
Master III
Master III

Are you getting error message or not getting expected output?

tresesco
MVP
MVP

Try like:

ALT(SUM(If(BRO_ORC=0 and AGE_ORC=0 and GRO_ORC=0,(COM_PRE*ME_COM+SR*ME_RS+TC*ME_TC))/100)

stigchel
Partner - Master
Partner - Master

if BRO_COM,AGE_COM,GRO_COM are expressions (aggegrates of the data) you can not reference them in set analysis as fields. You can reference the expressions outside by using the label of the expression

e.g.

if(BRO_COM=0 and AGE_COM=0 and GRO_COM=0,YourExpression)

Anonymous
Not applicable
Author

If(BRO_ORC=0 and AGE_ORC=0 and GRO_ORC=0,ALT(SUM(COM_PRE*ME_COM+SR*ME_RS+TC*ME_TC)/100))