The formula bar offers an intelligent, intuitive way to write formulas when creating or editing data feeds you'll use to build custom metrics.
You can type a formula directly in the formula bar or select from a list of functions. When you start typing a function name in the formula bar, a list of functions filtered by the letter you entered is displayed. Online help with examples and parameters automatically pops up for each function.
This article includes:
- Formula bar shortcuts and tips
- List of operators
- Selecting content in the formula bar
- Accessing in-app Help
- Troubleshooting errors in the formula bar
Formula bar shortcuts and tips
The following table includes formula bar shortcuts and tips:
| In the formula bar, type: | Result |
| Text |
Start typing to display a list of available functions, variables, and references. The function is automatically added to the formula bar when you select it. Use the arrow keys to navigate to a function in the list. Press Enter to select it when you find the function you want. Note: Click the Browse All Functions link at the bottom of the function list to see the Function Browser in the right sidebar.
|
| @ | Type @ to manually enter a column reference from the active data source. |
| & |
Type & to refer to columns within the data feed, then select from the list that displays. Tip: You can also display the list of column references by clicking Insert > Column Reference. Note: Column references may also be known as "results references". |
"string"
|
Use " around a value to convert it to a string. |
| ALT + A or the Lightning Bolt button | Evaluates the formula. |
| CTRL + A or Command+A | Selects everything in the formula bar. |
| CTRL + E | Selects the function that your cursor is on. |
| Ctrl+Home or Command + Left arrow | Places the cursor at the beginning of the formula. |
| // | Type // to add single line comments to explain portions of your formula. |
/* multipleline comment */
|
Type /* to add multiple line comments to explain portions of your formula. |
| Enter | Applies the selected function. |
| CTRL+Enter or SHIFT+Enter | Adds a line break in the formula bar to make it easier to work with long formulas. |
| CTRL+Space | Displays the function list. |
| CTRL+Shift+F or use the three- dot menu | Formats the formula. |
| ALT+L or use the three-dot menu | Displays line numbers. |
| CTRL+Z | Undoes an action. |
List of operators
The following table includes a list of available operators:
| In the formula bar, type: | What it does |
| + | Add |
| - | Subtract |
| * | Multiply by |
| / | Divide by |
| < | Is less than |
| > | Is greater than |
| <= | Is less than or equal to |
| >= | Is greater than or equal to |
| = | Is equal to |
| != |
Is not equal to |
Selecting content in the formula bar
The following table describes how to select content in the formula bar:
Accessing in-app Help
When you select a function, a help pop-up displays a description, examples, and parameter information. You can dismiss the pop-up by clicking the X in the function info dialog and reactivate it anytime by clicking the 3-dot menu at the right-end of the formula bar and selecting Show Function Help.
Troubleshooting errors in the formula bar
Errors are highlighted in the formula bar:
- A function or parameter that has the wrong syntax appears highlighted in red in the formula bar.
- A tool tip is displayed when you hover over a syntax error in the formula bar.
- If the formula evaluation results in an error, a red border will appear around the entire formula bar and an error icon will display.
