Expand my Community achievements bar.

Join us LIVE in San Francisco on November 14th for Experience Makers The Skill Exchange. Don't miss out on this free learning event!

Calculated Field - Sum and Divide

Avatar

Level 4
Hello, I'm looking for some help with a calculated field on a custom form I want to use to sum up the values from 3 fields and divide them by a 4th field. Using my limited knowledge I set the field up as SUM then added in the names of each field I want to add up however it only lets me enter 2 values/field names, if I add anymore it shows the error as per screen shot. I then would like to divide the total of all values by the Number of Contacts Targeted field, I tried using '/' as divide with no luck - please can someone help? Many thanks! Vikki Gibbs WF System Admin Paragon Customer Communications
Topics

Topics help categorize Community content and increase your ability to discover relevant content.

6 Replies

Avatar

Employee Advisor
@Vikki Gibbs When using calculated fields, you do need to use calculated expressions, rather than the mathematical symbol. For your example, it would look like the following DIV(SUM(Custom Field 1, Custom Field 2, Custom Field 3, Custom Field 4),Total number of contacts targeted) This will sum all 4 of your fields together and then divide that number by total number of contacts targeted. If the system does not allow you to enter all 4 fields into your SUM expression, make sure they are all setup as Number fields rather than text. Nichole Vargas Customer Programs Specialist, Workfront

Avatar

Level 1

Trying to do a similar (simplified) calculation using 2 custom fields:

Custom Field 1 = Current Year Revenue

Custom Field 2 = Account Budget

Looking to calculate the % of Budget based on the revenue (ie 20% of budget met). Tried DIV(Current Year Revenue,Account Budget) but it is not showing any results for the calculated field when viewing the report.

Avatar

Employee Advisor

@Laura Schupbach‚ You may need to recalculate the custom expression. This can be done by going into Setup > Custom Forms > Select the form with this field attached > Select the calculated field and then in the left hand panel, scroll down until you see the checkbox for "Update previous calculations (in the background)" - see screenshot here. Then, click Done > Save and Close and your calculation should update and pull into reports.

If you run into any issues, let me know!

Avatar

Level 4
Hi Nichole, Many thanks for your reply - I have tried out the suggestion but I'm still getting the error message. I went back and changed all the custom fields to Number and deleted the original calculated field as it had been set up as Text and started again but I can't pinpoint what I'm doing wrong. Here is a screen shot of my field - any further help would be much appreciated! Many thanks Vikki Gibbs WF System Admin Paragon Customer Communications

Avatar

Community Advisor
Looks like the end bracket is missing. But sometimes I also have to add the blank field first, save it, and then go back and add the calculation. -skye

Avatar

Level 4
Thanks Skye! Worked perfectly and has given me the confidence in trying this on other forms. many thanks Vikki Gibbs WF System Admin Paragon Customer Communications