Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
please help debugging the script below
if ( "REPORTTYPE" = 'FP UNPAIDS GREATER THAN 2',"REPORTVALUE" * -1,
If ( "PLANCODE" = 1560,"REPORTVALUE" * -1,"REPORTVALUE" )) As "Sum of Mailshots",
thanks in advance
Don't use quotes (") around your field names. That will make it a string instead of referencing the field.
if ( REPORTTYPE = 'FP UNPAIDS GREATER THAN 2', REPORTVALUE * -1 ,
If ( PLANCODE = 1560, REPORTVALUE * -1, REPORTVALUE )) As [Sum of Mailshots]
OR you can also try:
if ( REPORTTYPE = 'FP UNPAIDS GREATER THAN 2' or PLANCODE = 1560, REPORTVALUE * -1 , REPORTVALUE ) As [Sum of Mailshots]
I'm assuming REPORTTYPE, PLANCODE & REPORTVALUE are correctly spelt names and they exist in your model and that PLANCODE & REPORTVALUE are numeric.
Hi,
I was told if i use double qoutes it works the same as square brackets and only makes it a field if i used single quotes