How to use Tag Formulas

Updated on:
November 14, 2023

Sometimes you might need to calculate values within your document template. Within Portant you can add calculations for a few simple formulas. 
In this guide we will run through the following formula:

  1. Sum
  2. Average
  3. Maximum
  4. Minimum
  5. Multiply
  6. Add

Sum

Returns the sum of a series of field values, including all field values within a Data Group tag

{{=SUM(tag name, tag name)}}

Syntax

{{=SUM(tag1, tag2, ...)}}

  • tag1 - The first tag to add together.
  • tag2, ... - [ OPTIONAL ] - Additional tags to add to tag1.
The tags included in the brackets don't need to be accompanied by "{{" and "}}"

Average

The AVERAGE function returns the numerical average value in a group of tags, including all field values within a Data Group tag

{{=AVG(tag name, tag name)}}

Syntax

{{=AVG(tag1, tag2, ...)}}

  • tag1 - The first tag or Data Group tag to consider when calculating the average value.
  • tag2, ... - [ OPTIONAL ] - Additional tags to consider when calculating the average value.
The tags included in the brackets don't need to be accompanied by "{{" and "}}"

Maximum

Returns the Maximum value from a group of tags, including all field values within a Data Group tag

{{=MAX(tag name, tag name)}}

Syntax

{{=MAX(tag1, tag2, ...)}}

  • tag1 - The first tag or Data Group tag to consider when calculating the maximum value.
  • tag2, ... - [ OPTIONAL ] - Additional tags to consider when calculating the maximum value.
The tags included in the brackets don't need to be accompanied by "{{" and "}}"

Minimum

To find the Minimum value from a group of tags, including all field values within a Data Group tag

{{=MIN(tag name, tag name)}}

Syntax

{{=MIN(tag1, tag2, ...)}}

  • tag1 - The first tag or Data Group tag to consider when calculating the minimum value.
  • tag2, ... - [ OPTIONAL ] - Additional tags to consider when calculating the minimum value.
The tags included in the brackets don't need to be accompanied by "{{" and "}}"

Multiply

Returns the product of two tags or a tag and a number. Equivalent to the `*` operator.

{{=MULTIPLY(tag name, tag name)}}

{{=MULTIPLY(tag name,0.5)}}

Syntax

{{=MULTIPLY(tag1, tag2)}}

  • tag1 - The first multiplicand.
  • tag2 - The second multiplicand.
The tags included in the brackets don't need to be accompanied by "{{" and "}}"

Add

Returns the sum of two tags. Equivalent to the '+' operator. In Data Grouped tags the calculation occurs per row of data, NOT for all data within the group.

{{=ADD(tag name, tag name)}}
{{=ADD(tag name, 5)}}

Syntax

{{=ADD(tag1, tag2)}}

  • tag1 - The first addend.
  • tag2 - The second addend.
The tags included in the brackets don't need to be accompanied by "{{" and "}}"

Feedback and feature suggestions

We created Portant in 2021 and the feedback we have received since then has been very helpful and greatly appreciated. If you have any feedback please feel free to send us an email at contact@portant.co or use our contact form here: https://www.portant.co/support

Thanks,

Blake and James

More than mail merge

You can do a lot more than just mail merge with Portant. Portant is a fully-fledged online document automation solution that can optimise many different document flows. You can use our online document automation platform to optimise your repetitive work, so you can get back to doing the work you enjoy.

Get started
Most Popular Templates

Save hours of manual work in just a few clicks

Transform your work life with responsive, fully customizable, and easy-to-use templates.