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.
Adding a formula to a search
To create a formula in a search:
-
Start a new search, or choose an existing Answer to edit
-
Click on the “All” following the + Add Button and click Formula
-
Name and enter your formula in the Formula Editor
Note, formula elements are colour-coded by type and can include the formula operators and functions (blue), the names of columns (purple), the names of Parameters (green), and/or constants (black).
-
You can see a list of formula functions or operators with examples by selecting the help icon ? in the upper-right corner. Use the search bar to search for specific functions
-
To change what your formula returns, use the Advanced settings. Select the settings icon in the upper-right corner
-
Data type: Determines the type of data that the formula generates. For example, use
date
for anadd_days
formula -
Measure or attribute: Determines if the output of the formula is a measure or an attribute. For example, choose
attribute
for a formula that generates Store groups, and choosemeasure
for a formula that generates Gross Sales -
Aggregation: Determines the default aggregation of the formula output. For example, choose
Total
to see sum of Gross Sales
-
💡Tips
-
Some formulas have been pre-built on Data Sources, such as Average Order Value (AOV) and count of unique number of orders (Orders).
Comments
0 comments
Please sign in to leave a comment.