+ Start a Discussion
Rytec AdministratorRytec Administrator 

Greater than, = or Less than, missing ) syntax error

The requirement now is to add gray indicator if the ROI months are greater than 36.
Red for greater than 24 but less than or = 36 months.
Yellow for greater than or = to 13 but less than 24 and green for less than 13.

Gray >36
red 25-36 months
yellow 13-24 months
green 1-12 months


IF( 
ROI_No_of_Months__c  < 13,
IMAGE("//c.na139.content.force.com/servlet/servlet.FileDownload?file=0154W00000BiFeo", "green", 30, 30),
IF(
AND(
ROI_No_of_Months__c  >= 13,
ROI_No_of_Months__c  <= 24
),
IMAGE("//c.na139.content.force.com/servlet/servlet.FileDownload?file=0154W00000BiFee", "yellow", 30, 30),
IF(
AND(
ROI_No_of_Months__c  >= 25,
ROI_No_of_Months__c  <= 36
),
IMAGE("//c.na139.content.force.com/servlet/servlet.FileDownload?file=0154W00000BiFej", "red", 30, 30)
IF(
ROI_No_of_Months__c > 36, 
IMAGE("//c.na139.content.force.com/servlet/servlet.FileDownload?file=0154W00000BiFlp", "gray", 20, 20), 
),
)
)
)
)
Best Answer chosen by Rytec Administrator
AmitSoniAmitSoni
Try this:
IF( ROI_No_of_Months__c  < 13,
    IMAGE("//c.na139.content.force.com/servlet/servlet.FileDownload?file=0154W00000BiFeo", "green", 30, 30),
IF(AND(ROI_No_of_Months__c  >= 13,
       ROI_No_of_Months__c  <= 24),
    IMAGE("//c.na139.content.force.com/servlet/servlet.FileDownload?file=0154W00000BiFee", "yellow", 30, 30),
IF(AND(ROI_No_of_Months__c  >= 25,
       ROI_No_of_Months__c  <= 36),
    IMAGE("//c.na139.content.force.com/servlet/servlet.FileDownload?file=0154W00000BiFej", "red", 30, 30),
  IMAGE("//c.na139.content.force.com/servlet/servlet.FileDownload?file=0154W00000BiFlp", "gray", 20, 20)
)
)
)
Hope this will resolve your issue!!
 

All Answers

gaurav gupta 253gaurav gupta 253
Try below and adjust it as per your default color requirement...
IF( 
ROI_No_of_Months__c  < 13,
IMAGE("//c.na139.content.force.com/servlet/servlet.FileDownload?file=0154W00000BiFeo", "green", 30, 30),
IF(
AND(
ROI_No_of_Months__c  >= 13,
ROI_No_of_Months__c  <= 24
),
IMAGE("//c.na139.content.force.com/servlet/servlet.FileDownload?file=0154W00000BiFee", "yellow", 30, 30),
IF(
AND(
ROI_No_of_Months__c  >= 25,
ROI_No_of_Months__c  <= 36
),
IMAGE("//c.na139.content.force.com/servlet/servlet.FileDownload?file=0154W00000BiFej", "red", 30, 30)
IF(
ROI_No_of_Months__c > 36, 
IMAGE("//c.na139.content.force.com/servlet/servlet.FileDownload?file=0154W00000BiFlp", "gray", 20, 20), 
),
IMAGE("//c.na139.content.force.com/servlet/servlet.FileDownload?file=0154W00000BiFeo", "green", 30, 30)
)
)
)
 
Rytec AdministratorRytec Administrator
That was quick, thank you so much for the response.  I am still receiving this:
Still missing )
AmitSoniAmitSoni
Try this:
IF( ROI_No_of_Months__c  < 13,
    IMAGE("//c.na139.content.force.com/servlet/servlet.FileDownload?file=0154W00000BiFeo", "green", 30, 30),
IF(AND(ROI_No_of_Months__c  >= 13,
       ROI_No_of_Months__c  <= 24),
    IMAGE("//c.na139.content.force.com/servlet/servlet.FileDownload?file=0154W00000BiFee", "yellow", 30, 30),
IF(AND(ROI_No_of_Months__c  >= 25,
       ROI_No_of_Months__c  <= 36),
    IMAGE("//c.na139.content.force.com/servlet/servlet.FileDownload?file=0154W00000BiFej", "red", 30, 30),
  IMAGE("//c.na139.content.force.com/servlet/servlet.FileDownload?file=0154W00000BiFlp", "gray", 20, 20)
)
)
)
Hope this will resolve your issue!!
 
This was selected as the best answer
Rytec AdministratorRytec Administrator
PERFECT!  Thank you soooo much! :)