Skip to main content
Formula Field Help

 

I am trying to update the formula for the formula field "Net Snack SKU Gain or Loss" to only calculate "Total Snack SKU's Current Year" - "Total Snack Sku's Prior Year" if both Total Snack Sku's current Year and Total Snack Skus Prior year have numbers in them. 

 

My formula is not working . Here is what I have : 

 

IF(

 

OR(

 

ISBLANK(Total_Snack_SKU_s_Current_Year__c) ,

 

( ISBLANK(Total_Snack_SKU_s_Prior_Year__c) )),

 

0, (Total_Snack_SKU_s_Current_Year__c - Total_Snack_SKU_s_Prior_Year__c))
2 件の回答
  1. 2020年8月25日 22:03
    Claudia,

     

    The OR function only returns 'False' if all arguments are 'False'.  Please let me know if the following formula will sovle your use case:

     

    IF(

     

    AND(

     

    NOT( ISBLANK(Total_Snack_SKU_s_Current_Year__c)),

     

    NOT (ISBLANK(Total_Snack_SKU_s_Prior_Year__c))

     

    ),

     

    Total_Snack_SKU_s_Current_Year__c - Total_Snack_SKU_s_Prior_Year__c,

     

    0

     

    )

     

    Also, try selecting the "Treat blank fields as blanks" .

     

    I hope this helps!

     

    Thanks,

     

    Robert
0/9000