Summarizing values in crosstabs
The expressions used to summarize data are:
-
aggregate
([measurewithin set
[data item]) summarizes the member values from the data source within the current content. -
aggregate
([measurewithin detail
[data item]) summarizes the lowest level of details in the report.
The expression that is used to calculate a summary is controlled by the summary’s Use set aggregation property. For example, in the following crosstab, if you specified Total as the summary, the following aggregate expressions are produced when the Use set aggregation is set to Yes and No respectively:
-
Total
([Revenue]within set
[Quarter])This expression totals the quarter values from the data source at the intersecting product line. It totals the aggregate over all product lines for each quarter. The total appears after other values.
-
Total
([Revenue]within detail
[Quarter])This expression totals the month values visible in the report at the intersecting product line. It totals all of the intersecting month - product line values visible in the report. The total appears after other values.
In simple cases, the members and values visible in the report and the aggregate rules in the report are the same as those in the data source and all of these expressions produce the same results.
For example, for the quarter and month values, if you are totaling the values for all months in all quarters, it makes no difference whether the visible values, the values in the cube, or the month and quarter values are used. The result is the same.
total
summary function. Different results appear when you start filtering, changing aggregation types, or using set expressions or unions.
For example, the following crosstab shows the quantity of products sold across all product types for each product line. The crosstab has two summary values that show the average quantity of products sold by product line.
Each summary value uses a different expression that is set by the value specified for the Use set aggregation property.
-
Average
(Product line)- within detail
This summary is the average of the detail values in the crosstab.
-
Average
(Product line)- within set
This summary is the average of the product type values rolled up into sets at the Product line level. The values are obtained from the data source. If filters or slicers exist, the values are recomputed using the aggregation rules defined in the data source.
In most cases, you should use the within detail
expression
because the results are easiest to understand and the same as the
results for footers in a grouped list report. The within set
expression
should be reserved for reports with a purely dimensional focus, such
as when there are no detail or summary filters defined in the report.