+ Start a Discussion

How to calculate average on Roll up field

I have a custo object  Business. and i have a field  'Amount' on this object. On Account i want to display average of this  'Amount' field. I have created a Roll Up on Account but it was giving only Count , SUM,MIN,MAX. Then How to calculate Average? for this


You need to create two rollup fields one for SUM and other for COUNT after that create a formula field in which divide the SUM rollup field to COUNt rollup field.



Please let me know if u have any problem on same and if this post helps u please throws KUDOS by click on star at left.

allay allayallay allay
Thanks Puja and Tillu
Suraj Tripathi 47Suraj Tripathi 47
Hi Tillu,

Step 1 : You need to create two rollup fields one for SUM 
Step 2 : For COUNT after that create a formula field in which divide the SUM rollup field to count 
rollup field.

Open the link for more information:- 


When you find the solution, mark this as best answer.

Thank you!


Suraj Tripathi  
Atul Raj 12Atul Raj 12
Seven Mentor is the best Salesforce Training provider in the town , Being old and trustworthy from decades the question for frauds doesn't exits ,at Seven Mentor we provide an environment that will be perfect for student to acquire lots of knowledge at Salesforce course in Chennai we came up with best faculty across country , under our Salesforce Training in Chennai (https://www.sevenmentor.com/salesforce-classes-in-chennai), we guarantee you to build carrier in Salesforce Department .
Chaitanya WalukarChaitanya Walukar
create a two roll up summary field one for SUM it will give you back sum of total amount of all child records (if u havn't applied any filter/logi on the child records) then create 2nd roll up summary filed with Count() function it will give u back the total number of child records you have.  and now we already know the formula for calculation of Average (that is sum of amount/total no. of records in child obj (in your case) )   and now just create formule filed inside it derive the value by dividing the SUM() field by Count() filed thats it.

or you can write a trigger where u have to write a query for it. but point and click tools is good approch in this case.
Bram RockBram Rock
A roll-up summary is a field that calculates values from related records. For example, you (https://londoncarsrecovery.co.uk/) can calculate the average number of closed opportunities, or the average amount of closed opportunities, or the SUM, MIN, MAX number.
adam zampaadam zampa
Thank you, was looking for it everywhere and look where I found it.
Now we can offer some changes to our clients in Dragon Ball Series Mods (https://www.universalapk.com/dragon-ball-tap-battle-mod) and take the gaming experience to next level.
The TechieThe Techie

Refer - https://www.youtube.com/watch?v=z6lI_ZO4SmE
Rahul Kumar 952Rahul Kumar 952
Saleforce is great, I have been using it for long time. I wish all developers good luck & to find great Birthday Wishes (https://wishesplus.com/), you can refer to this website. Thank you for sharing incredible knowledge.