Excerpt | ||||
---|---|---|---|---|
| ||||
Learn our syntax to perform calculations on your requirement’s data. |
This page describes the syntax to perform calculations.
Info |
---|
Note: When writing calculation formulas, remember that they are evaluated on a per-requirement basis. |
Info |
---|
Note: If a property name contains space characters, you can escape them using a backslash |
Arithmetic operations
...
Syntax
...
Output
...
Description
...
Examples
...
number + number
...
number
...
Adds two numbers.
...
@Cost + ext@Taxes
@Width + 2.5
...
number - number
...
number
...
Subtracts a number from another.
...
ext@Budget - ext@Spent
150 - @Height
...
number * number
...
number
...
Multiplies two numbers.
...
ext@Estimate * @Cost
1.2 * @Cost
...
number / number
...
number
...
Divides a number by another.
...
@Width / @Height
@Cost / 0.75
...
number % number
...
number
...
Returns the remainder of the division between two numbers.
...
@Length % ext@Segment
ext@Man\ days % 10
Mathematical functions
...
Syntax
...
Output
...
Description
...
Examples
...
ABS(value: number)
...
number
...
Returns the absolute value of a number.
...
CEIL(value: number)
...
number
...
Returns the nearest integer greater than or equal to a number.
...
FLOOR(value: number)
...
number
...
Returns the nearest integer less than or equal to a number.
...
ROUND(value: number)
...
number
...
Rounds a number to the nearest integer.
...
SQRT(value: number)
...
number
...
Returns the square root of a number.
...
POWER(base: number, exponent: number)
POW(base: number, exponent: number)
...
number
...
Returns a number raised to a power
Excerpt | ||||
---|---|---|---|---|
| ||||
Learn our syntax to perform calculations on your requirement’s data. |
This page describes the syntax to perform calculations.
Info |
---|
Note: When writing calculation formulas, remember that they are evaluated on a per-requirement basis. |
Info |
---|
Note: If a property name contains space characters, you can escape them using a backslash |
Arithmetic operations
Syntax | Output | Description | Examples |
---|---|---|---|
number + number | number | Adds two numbers. |
|
number - number | number | Subtracts a number from another. |
|
number * number | number | Multiplies two numbers. |
|
number / number | number | Divides a number by another. |
|
number % number | number | Returns the remainder of the division between two numbers. |
|
Mathematical functions
Syntax | Output | Description | Examples |
---|---|---|---|
ABS(value: number) | number | Returns the absolute value of a number. |
|
CEIL(value: number) | number | Returns the nearest integer greater than or equal to a number. |
|
FLOOR(value: number) | number | Returns the nearest integer less than or equal to a number. |
|
ROUND(value: number) | number | Rounds a number to the nearest integer. |
|
SQRT(value: number) | number | Returns the square root of a number. |
|
MIN(value1: number, value2: number) | number | Returns the minimum value between two numbers. |
|
MAX(value1: number, value2: number) | number | Returns the maximum value between two numbers. |
|
| number | Returns a number raised to a power. |
|
Aggregation functions
Syntax | Output | Description | Examples |
---|---|---|---|
COUNT(requirements: requirement[]) | number | Counts requirements in a given list. |
|
SUM(expression: number, requirements: requirement[]) | number | Computes the sum of a numeric expression evaluated on a given list of requirements. |
|
AVG(expression: number, requirements: requirement[]) | number | Computes the average of a numeric expression evaluated on a given list of requirements. |
|
MAX(expression: number, requirements: requirement[]) | number | Computes the maximum of a numeric expression evaluated on a given list of requirements. |
|
MIN(expression: number, requirements: requirement[]) | number | Computes the minimum of a numeric expression evaluated on a given list of requirements. |
|
Conditional functions
Syntax | Output | Description | Examples | |
---|---|---|---|---|
IF(condition: boolean, success: T, failure: T)
| T | Returns one value if a condition is |
false
.IF(@Cost > ext@Budget, ext@Budget - @Cost, 0)
IF(key ~ ‘TN-%’, ext@Tested AND @Delivered, @Delivered)
IF(@Priority > 3, ‘High priority’, ‘Low priority’)
MIN(value1: number, value2: number)
number
Returns the minimum value between two numbers.
MIN(@Cost, ext@Budget)
MIN(@Priority, 5)
MAX(value1: number, value2: number)
number
Returns the maximum value between two numbers.
MAX(@Width, @Height)
MAX(0, @Priority)
Aggregation functions
Syntax
Output
Description
Examples
if it is |
| |
COUNTIF(requirements: requirement[], condition: boolean) | number | Counts |
the number of requirements |
meeting a given |
condition. |
|
SUMIF(expression: number, requirements: requirement[], condition: boolean) | number | Computes the sum of a numeric expression |
evaluated on requirements meeting a given condition. |
|
AVGIF(expression: number, requirements: requirement[], condition: boolean) | number | Computes the average of a numeric expression |
evaluated on requirements meeting a given condition. |
|
MAXIF(expression: number, requirements: requirement[], condition: boolean) | number | Computes the maximum value of a numeric expression |
evaluated on requirements meeting a given condition. |
|
MINIF(expression: number, requirements: requirement[], condition: boolean) | number | Computes the minimum value of a numeric expression |
evaluated on requirements meeting a given condition. |
|
Requirement expressions
Syntax | Output | Description | Examples |
---|---|---|---|
relationship | requirement[] | Retrieves linked requirements (parent or child) for the current requirement. |
|
| requirement[] | Retrieves linked requirements (parent or child with multiple levels of depth) to the current requirement. |
|
DISTINCT(requirements: requirement[]) | requirement[] | Filters a requirement list to keep only distinct requirements. |
|
FILTER(requirements: requirement[], condition: boolean) | requirement[] | Filters a requirement list to keep only requirements matching meeting a given condition. |
|
Boolean expressions
Syntax | Output | Description | Examples |
---|---|---|---|
NOT boolean | boolean | Applies a logical NOT to a boolean expression. |
|
boolean AND boolean | boolean | Applies a logical AND between two boolean expressions. |
|
boolean OR boolean | boolean | Applies a logical OR between two boolean expressions. |
|
| boolean | Indicates whether two expressions are equal. |
|
| boolean | Indicates whether two expressions are different. |
|
number > number | boolean | Indicates whether a numeric expression is greater than another. |
|
number >= number | boolean | Indicates whether a numeric expression is greater or equal to another. |
|
number < number | boolean | Indicates whether a numeric expression is less than another. |
|
number <= number | boolean | Indicates whether a numeric expression is less or equal to another. |
|
| boolean | Indicates whether a string expression matches a string pattern. |
|
expression IS NULL | boolean | Indicates whether an expression is null. |
|
expression IS NOT NULL | boolean | Indicates whether an expression is not null. |
|