Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Page properties
hiddentrue


URL
Notes

Status
colour

Red

Green
title

update needed before release

Live 🚀




Panel

On this page

Table of Contents
exclude(On this page).*
stylecircle
typeflat
separatorpipe



UI Text Box
sizemedium
typeinfo

Calculation rules are the entry point for every calculation within sumUp.

They define which values should be calculated in which way (sum, average) and how they should be displayed.


Why do I need calculation rules?

Calculation rules are used within sumUp to tell the app which values should be calculated. In addition, you can set the calculation method and several formatting options.

Create a new rule

Excerpt


UI Steps


UI Step

To create a new calculation rule head over to Manage apps → sumUp calculation rules:


UI Step

Hit the "Add new rule" button in the upper right corner to open the following pop-up menu:


Multimedia
namesumup-create-calculation-rule.mp4
width700

Configuration options

UI Expand
titleMode

The field values can either be

  • summed up to calculate a total or
  • the average can be calculated.


UI Expand
titleRule name

Enter a custom name for the rule.

If nothing is set, the field name will be used as rule name.

UI Text Box
titlePro tip!
typetip

In addition, icons for the summation or average can be used in the name for easier identifaction.



UI Expand
titleOutput format

The output can be formatted using a custom velocity template.

See here how it works!


UI Expand
titleDecimal places

Select the number of decimal places to be displayed.

The values will then be rounded accordingly.


UI Expand
titlePrefix & suffix

Set a custom prefix or suffix to give the user a hint what you are calculating there.


UI Expand
titleIgnore index


UI Text Box
typeinfo

sumUp will by default, takes the field values to be calculated from the Lucene index.

When the checkbox is clicked, the field's value will be calculated at runtime instead.

Activating this setting is useful for scripted or other dynamic fields since the index might contain outdated values at this point. Activating this option will guarantee to always retrieve correct values for those fields.


UI Text Box
typewarning

 However, checking this option may cause performance issues because the values have to be re-calculated each time and won't get grabbed from the index.



UI Expand
titleInput format


UI Text Box
typeinfo

When e.g. trying to calculate values from a text field that also contains other data, you can use another Input format to specify, how the field value should be processed by sumUp.

When Default is selected, sumUp will just take the field value and tries to calculate it.

When Regular Expression is selected, you can enter a custom regular expression to specify how the field value should be processed:

Field valueRegular ExpressionEvaluated data
Words: 79


Code Block
\d+


79
1000 $


Code Block
\d+(\.\d+)?


1000
The average speed was -1.79e5 m/h.


Code Block
[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?


-179000


When Local number format is selected, you can specify a locale format in which the value should be processed:

Field valueLocaleEvaluated data
1.000,5de1000.5
1,000.5en1000.5



UI Expand
titlePrimary

It is possible to create more than just one rule per field.

By hitting the Primary checkbox the current rule will be used for the calculation. The other rule will then be disabled but not deleted. This way it can be switched between several different rules.

UI Text Box
typeinfo

Setting a rule as primary rule is a global setting for sumUp. After changing the primary rule, this rule will be used everywhere in sumUp (like Gagdets, sum rows or sumUp custom fields).







Include Page
DECADIS:Contact support
DECADIS:Contact support