Adding a Summary to a Report in Query Studio |
You can use predefined summaries to calculate the total, count, maximum, minimum, or average of the values in individual report items.
You can apply a summary to
The summaries available depend on the type of data in the selected report item. For example, the only summaries you can use with text data is Count or Count Distinct .
There is no visible indication that a summary is applied. For example, you apply the predefined summary function Average, and then save the report. Someone can open the report later and not be aware that the summary figures shown are averages, not totals.
Query Studio provides the following predefined summary functions.
Function |
Description |
Total |
Returns the sum of a set of values. Note: The largest value that Total can return is the maximum value for the data type of the column. The Total function is performed iteratively. It takes the value from the first row and then adds the second row to it, followed by the third row, and so on. If at any point the intermediate value exceeds the maximum value for the data type, the data source will return an error. Important: The Total function is valid for numeric fields. If used on non-numeric fields (Date fields for example) an error is displayed. |
Count |
Returns the total number of records. |
Maximum |
Returns the maximum value. When applied to date or time data, this returns the latest value. |
Minimum |
Returns the minimum value. When applied to date or time data, this returns the earliest value. |
Average |
Returns the average of a set of values. |
Calculated |
Specifies that the summary is defined within the expression that is used to populate the column. Note: It is expected that the expression itself is an aggregation function and should not require modification to provide summary values. |
Automatic |
Summarizes values based on the data type. |
Median |
Returns the median value of the selected data item. |
Standard Deviation |
Returns the standard deviation of the selected data item. |
Count distinct |
Returns the total number of unique non-null records. |
Variance |
Returns the variance of the selected data item. |
None |
Removes footers. This applies only to footer values, not details. |
The default behavior when you use the Count function differs depending on the type of data that you are counting.
Data type |
Default and Options |
Query item (relational) |
Default: Count Distinct. Options: Choose between Count and Count Distinct. |
Set of members (levels, hierarchy) |
Default: Count Distinct. Options: Only Count Distinct is possible. |
Attributes - OLAP and Dimensionally Modeled Relational (DMR) data sources |
Default: None. Summaries are not possible. |
Measures - OLAP and DMR |
Default: Count. Options: Only Count is possible. |
Measure - relational fact query item |
Default: Count. Options: Choose between Count and Count Distinct. |
To add a summary to a report:
Tip: To remove a summary, in the Summary for footers box, click None.
Related Topics: