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 个回答
I think the first IF block executed -
IF(Revenue_2014__c = 0, 1.0, .... )
and hence a 100%
Try this -
BTW why mutiply by 1 :-)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
)
)
)