function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
sumit dsumit d 

formula field for Avarage of 3 picklist fields and 2 text fields

HI All,
 i have a formula field getting avarage of five fields and when a field is blank still it should get the Avarage.
my formula is given below:-
If((VALUE(TEXT(Agency_Health__c))+ VALUE(TEXT(Client_Relationship__c)) + VALUE(TEXT(Renewal__c)) + VALUE(TEXT(Delivery__c)) + VALUE(TEXT(KPI__c))) <= 0,0,(VALUE(TEXT(Agency_Health__c)) + VALUE(TEXT(Client_Relationship__c)) + VALUE(TEXT(Renewal__c)) + VALUE(TEXT(Delivery__c)) + VALUE(TEXT(KPI__c)) )
/
(if(VALUE(TEXT(Agency_Health__c))>0,1,0)+ if(VALUE(TEXT(Client_Relationship__c))>0,1,0)+ if(VALUE(TEXT(Renewal__c))>0,1,0) + if(VALUE(TEXT(Delivery__c)) > 0,1,0) + if(VALUE(TEXT(KPI__c))>0,1,0))
)
how to solve it?
Any suggestions?
Best Answer chosen by sumit d
TruptiTrupti
I believe all the fields will have number values stored!!

Now, for picklist fields you want to use Value(text(picklist_api))
and for text fields text(text_field_api).


Problem with your logic is, you have used Value(text()) everywhere which is not needed.
Please try once.

Mark as best Answer if it solves issue!

Thanks!