Skip to main content

Symon.AI help center

Formula

Abstract

Apply a formula to an existing column to create a new column with new data.

Add a new column by applying formula(s) to an existing column.

You can click the Info icon in the to-do sidebar to see a list of all formula definitions with examples.

Limitations

The behavior of round() for floats can be surprising because most decimal fractions cannot be represented exactly as a float.

For example, round(2.675, 2) will return 2.67 instead of the expected 2.68.

You can read Floating Point Arithmetic: Issues and Limitations for more information.

Using Row Viewer Format

When you use the Row Viewer format, the format inherits the format from the preceding tool. But, some formulas may have a different output, based on one of the following scenarios:

  • There is not a preceding tool to inherit the format from.

  • The column types between the two tools are different and cannot inherit the format.

  • The function applied in the current tool takes precedence over the inherited format.

For more information, see Row Viewer Format

Some formula functions affect the decimal place without the Row Viewer format. The following functions always take precedence and prevent the inherited decimal place formatting:

  • round()

  • floor()

  • ceil()

The following functions use the inherited format:

  • abs()

  • sqrt()

  • log10()

  • sin()

  • cos()

  • asin()

  • acos()

  • atan()

  • pow()

if() outputs the same format if the true results and the false results have the same format. If they do not have the same format, the input formats are ignored.

Error messaging

The Formula tool can find the following errors in your data set:

  • Syntax error: An unknown function is occurring, or the function cannot parse due to a special character, or a missing bracket.

  • Invalid argument error: The tool detects that the argument is invalid due to a wrong data type.

  • Too many arguments error: The tool detects that there are too many arguments.

  • Missing arguments error: The tool detects that there are one or more arguments missing from the range of the number of allowed arguments.

  • Unsupported data type error: The tool detects an unsupported data type. The Formula tool only accepts number, boolean, string, and date data types.