Formula Basics
When building and editing analyses, it's easiest to work in the Criteria tab. When you're ready to finalize the view, switch to the Results (Compound Layout ) tab.
Â
Formulas Overview
A formula can be defined on any type of column. You must create a column to put the formula into; it doesn't really matter what the column starts as, because its contents will be replaced by the results of the formula, but it can save you some editing time if you choose the same type of attribute or measurement as one of the columns you want the formula to act on.
If you have used formulas in Microsoft Excel or Cognos, working with formulas in Analytics will be familiar.
Add or Edit Formulas
To add or edit a formula:
- In the Criteria tab, choose an attribute or measurement to add and place it where you want it in the table
- Click on the column menu, then choose Edit formula
- Click on the f(...) button at the bottom of the Column Formula work area to choose an option from the Insert Function wizard. The wizard menu displays lists of all available formula functions, including the syntax, explanation, and a brief description for each.
- Choose a function for your formula and click OK
- Edit the formula in the work area:
- Manually, if you know exactly what you want
- Using the button options at the bottom of the work area to select columns and variables, add filters, and insert basic mathematical functions
- To customize the column heading, click on the Custom Headings box and modify the Column Heading field
- When finished, click OK
- Click again on the column menu to:
- Sort the table by the formula results
- Change other Column Properties, especially the Data Format (e.g., to treat a column's numbers as a percentage)
- To add Filters to that column
- When finished, click on the Results tab to see the new formula column's results
Â
Practice Example
New Analysis Example (continued) | ||
Using the analysis you created from scratch:
| ||
Â
Â