In a formula-type column, the SUBSTRACT function subtracts the contents of two columns from one another. It returns a number.
Calling function parameters in TimeTonic:
- $field_name = field (link, linked table column, number, selection, formula, text...).
- "free text" = free text to add within quotation marks.
- do not use quotation marks for numbers.
Syntax
SUBSTRACT(column_1, column_2)
Parameters
Column order matters. The second parameter is always subtracted from the first: SUBSTRACT($A, $B) calculates A minus B, not the other way around. To add, use SUM().
Examples
Subtract one column from another
I subtracted the Credit column from the Amount excl. tax column.
SUBSTRACT($Amount excl. tax, $Credit)
The output format of the result (number, currency, percentage...) is configured in the output field options of the formula editor. See Output format options in the Formula Column article.
Go further
SUM
To add several columns instead of subtracting them.
Or continue with
Formula glossary
All available operators and functions, sorted by category.