Caspio Bridge provides many functions to analyze and manipulate your data through calculated fields. “Calculated Fields” is an Advanced Reporting feature that allows you to perform dynamic, per-record functions on results and details pages of a Report DataPage. The value in a calculated field is determined dynamically when the DataPage loads and does not affect the data in your table. You can also receive passed parameters in your calculated fields for further flexibility in creating data-driven tools and content.

calculations_in_reports_11

Calculated fields are designed to use data primarily from a single record. For example, if your table has a length and a width field, you can use a calculated field to display area for each record. If you want to sum up data across multiple records, see Totals and Aggregations.

To add a calculated field, click the Insert button at the lower right of the DataPage Elements panel in the DataPage wizard.

Note: Caspio Bridge allows up to 50 calculated fields in Results/Details Pages.

calculations_in_reports_21

When creating a calculated field, you can choose a label and create a formula to generate your calculated field data. At the bottom right of the calculated field’s Formula panel, there are three buttons to help you create a formula.

calculations_in_reports_31

To view and select a function, click the Function button.

You can use the Insert button to add field parameters to use with formulas. These parameters will be dynamically replaced by actual record data at load time.

Finally, the Formatting button allows you to choose the format of the results of your Calculated Field. You can select from options in your DataPage’s localization or choose a custom localization uniquely for this element.

Example 1: Calculate semi-annual sales and round to zero.

Round([@field:Q1_Sales]+[@field:Q2_Sales], 0)

Example 2: Calculate age.

Datediff(year, [@field:DOB], GetUTCDate())

Note: This feature may not be available at all package levels.