+ Start a Discussion
Steve Cairney NOWSteve Cairney NOW 

Is it possible to calculate a total based on PICKLIST values?

Hi, I'm spitballing here, but if I had a couple of PICKLIST's that contained the terms

Excellent
Average
Poor

and these where assigned a value is true in an IF statement (3,2,1) would it be possible to get a total to give a final score?

Example:
IF(ISPICKVAL( picklist__c, "Excellent"), 3,0,
IF(ISPICKVAL( picklist__c, "Average"), 2,0,
IF(ISPICKVAL( picklist__c, "Poor"), 1,0,
0
)))

Can I add another picklist__c in the same formula and add up the results?
Best Answer chosen by Steve Cairney NOW
Ankit SehgalAnkit Sehgal

I've assumed that there are two picklist's on your object pick1__c and pick2__c both with same values, "Excellent','Average' and 'Poor'.

i created this formula field of return type number with the follwing formula:

 IF( ISPICKVAL( pick1__c , 'Excellent') , 3,  IF(  ISPICKVAL( pick1__c , 'Average')  , 2,  IF( ISPICKVAL( pick1__c , 'Poor') , 1, 0) ) )  + IF( ISPICKVAL( pick2__c , 'Excellent') , 3,  IF(  ISPICKVAL( pick2__c , 'Average')  , 2,  IF( ISPICKVAL( pick2__c , 'Poor') , 1, 0) ) )

is this what you were looking for ?

All Answers

Ankit SehgalAnkit Sehgal
Hi Steve,
Do you have multiple picklist on the same object or do you want to calculate this sum on the master object ?
Steve Cairney NOWSteve Cairney NOW
Hi, there's multiple picklists but on the same object. Ideally the sum would populate a field on this object.
Ankit SehgalAnkit Sehgal

I've assumed that there are two picklist's on your object pick1__c and pick2__c both with same values, "Excellent','Average' and 'Poor'.

i created this formula field of return type number with the follwing formula:

 IF( ISPICKVAL( pick1__c , 'Excellent') , 3,  IF(  ISPICKVAL( pick1__c , 'Average')  , 2,  IF( ISPICKVAL( pick1__c , 'Poor') , 1, 0) ) )  + IF( ISPICKVAL( pick2__c , 'Excellent') , 3,  IF(  ISPICKVAL( pick2__c , 'Average')  , 2,  IF( ISPICKVAL( pick2__c , 'Poor') , 1, 0) ) )

is this what you were looking for ?

This was selected as the best answer
Steve Cairney NOWSteve Cairney NOW
Yes, that would do it. Would that give the total? So if pick1 was Excellent (3) and pick2 was Poor (1) the formula would return '4'?
Ankit SehgalAnkit Sehgal
yes
Steve Cairney NOWSteve Cairney NOW
So simple! Was expecting it to be more complicated. Thanks very much