Skip to main content

Formulas

To provide richer insights, you can add a formula to your Trends AI search.

Written by Jonathan Crouch
Updated today

The Formula Builder includes many types of operators, such as logical (if, then, else), math, date, and text string functions.

The following list of topics explains concepts and gives step-by-step instructions on how to work with formulas. We also recommend that you review our comprehensive coverage of all formulas in the Formula function reference, which provides brief descriptions and examples for all supported formulas, by type.

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 if...then...else logic.

You can always go back and view or edit a formula that has been added to a search. Do this by selecting the edit icon next to its name in the columns listing.

When working with formulas, it is useful to understand the difference between regular (or row-wise) formulas and aggregation formulas.

About date formulas

Date formulas allow you to apply date-related functions to your formulas.

Use simple number functions (addition, subtraction, multiplication, and division) to calculate numerical results.

Use number functions to perform useful percent calculations.

Conditional formulas, or operators, allow you to apply if/then/else conditions in your formulas.

Nested formulas, or formula on formula, allow you to reference a formula inside another formula.

Text formulas

Trends AI also uses text formulas.

Did this answer your question?