Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
ShowAll Questionssorted byDate Posted
Steve 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 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 ?

Ankit 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 NOW
Hi, there's multiple picklists but on the same object. Ideally the sum would populate a field on this object.
Ankit 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 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 Sehgal
yes
Steve Cairney NOW
So simple! Was expecting it to be more complicated. Thanks very much