Calculated Field - Sum and Divide | Community
Skip to main content
Level 4
March 11, 2020
Question

Calculated Field - Sum and Divide

  • March 11, 2020
  • 4 replies
  • 1770 views
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
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

4 replies

NicholeVargas
Adobe Employee
Adobe Employee
March 11, 2020
@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
June 15, 2020

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.

NicholeVargas
Adobe Employee
Adobe Employee
June 15, 2020

@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!

VikkiGi1Author
Level 4
March 13, 2020
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
skyehansen
Community Advisor
Community Advisor
March 13, 2020
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
VikkiGi1Author
Level 4
March 16, 2020
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