Server Administration > Calculations in Fields, Charts, and Reports > What Are Computed Expressions? > Computed Expression Types
Computed Expression Types
You can perform calculations in fields, charts, and reports by creating two types of computed expressions: intra-item or inter-item.
Intra-item Computed Expressions
Intra-item computed expressions perform calculations between Windchill RV&S fields in a single item, storing the result in a read-only computed field. The computed field also stores the computed expression. For example, you could create an intra-item expression that adds the values of the QA Estimated Time and Development Estimated Time fields in a Feature item to produce a value in the Total Estimated Time field (the computed field).
Computed fields are created by administrators in the Windchill RV&S administration client. To users, computed fields display as read-only fields in items; however, administrators can configure the field visibility. Administrators can also configure how and when computed fields calculate.
Intra-item expressions can also retrieve information from an item using external information functions. For example, the CPECount() external information function counts the number of change package entries in an item. External information functions are useful for retrieving workflow data, for example, how long a Customer Request item has been in a state of Submit.
The computed expression for a computed field in the Windchill RV&S administration client (left) and the computed field as it displays in the Item Details view of an item (right).
Once you define an intra-item expression using external information functions, you can use queries, charts, reports, and dashboards to collect the metric data and report on it.
Inter-item Computed Expressions
Inter-item computed expressions (or aggregate computed expressions) perform calculations against Windchill RV&S fields in a list of Windchill RV&S items. To do this, you create a computed expression using an aggregate function, such as sum or average. For example, you could create an inter-item expression in a report that uses the sum(field) aggregate function to add the Estimated Cost field in a list of Project items and produce a value in a new Total Estimated Cost field in the report.
Aggregate expressions can be created in a chart or report by any user in the Windchill RV&S client or Windchill RV&S administration client. Inter-item computed expressions are useful for generating aggregate data from Windchill RV&S fields in a report or chart.
The aggregate expression in a chart’s properties (left) and the results of the computation in the generated chart (right).