You can add a formula directly within a search. Some common reasons for using a formula in a search are to perform mathematical functions, check for and replace null values, or add conditional logic.
How to add a formula
To create a formula in a search:
- Start a new search, or choose an existing answer from a pinboard to edit.
If the answer shows a chart, switch to Table View.
In the upper-right side of the table, click the three-dot Actions icon and select Add formula.
Name and enter your formula in the Formula Builder.Note: Formulas elements are color coded by type and can include the formula operators and functions (blue), the names of columns (purple), and/or constants (black).
You can see a list of formula operators with examples by clicking Formula Assistant.
If you want to change what your formula returns, use the Advanced settings. Depending on your formula, you may be able to change:
- Data type
- Measure or attribute
- Name the formula by clicking its title and typing the new name. Click Save.