Skip to main content
I am trying to create a formula field that looks at 4 RUS fields (EP Small, EP Micro, EP Medium and EP Affiliate, each returning a 0 or higher number), plus a date field.

 

I want to say:

 

If EP Small is greater than 0 and date is greater than or equal to today, then say Small,

 

if not, if EP Micro is greater than 0 and date is greater than or equal to today, then say Micro,

 

if not, if EP Medium is greater than 0 and date is greater than or equal to today, then say Medium,

 

if not, if EP Affiliate is greater than 0 and date is greater than or equal to today, then say Affiliate,

 

else say blank

 

I keep getting incorrect perameter errors and can't work out what to do to fix them.

 

This is my formula:

 

IF(

 

AND(

 

Date__c >=TODAY(),

 

(IF(

 

EP_Small__c > 0, "Small", 

 

IF(

 

EP_Micro__c > 0, "Micro",

 

IF(

 

EP_Medium__c > 0,"Medium",

 

IF(

 

EP_Affiliate__c > 0,"Affiliate", " "))))

 

)))

 

The error highlights the secon IF and says: Error: Incorrect parameter type for function 'AND()'. Expected Boolean, received Text

 

How do I fix this?

 

All help gratefully received.
7 件の回答
  1. 2018年11月2日 13:55

    Try this

    IF(

    Date__c >= TODAY(),

    IF(

    EP_Small__c > 0, 'Small',

    IF(

    EP_Micro__c > 0, 'Micro',

    IF(

    EP_Medium__c > 0, 'Medium',

    IF(

    EP_Affiliate__c > 0, 'Affiliate',

    NULL

    )

    )

    )

    ),

    NULL

    )

     

     
0/9000