# Percentage incorrect?

I have the below formula which I want to show percent completed. 3 possible vlaues for picklist are NA, pending and completed. So I want to show of the number of completed / number of pending + completed (aka number that are NOT N/a)

(IF(ISPICKVAL(Report_Set__c,'COMPLETED'),1,0))+(IF(ISPICKVAL(Limits_Set__c,'COMPLETED'),1,0))


If I click report_set__c to completed and the other to pending, I get 1.

And the below, with the same values, gives me 2.

(IF(ISPICKVAL(Report_Set__c,'N/A'),0,1))+(IF(ISPICKVAL(Limits_Set__c,'N/A'),0,1))


But 1 / 2 equals 200%? Bc that's what I get with the below formula!

(IF(ISPICKVAL(Report_Set__c,'COMPLETED'),1,0))+(IF(ISPICKVAL(Limits_Set__c,'COMPLETED'),1,0))

/

(IF(ISPICKVAL(Report_Set__c,'N/A'),0,1))+(IF(ISPICKVAL(Limits_Set__c,'N/A'),0,1))


Two things going wrong here -

1. The value you're seeing is actually 2.0, and I'm guessing you have it as a field of type percentage, so it's showing 200%
2. Your order of operations are wrong - the system is evaluating it like this: 1 + (0/1) + 1 = 2.0

Change it to this, adding parentheses around the numerator and denominator:

((IF(ISPICKVAL(Report_Set__c,'COMPLETED'),1,0))+(IF(ISPICKVAL(Limits_Set__c,'COMPLETED'),1,0)))

/

((IF(ISPICKVAL(Report_Set__c,'N/A'),0,1))+(IF(ISPICKVAL(Limits_Set__c,'N/A'),0,1)))


And multiply it by a factor of .01, to make the result be the correct order of magnitude.