# CalcFormula Property
> Version: _Available or changed with runtime version 1.0._
Sets the Calculation formula for a FlowField.
The following syntax is valid for the CalcFormula property:
```
CalcFormula =
[-]Exist(<DestinationTable> [WHERE (<TableFilters>)]) |
Count(<DestinationTable> [WHERE (<TableFilters>)]) |
[-]Sum(<DestinationTable>.<DestinationFieldName> [WHERE(<TableFilters>)])|
[-]Average(<DestinationTable>.<DestinationFieldName> [WHERE(<TableFilters>)]) |
Min(<DestinationTable>.<DestinationFieldName> [WHERE(<TableFilters>)]) |
Max(<DestinationTable>.<DestinationFieldName> [WHERE(<TableFilters>)]) |
Lookup(<DestinationTable>.<DestinationFieldName> [WHERE(<TableFilters>)])
<TableFilters> ::= <TableFilter> {,<TableFilter>}
<TableFilter> ::=
<DestinationFieldName> = CONST(<FieldConst>) | FILTER(<Filter>) | FIELD(<SourceFieldName>) | FIELD(UPPERLIMIT(<SourceFieldName>)) |
FIELD(FILTER(<SourceFieldName>)) | FIELD(UPPERLIMIT(FILTER(<SourceFieldName>)))
```
## Applies to
 Table field
## Syntax
```al
CalcFormula = Count(RecordCalcFields);
```
## Remarks
Parts of the formula are described in the following table.
Symbol|Description
`<DestinationTable>`|Specifies the destination table holding the information to be used in the FlowField.
`<DestinationFieldName>`|Specifies the destination field name.
`<TableFilters>`|A list of filters to be used in the computation of the FlowField.
`<TableFilter>`|A table filter can be one of the following: a constant expression, a filter expression, a value from ordinary fields, or a FlowFilter field. A key for the other table must exist and include the fields used in the filters.
`<SourceFieldName>`|Specifies the source field name.
`<Filter>`|A filter expression such as 10|20..30.
You can choose from several methods of calculations including sum (total), average, maximum value, minimum value, record count, lookup, and whether a record exists. See ../devenv-creating-flowfields-and-flowfilters, FlowFields overview<../devenv-flowfields>, and ../devenv-flowfilter-overview.
## Related information
Get Started with AL<../devenv-get-started>
Developing Extensions<../devenv-dev-overview>

Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/properties/devenv-calcformula-property, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact. https://jonas-paprotka.de/docs/dev-itpro/developer/properties/devenv-calcformula-property/
