• Chris McCoy 6
  • NEWBIE
  • 20 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 3
    Replies
I'm new to Salesforce and I am trying to create a formula that will look at two variables and determine a cost percentage.

Field 1 is a status (picklist) and Field2 is either null or Available(picklist). For Statuses PROC & UNCO the second variable isn't needed - only for the EXIS status.  The cost percentage is then based on either the one variable or the combination and I used CASE function to determine the percentage that goes into Field3. 
The formula works great for anything in PROC or UNCO status - but nothing happens if it is in EXIS status. Any suggestions will be greatly appreciated.
IF( ISPICKVAL(Account.Field1_Status_NA__c, "PROC") ,
CASE(Account.Field3_NA__c,"A", 15/100,"B",20/100,"C",20/100,"D",20/100,"E",25/100, "F",25/100,"G", 30/100,0),

IF(ISPICKVAL(Account.Field1_Status_NA__c, "UNCO") ,
CASE(Account.Field3_NA__c,"A", 15/100,"B",20/100,"C",20/100,"D",20/100,"E",25/100, "F",25/100,"G", 30/100,0),

IF(AND(ISPICKVAL(Account.Field1_Status_NA__c, "EXIS") , ISPICKVAL( Account.Field2__c, " ")) ,
CASE(Account.Field3_NA__c,"A", 10/100 ,"B",15/100, "C",15/100,"D",15/100,"E",25/100, "F",25/100,"G", 0,0),

IF(AND(ISPICKVAL(Account.Field1_Status_NA__c,"EXIS"), ISPICKVAL( Account.Field2__c, "Available" )),
CASE(Account.Field3_NA__c,"A", 5/100,"B",10/100,"C",10/100,"D",10/100,"E",15/100, "F",15/100,"G",0, 0), Null) ) ) )
 
I'm new to Salesforce and I'm having issues with a formula to calculate fees based on number of units. The current formula is simple and works.
if(Account.Units_NA__c>0,
if(Account.Units_NA__c>50,
46000+(Account.Units_NA__c-50)*200,46000),Null)
If the units are less than 50,  it is null, if they are greater than 50, it is 46000 plus 200 for each unit over 50 - otherwise display 46000.
There is new criteria - we have multiple specialties and one of them has a different fee calculation. I tried multiple times to add that criteria and calculation but I keep getting errors - to add a ) or remove a , but I just can't make it work. I think I've butchered it so much that it doesn't bear any resemblance to what it should look like. Any help will be greatly appreciated!
if(Account.Units_NA__c>0,
if(Account.Units_NA__c>50,
46000+(Account.Units_NA__c-50)*200,46000),Null)
or(if(ispickval( Account.Specialty_Branding_NA__c ,"Best"),
If(Account.Units_NA_c> 0,
If(Account.Units_NA_c > 200,
20000+(Account.Units_NA__c-200)*5,20000)))

 
I'm new to Salesforce and I am trying to create a formula that will look at two variables and determine a cost percentage.

Field 1 is a status (picklist) and Field2 is either null or Available(picklist). For Statuses PROC & UNCO the second variable isn't needed - only for the EXIS status.  The cost percentage is then based on either the one variable or the combination and I used CASE function to determine the percentage that goes into Field3. 
The formula works great for anything in PROC or UNCO status - but nothing happens if it is in EXIS status. Any suggestions will be greatly appreciated.
IF( ISPICKVAL(Account.Field1_Status_NA__c, "PROC") ,
CASE(Account.Field3_NA__c,"A", 15/100,"B",20/100,"C",20/100,"D",20/100,"E",25/100, "F",25/100,"G", 30/100,0),

IF(ISPICKVAL(Account.Field1_Status_NA__c, "UNCO") ,
CASE(Account.Field3_NA__c,"A", 15/100,"B",20/100,"C",20/100,"D",20/100,"E",25/100, "F",25/100,"G", 30/100,0),

IF(AND(ISPICKVAL(Account.Field1_Status_NA__c, "EXIS") , ISPICKVAL( Account.Field2__c, " ")) ,
CASE(Account.Field3_NA__c,"A", 10/100 ,"B",15/100, "C",15/100,"D",15/100,"E",25/100, "F",25/100,"G", 0,0),

IF(AND(ISPICKVAL(Account.Field1_Status_NA__c,"EXIS"), ISPICKVAL( Account.Field2__c, "Available" )),
CASE(Account.Field3_NA__c,"A", 5/100,"B",10/100,"C",10/100,"D",10/100,"E",15/100, "F",15/100,"G",0, 0), Null) ) ) )