Add a formula directly within a search to perform math, handle null values, or add conditional logic.You can add a formula directly within a search. Common reasons to use a formula in a search include performing mathematical functions, checking for and replacing null values, or adding conditional logic. To create a formula in a search:
- Start a new search, or choose an existing Dashboard Tile from a Dashboard to edit.
- If the Dashboard Tile shows a chart, switch to Table View.
- In the upper-right of the table, click the more options icon and select Add formula.
-
Name and enter your formula in the Formula Builder.
NoteFormula elements are color coded by type and can include the formula operators and functions (blue), the names of columns (purple), and/or constants (black).
- Click Formula Assistant to see a list of formula operators with examples. Expand a category, such as Operators, and click an operator for a definition and example.
-
To change what your formula returns, use Advanced settings. Depending on your formula, you may be able to change:
- Data type: the type of data the formula generates — for example, use
datefor anadd_daysformula. - Measure or attribute: whether the formula’s output is a Measure or an attribute.
- Aggregation: the default aggregation of the formula’s output — for example, choose
minto see minimum profit.
- Data type: the type of data the formula generates — for example, use
- Click Save. Name your formula, if you haven’t already.