Jump to content
Salesforce and other SMB Solutions are coming soon. ×

Average(field...) omit if zero


Tagus

Recommended Posts

I have a Calculation field which returns to me the average value of another field (labour). I would like the calculation to disregard values of zero in "labour". Is this possible to build into a calculation?

Link to comment
Share on other sites

I need a little more information about what you're really trying to accomplish to really answer your question.

 

However, I've written an example that shows how you could get the average in a foundset of records and disregard 0 or empty values in the average:

 

Assume you want the average of "My_Number".

 

Create a calc field, "My_Number_Weight"

 

Case(

IsEmpty( TargetField ) or TargetField = 0,

0,

1

)

 

Then create a summary field "Average"

 

Summary

Average Of: My_Number

Select "Weighted Average"

Weighted by: My_Number_Weight

 

Does this answer your question?

Link to comment
Share on other sites



×
×
  • Create New...

Important Information

Terms of Use