You need to sign in to do that
Don't have an account?
Adam Burn
Formula "IF AND within past year, display conditional images"
I'm trying to display a graphic that is conditional based on whether a certain number of events have occured during the past calendar year. The logic is as follows - if someone has attended more than 2 occasions in the past 12 months, display a smiley face. If not, display a frowny face. I can get this to work without the date parameters but I can't figure out how to limit the formula to assessing just the past 12 months from the current day. Any suggestions would be very much appreciated!
Here is what I've got so far:
IF(Total_Occasions_Attended__c >2, TODAY() - Date_of_Last_Participation__c),
IMAGE("/servlet/servlet.FileDownload?file=015f00000005Qgv", "Happy", 16, 16),
IF(Total_Occasions_Attended__c <3,TODAY() - Date_of_Last_Participation__c ),
IMAGE ("/servlet/servlet.FileDownload?file=015f00000005QhP", "Sad", 16, 16),NULL))
I keep getting this error:
Error: Syntax error. Extra ','
Here is what I've got so far:
IF(Total_Occasions_Attended__c >2, TODAY() - Date_of_Last_Participation__c),
IMAGE("/servlet/servlet.FileDownload?file=015f00000005Qgv", "Happy", 16, 16),
IF(Total_Occasions_Attended__c <3,TODAY() - Date_of_Last_Participation__c ),
IMAGE ("/servlet/servlet.FileDownload?file=015f00000005QhP", "Sad", 16, 16),NULL))
I keep getting this error:
Error: Syntax error. Extra ','
Secondly, the extra comma is because your IF statement is structured incorrectly. The gist is there but the intended logic isn't. In the question, you say "if someone has attended more than 2 occasions in the last year". That should translate into "if total > 2 and their last attendance was within the last year" but your IF statement is actually just checking the number of occasions attended. Look slowly at the code or break each part of the IF statement into a single line--that should reveal the syntax error.
I'm purposefully being vague because I sense you know what you're doing and I don't want to give you working code if all you need is a little nudge.
Mike