Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear All,
Part of my table is shown below.
BCOD | ME_CODE | REF_NO | POL_NO | CLA_CODE | PREMUM | BRO_ORC | AGE_ORC | GRO_ORC | DIRECT ME | ORC_COM |
---|---|---|---|---|---|---|---|---|---|---|
BA00 | DIR | BA0014D0028343 | BA0005HH000233 | HH | 15195 | 0 | 329 | 0 | 1341 | 0 |
BA0014D0028344 | BA95HH000112 | HH | 16400 | 0 | 356 | 0 | 1448 | 0 | ||
5568 | BA0014D0028243 | BA0007HH000275 | HH | 11773 | 0 | 248 | 0 | 1087 | 0 | |
BA0014D0028258 | BA02HH000198 | HH | 53035 | 0 | 1127 | 0 | 4837 | 0 | ||
BA0014D0028484 | BA0012HH000333 | HH | 53195 | 0 | 1107 | 0 | 5018 | 0 | ||
6297 | BA0014D0028454 | BA0014HH0000355 | HH | 27100 | 0 | 575 | 0 | 2479 | 575 | |
54781 | BA0014D0028455 | BA0014HH0000356 | HH | 6495 | 0 | 0 | 0 | 625 | 625 |
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.
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))
Are you getting error message or not getting expected output?
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)
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)
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))