Formulas are logical equations that are used to calculate values. Formulas are used to manipulate the data in Queries.

### The Formula bar is located at the top of the report document.

- This is where the Formula will go. If you click into a cell, you will be able to see which Object or Formula is currently present in a cell.
: This is the Formula Editor. The Formula Editor will pop up in a new window if you click this button. The Formula Editor is described in detail below.*fx***Create Variable**: this will allow you to create a variable from an existing Formula. For more details, see linked article.**Cancel**: this will cancel any changes you have recently made**Validate Formula**: this will check the Formula for any syntax errors (e.g. missing parenthesis, brackets, values) If you receive an error message, you will need to correct the Formula before proceeding- This will expand the box with the Formula. If you have a lengthy Formula, you can click this to see the full text.

- To create a Formula, click into the column or row where the Formula should be performed
- Users can either type their Formula directly into the Formula pane box or they can click on the
button within the Formula bar to open the Formula Editor in a separate window. The Formula Editor will assist users by listing out all available functions and operators and providing descriptions of how to use them*fx*

## The Formula Editor

- This is where the Formula will go. Simply start typing your Formula into the box.
- The
**green check mark**will check the syntax of your Formula. If the Formula is correct, you will see a message saying "The Formula is defined correctly." If you have any errors in your Formula, the message box will attempt to show you where your error might be. - The
**blue x**will cancel all changes you have made since opening the box. It will revert your Formula to its original state. - The
**Available Objects**box includes all Objects in your report. If you are unsure of an Object's exact name, you can scroll through the Objects to find the correct one, double click the Object and it will populate into the Formula box. This list is sorted the same way the Available Objects pane is within your report. So you can sort it by Query, Data Source (which will show you the root folder the Object comes from), or Alphabetic order. - The
**Available Functions**are helpful if you are looking for a function that you may not be super familiar with. You can look through categorized folders or search through All functions. You can also double click these Objects to have them populate into the Formula box.*Pro tip:**if you click on a function in this list, it will give you the definition of the function within the Formula editor. You can also click the link for "More on this function" for SAP documentation that will detail the function's functionality.* - Available Operators: these are your syntax Objects.
**All Formulas must start with an =.** - Values: To use this, select an Object from the Available Objects window. Example: Name. Then double click the Values option. A list of available values for the Name Object will appear. You can this click the value you are looking for, select OK, and the value will populate into the Formula bar with quotes around it.
**This is useful when needing to get exact text from touchpoint questions or Program Names, for example.** - Prompts: This will give you the text from any prompts on the report. For example, if you are running the report to prompt for a date range and you've changed the prompt text to be "Begin Date" and "End Date", this will tell you the prompt text and which Query it is applied to.
**This is useful when using variables that include the UserResponse() function.**

### "More on this function"

This will take you to in depth explanation of function.

*Opens in a new tab in your browser.*