Calculated slice elements
You can create calculated elements in the Slice Settings Designer or you can use existing calculations that are defined on the cube, in the Database Structure pane. Calculated elements that you create in the Slice Settings Designer are query-scoped MDX calculations. Calculations that are defined on the cube, are session-scoped. There can be query-scoped and session-scoped elements on the same slice.
Calculated elements are often used in sorting and filtering. For example, the Measure dimension of the Samples application includes Cost of Sales and Production Costs elements but not Total Costs. But you could create a calculated, Total Costs, element and use it in a filter to include or exclude values from a report. For example, use the Total Costs element to exclude products where the sum of Cost of Sales and Production Costs is less than a specified amount.
Query-scoped calculated elements can be static or dynamic. Session-scoped calculations can be static only. The unique name of a static element is generated from a hierarchy that you select, a name that you specify and, if selected, a parent element.
When you create a dynamic element, you specify the unique name in, for example, a global variable and then reference that variable in a formula.
You can assign a solve order to each calculated element. If there are multiple calculated elements, you can specify the order in which they are listed. Solve order and list order can affect the order in which calculated elements are calculated. The effects of solve and list order depend on the data source and on whether the elements are session or query scoped.
The server always returns the element if it is referenced explicitly by its unique name. That is, for example, if you select it in the List Designer or reference it in a formula. A check box enables you to mark a calculated element as Visible. To display a calculated element in a report, mark it as Visible and select it in the List Designer.
Elements are not displayed in reports if they are not explicitly selected or if they are not marked as Visible. If an element is explicitly selected and you then clear the Visible check box, the element remains visible in reports. To hide the element from the report, delete it in the List Designer.
Elements that are not visible are not returned by the server when AddCalculatedMembers is used.