Performing a Calculation on a Measure

How to:

Reference:

You can perform standard calculations, such as average, percent, and summarize, on the numeric data in measures on an OLAP report.

Procedure: How to Apply a Calculation to a Measure

  1. Open the OLAP Control Panel.
  2. Click a measure name in the Measures pane.

    Note: Do not click the Stack Measures check box, which controls the display of a measure, not its sorting.

    The sort options pane opens.

  3. Click the arrow under Measure Calculations and select a calculation from the list.

    None is the default value. For details, see Calculations You Can Perform on a Measure.

  4. Click Ok.

    The sort pane is replaced by the Measures pane, where the selected calculation appears as a prefix to the measure.

  5. Click Run, and the applied calculation is added to the column title.

Reference: Calculations You Can Perform on a Measure

The following table lists the types of calculations in the first column and describes their functions in the second column.

Calculation

Function

Average Sum
of Squares

Computes the average sum of squares for standard deviation in statistical analysis.

Average

Computes the average value of the field.

Count

Counts the number of occurrences of the field.

Count 
Distinct

Counts the number of distinct values within a field when using -REMOTE. For other modes of operation, this behaves like Count.

Maximum 

Generates the maximum value of the field.

Minimum

Generates the minimum value of the field.

Percent

Computes the percent of a field based on the total values for the field. The Percent can be used with detail, as well as summary fields.

Percent
of a Count

Computes the percent of a field based on the number of instances found.

Row Percent

Computes the percent of a field based on the total values for the field across a row.

Summarize

Sums the number of occurrences of the field.

Total

Counts the occurrences of the field for use in a heading (includes footings, subheads, and subfoots).

Example: Applying a Percent Calculation to a Measure

The following is an example of applying a percent calculation to a measure.

  1. Run OLAPREP6.

    The report shows Quantity and Line Cost of Goods Sold sorted by plant and product category, with a subtotal at each sort break.

    You want to create a report column that shows the percent of total sales for each plant.

  2. Click the square icon next to PLANT to open the OLAP Control Panel.
  3. Click Line Cost of Goods Sold in the Measures pane.

    The sort pane opens.

  4. Select the Sort check box, and select the High to Low option button to specify the sort order.
  5. Under Measure Calculations, choose Percent from the drop-down list, as shown in the following image.
    WebFOCUS OLAP Control Panel
  6. Click Ok to see the calculation as a prefix for the measure in the Measures pane as shown in the following image.
  7. Click Run at the bottom of the OLAP Control Panel.

    The report now breaks down sales for each product at each plant as a percentage of total sales, as shown in the following image.

    OLAP Report 6 with sales broken down for each product at each plant as a percentage of total sales

Notice that the subtotals have been removed from the report because the breakdown by plant is no longer suitable for the data.