Example Report with Formulas

You can use the formula bar to create formulas that total data, average data, or perform other functions of your choosing. When creating formulas for rows that summarize data for the year, for example, you use the formula bar to select the functions and dimensions that return your result. The following example illustrates this information:

The image illustrates the information when you use the formula bar to select the functions and dimensions that return your result.

To create this example, you would create a grid in the designer with Product on the rows and Year on the columns. Double-click Year to bring up member selection. Place all twelve months in the selected pane and remove Year. Click OK.

After you select the members, insert two formula columns: one for the annual total and another for the average monthly amount.

In our example, the first formula column that falls outside the months of the Year member contains a Sum function. This function adds the figures for each month. Since all months are defined in one cell only, the reference is to that cell location. The formula is built in the formula bar:

Sum(Cell [A,1])

The second formula column calculates the average of the months for the Year member. Because there are 12 months in a year, the Avg function adds all monthly totals and divides the total by 12. The formula is:

Average(Cell [A,1])

In general, there are two ways to specify a data formula in a grid, a row/column formula, or a cell formula:

Therefore, if a formula repeats for each cell in a row or column, use a row/column formula. If different formulas are performed on each cell, use a cell formula.

  To access the formula bar:

  1. Open or create a report.

  2. Select a dimension heading or formula row/ column in the grid to enable the formula bar.

    The image shows the formula bar.