You need to sign in to do that
Don't have an account?

Sum multiple fields
I wanted to create a formula to sum fields. Right now this is the formula I have.
(IF(Opportunity.UH_Covered_Lives__c:SUM> 0,Opportunity.Final_Sold_Lives__c:SUM,+IF(Opportunity.UH_Covered_Lives__c:SUM<0,Opportunity.UH_Covered_Lives__c:SUM,0)))
I am attempting to SUM Final Sold Lives (FSL) in the event UH Covered Lives (UCL) is empty and then sum that number to the instances where UCL is not empty. Right now I'm only returning the total for FSL. The below example I would expect the total to be 31 not 11.

(IF(Opportunity.UH_Covered_Lives__c:SUM> 0,Opportunity.Final_Sold_Lives__c:SUM,+IF(Opportunity.UH_Covered_Lives__c:SUM<0,Opportunity.UH_Covered_Lives__c:SUM,0)))
I am attempting to SUM Final Sold Lives (FSL) in the event UH Covered Lives (UCL) is empty and then sum that number to the instances where UCL is not empty. Right now I'm only returning the total for FSL. The below example I would expect the total to be 31 not 11.
Nice drawing. Baquiat would have liked it.
You have written this:
IF (Opportunity.UH_Covered_Lives__c:SUM > 0 THEN
Opportunity.Final_Sold_Lives__c:SUM
ELSE IF(Opportunity.UH_Covered_Lives__c:SUM < 0 THEN
Opportunity.UH_Covered_Lives__c:SUM
ELSE 0
The following formula is logical but that could not be your need:
IF ( Opportunity.UH_Covered_Lives__c:SUM > 0,Opportunity.Final_Sold_Lives__c:SUM, 0 )
+ IF ( Opportunity.UH_Covered_Lives__c:SUM > 0,Opportunity.UH_Covered_Lives__c:SUM, 0 )
Alain
FSL=30 UCL=29 The total is 59 where it should 29
I think the below is a better example.
Group 1 UCL= 29 FSL=30
Group 2 UCL = 0 FSL = 30
Group 3 UCL = 50 FSL 2
In this example I would want the following to happen.
If UCL is greater than 0 use UCL
Else IF FSL is greater than 0 use FSL. Using this logic with the above i would take the following from each group.
Group 1 = 29
Group 2 = 30
Group 3 = 50
Total = 109
Currently the formula is returning the following
Group1=59
Group2=30
Group3=52
Total=141
Else IF FSL is greater than 0 use FSL. Using this logic with the above i would take the following from each group.
IF(Opportunity.UH_Covered_Lives__c:SUM > 0, Opportunity.UH_Covered_Lives__c:SUM,
IF(Opportunity.Final_Sold_Lives__c:SUM > 0,Opportunity.Final_Sold_Lives__c:SUM,0))
You have solved yourself your problem writting the formula with IF and ELSE.
IF ( condition , <return value #1 if true> , < return value #2 if false> / <include new if condition > )
Alain