I am struggling to get a formula field to work. I have tried Nested IF statements and CASE functions but too many syntax errors. Here's the business case:
On an account record we already have 2 formula fields: One field = (Is_Client_c). This is a binary field returning 1 = Clients 0 for Non Clients based on other critieria (not important here). The other formula is Account Rating (Rating_C) which designates the level of service they receive (Ratings= A, B, or C).
Based on the client's rating, there should be a specific Service Cadence , i.e. how often maintenance calls should occur. Example, A Clients should be visitied every 42 days. If not the service rep gets a Warning signal to act soon. They have another 42 days to get it done. If not, it goes to Off Cadence and upper mgmt is warned.
So, we would like to have this info in Salesforce.com as fields. I've tried many ways to build this formula. Here's where I left off. I know this formula is wrong but thought I would add it so you can see the basic logic. Would love some help !
IF (
And ( Is_Client__c = ‘1’) , ( Rating__c = 'A',) ,
IF (Days_Since_Last_Service__c <= 42), 'On Cadence',
IF (Days_Since_Last_Service__c <= 84), 'Warning',
IF (Days_Since_Last_Service__c > 85), 'Off Cadence')
IF ( Rating__c = 'B',
IF (Days_Since_Last_Service__c <=84), 'On Cadence',
IF (Days_Since_Last_Service__c <=126), 'Warning',
IF (Days_Since_Last_Service__c > 126), 'Off Cadence'))
IF (
( Rating__c = 'C’,
IF (Days_Since_Last_Service__c <= 168), 'On Cadence',
IF (Days_Since_Last_Service__c <= 210), 'Warning',
IF (Days_Since_Last_Service__c > 210), 'Off Cadence'), “n/a”))))))
Thanks In Advance
5 respuestas
Hi
Please try this. Considered IS_Client__c as checkbox.
IF (
And ( IS_Client__c , Text(Rating__c ) = 'A') ,
IF (Days_Since_Last_Service__c <= 42, 'On Cadence',
IF (Days_Since_Last_Service__c <= 84 , 'Warning','Off Cadence')) ,
IF (AND ( IS_Client__c , Text(Rating__c ) = 'B'),
IF (Days_Since_Last_Service__c <= 84, 'On Cadence',
IF (Days_Since_Last_Service__c <= 126 , 'Warning','Off Cadence')) ,
IF ( AND ( IS_Client__c , Text(Rating__c ) = 'C'),
IF (Days_Since_Last_Service__c <= 168, 'On Cadence',
IF (Days_Since_Last_Service__c <= 210 , 'Warning','Off Cadence')) , Null)))
Thanks