SUM Function: Difference between revisions

From Planfix
Jump to: navigation, search
No edit summary
No edit summary
 
Line 9: Line 9:
== Format ==
== Format ==
*SUM(expression)
*SUM(expression)


Arguments:
Arguments:
Line 18: Line 19:


  <nowiki>SUM({{Data Tag.Service.Cost}})</nowiki>
  <nowiki>SUM({{Data Tag.Service.Cost}})</nowiki>


To get the total cost of services that may be provided more than once, you must multiply the cost by the quantity and then add it all up. At the end, you specify a formula like this:
To get the total cost of services that may be provided more than once, you must multiply the cost by the quantity and then add it all up. At the end, you specify a formula like this:


<div style="display: block; padding: 1em; margin: 0 0 10px; font-size: 13px; line-height: 1.65; color: black; word-wrap: break-word; background-color: #f9f9f9; border: 1px solid #ddd; border-radius: 4px;"><nowiki>SUM({{Data Tag.Service.Cost}}*{{Data Tag.Service.Amount}})</nowiki></div>
<div style="display: block; padding: 1em; margin: 0 0 10px; font-size: 13px; line-height: 1.65; color: black; word-wrap: break-word; background-color: #f9f9f9; border: 1px solid #ddd; border-radius: 4px;"><nowiki>SUM({{Data Tag.Service.Cost}}*{{Data Tag.Service.Amount}})</nowiki></div>

Latest revision as of 09:13, 21 February 2024

SUM() — is a function that sums all values when calculating a formula. It is applied to each element of the multiplying variable.

Format

  • SUM(expression)


Arguments:

Expression - a mandatory parameter, a variable, or a formula with the final sum of several strings.

Example

For example, you have a data tag "Service", and you want to calculate the total cost of all services. To do this, specify the function:

SUM({{Data Tag.Service.Cost}})


To get the total cost of services that may be provided more than once, you must multiply the cost by the quantity and then add it all up. At the end, you specify a formula like this:


SUM({{Data Tag.Service.Cost}}*{{Data Tag.Service.Amount}})

Important

  • The function SUM () can contain any formula that consists of functions.


Go To