In the Query section, a computed item is a new data item derived from calculations. In the Results, OLAPQuery, Pivot, Chart and Report sections, you add computed items by building equations to compute data items, or by applying functions to existing data items.
Computed items are like normal data items, and can be included in reports or reused to compute other data.
For example, you can modify the Amount Sold item by building an equation around it, multiplying by the Unit Price item and renaming the resulting item 'Revenue'. You can also apply a scalar function such as Cume to Amount Sold and return each individual value as a cumulative running total, or simply multiply Amount Sold by the local tax rate to find the tax owed on each sale.
To create (or modify) a computed item:
Select Add Computed Item from a Section menu (for example, Query, Results, and so on).
In the Name field, type a name that describes the computation.
The default name is Computed, which is numbered sequentially if there is more than one. If you assign a name to a computed item that is identical to an existing scalar function name, the Interactive Reporting numbers the name starting with the number 2.
Define the new data item by building an expression in the Definition text box.
Use the operator buttons to insert arithmetic and logical operators at the insertion point.
Click Functions to apply scalar functions using the Functions dialog box.
Click Reference to display the Reference dialog box, and select items to place in the equation.
You also can type any portion of the equation or the entire equation directly into the Definition text box using JavaScript. The names are case sensitive, and you must replace spaces in item names with underscores (‘_’).
If necessary, click the Options button to set a new data type for the item.
When the equation is complete, click OK.
The computed item is listed in the Results data layout and is displayed as a column in the results set.
In the Query section, the computed item is displayed on the Request line with its new name. In the Results section, computed items are displayed in the data layout in blue type.