Calculated Column Expression Formatting

funk44

New member
Local time
Today, 01:09
Joined
Nov 1, 2013
Messages
9
Hi all

After posting in another thread it was identified that my original table structure had a few issues

I've now since moved everything into one table but i need some help with the formatting of my calculated field (I'm new to all this)

Below are the 3 expressions working independently of one another, i just need them combined in to one if possible. As i am getting an "invalid syntax" error or "too many arguments" when i try to get it working

Thanks in advance

PHP:
0.5*IIf([Type]="Offlist" And [APP_LINE_OFFA]>3,1,0)+0.2*IIf([Type]="Offlist" And [APP_LINE_OFFB]>2,1,0)+IIf([Type]="Offlist",Abs([EP_DETAILS_OFF]*0.15+[REF_DETAILS_OFF]*0.15),0)
PHP:
IIf([Type]="Onlist",Abs([EP_DETAILS_ON]*0.15+[REF_DETAILS_ON]*0.2+[GEN_NOTE_ON]*0.2+[APP_LINE_ON]*0.25+[SPEC_INS_ON]*0.2),0)
PHP:
IIf([Type]="Aged Report", Abs([EP_DETAILS_AGED]*0.2+[REF_DETAILS_AGED]*0.2+[GEN_NOTES_AGED]*0.3+[SPEC_INS_AGED]*0.3),0)
 
Where, exactly, are used this expressions ?
How you use it ?

Can you upload your DB (2003 or 2007 version) ?
 
Thanks for the quick reply

Its used in a table to calculate a quality score depending on type

I am unable to upload my db as i believe i don't have enough posts. I use 2010 as well
 
Hi

After a bit more headscratching i solved my problem and learnt a bit in the process

The final statement is below

PHP:
IIf([Type]="Onlist",Abs([EP_DETAILS_ON]*0.15+[REF_DETAILS_ON]*0.2+[GEN_NOTE_ON]*0.2+[APP_LINE_ON]*0.25+[SPEC_INS_ON]*0.2),IIf([Type]="Aged Report",Abs([EP_DETAILS_AGED]*0.2+[REF_DETAILS_AGED]*0.2+[GEN_NOTES_AGED]*0.3+[SPEC_INS_AGED]*0.3),IIf([Type]="Offlist" And [APP_LINE_OFFA]>3,Abs(1*0.5),0)+IIf([Type]="Offlist" And [APP_LINE_OFFB]>2,Abs(1*0.2),0)+IIf([Type]="Offlist",Abs([EP_DETAILS_OFF]*0.15+[REF_DETAILS_OFF]*0.15),0)))
 
Happy for you because you solve the issue.
I am unable to upload my db as i believe i don't have enough posts.
You can upload anything but only in ZIP format.
 

Users who are viewing this thread

Back
Top Bottom