Skip to main content
I have added a custom formula field with the following formula

 

IF( Revenue_2014__c = 0, 1.0, IF( Revenue_2015_Plus_Sales_CY__c = 0,-1.0, IF( (Revenue_2014__c = 0) && (Revenue_2015_Plus_Sales_CY__c = 0), 0.0, ((Revenue_2015_Plus_Sales_CY__c - Revenue_2014__c ) / Revenue_2015_Plus_Sales_CY__c ) * 1)))

 

The underlined portion is intended to return a 0% value if these (2) fields are equal however I'm getting a value of 100% - what am I doing wrong?

 

Thanks, Roger
5 个回答
  1. 2015年11月4日 15:04
    I think the first

    IF block executed - 

    IF(Revenue_2014__c = 0, 1.0, .... )

    and hence a 100%

     

    Try this - 

    IF(

    Revenue_2014__c = 0 &&

    Revenue_2015_Plus_Sales_CY__c <> 0,

    1.0,

    IF(

    Revenue_2015_Plus_Sales_CY__c = 0 &&

    Revenue_2014__c <> 0,

    -1.0,

    IF(

    Revenue_2014__c = 0 &&

    Revenue_2015_Plus_Sales_CY__c = 0,

    0.0,

    (

    (Revenue_2015_Plus_Sales_CY__c - Revenue_2014__c) /

    Revenue_2015_Plus_Sales_CY__c

    ) * 1

    )

    )

    )

    BTW why mutiply by 1 :-)
0/9000