Insert a Query Calculation

Insert a query calculation into your report to add a new row or column with values that are based on a calculation.
Important: When creating an expression for use in a double-byte environment, such as Japanese, the only special characters that work are ASCII-7 and ~ -- || - $ ¢ £ ¬.
Tip:
  • To show or hide the Available Components pane, click the blue arrow to the right of the pane.
  • To show or hide the Information pane, click the blue arrow above the pane.
  • To copy and paste expression components in the Expression Definition pane, you can use the copy button copy icon and the paste button paste icon.

Procedure

  1. From the Toolbox tab toolbox tab, drag Query Calculation to the report.
  2. Type a meaningful name for your expression in the Name box.

    For example, if you are calculating the difference between 2007 revenue and 2006 revenue, you could name your expression 2007 - 2006 Revenue.

  3. In the Available Components pane, define the calculation:
    • To add data items that are not shown in the report, on the source tab source tab, double-click the data items.
    • To add data items that are in the report but not necessarily in the model, such as calculations, on the data items tab data items tab, double-click the data items.
    • To add functions, summaries, and operators, on the functions tab functions tab, double-click elements.
      Tip: To filter the visible functions, summaries, and operators in the Available Components pane, click the filter button filter icon and filter by the function type, what the function returns, or what the function acts on.
    Tip: You can also type the calculation directly in the Expression Definition box. When typing date values, ensure that the date format is correct for your database type.
  4. Click the validate button validate icon.

    Any validation errors appear on the Errors tab of the Information pane.