You need to sign in to do that
Don't have an account?
OleGoRules
Need help with formula
Hey guys, I need some help writing a formula for a combination of checkbox and number fields. Any help would be much appreciated. The logic is to have an engagement scoring model on a scale of (1-5 stars). The engagement score is a progressive measure of an employer's performance over the fiscal year.
If the contact is a top employer (checkbox) - 1 star
If a top performer (checkbox) - 1 star
No. of in person consultations (number field) - 1/2 star for each consultation, max up to 5 consultations a total of 2.5 stars accumulated
No. of appointments booked over the phone (number field) - 1 star for each booking, max up to 3 stars accumulated
No. of seminars booked (number field) - 1/2 star for every 3 seminars booked
Thanks.
If the contact is a top employer (checkbox) - 1 star
If a top performer (checkbox) - 1 star
No. of in person consultations (number field) - 1/2 star for each consultation, max up to 5 consultations a total of 2.5 stars accumulated
No. of appointments booked over the phone (number field) - 1 star for each booking, max up to 3 stars accumulated
No. of seminars booked (number field) - 1/2 star for every 3 seminars booked
Thanks.
I believe this will accomplish what you are seeking, I tried to put the field names similar to the requirement. Hope it helps:
MIN(5, IF(Is_Top_Employer__c , 1, 0) + IF( Is_Top_Performer__c , 1, 0) + MIN(2.5, 0.5 * In_Person_Consults__c ) + MIN(3, Appts_Over_Phone__c * 1) + ( (Seminars_Booked__c - MOD(Seminars_Booked__c, 3)) /3 * 0.5))
*Be sure that below the formula expression the checkbox for: "Treat blank fields as zeroes" is checked.
All Answers
I believe this will accomplish what you are seeking, I tried to put the field names similar to the requirement. Hope it helps:
MIN(5, IF(Is_Top_Employer__c , 1, 0) + IF( Is_Top_Performer__c , 1, 0) + MIN(2.5, 0.5 * In_Person_Consults__c ) + MIN(3, Appts_Over_Phone__c * 1) + ( (Seminars_Booked__c - MOD(Seminars_Booked__c, 3)) /3 * 0.5))
*Be sure that below the formula expression the checkbox for: "Treat blank fields as zeroes" is checked.
You should be able to keep it condensed and reference the original formula with a Case Statement, something like this should easily fit within 5k characters:
CASE(Star_Ranking__c,
1, IMAGE('http://images.clipartpanda.com/clipart-star-RTA9RqzTL.png', '1 Star'),
1.5, IMAGE('http://images.clipartpanda.com/clipart-star-RTA9RqzTL.png', '1.5 Stars'),
2, IMAGE('http://images.clipartpanda.com/clipart-star-RTA9RqzTL.png', '2 Stars'),
2.5, IMAGE('http://images.clipartpanda.com/clipart-star-RTA9RqzTL.png', '2.5 Stars'),
3, IMAGE('http://images.clipartpanda.com/clipart-star-RTA9RqzTL.png', '3 Stars'),
3.5, IMAGE('http://images.clipartpanda.com/clipart-star-RTA9RqzTL.png', '3.5 Stars'),
4, IMAGE('http://images.clipartpanda.com/clipart-star-RTA9RqzTL.png', '4 Stars'),
4.5, IMAGE('http://images.clipartpanda.com/clipart-star-RTA9RqzTL.png', '4.5 Stars'),
5, IMAGE('http://images.clipartpanda.com/clipart-star-RTA9RqzTL.png', '5 Stars'),
IMAGE('http://images.clipartpanda.com/clipart-star-RTA9RqzTL.png', '0 Stars'))
Of course, replace the URLs with your respective images, I just threw a junk one in there that is the same for all. Hope that will help, unless your URL is extremely long?
I atucally uploaded the images to the documents tab - Thank you so much, works wonderfully :).