Using Prefix Operator Aggregation Functions

You can use prefix operator aggregation functions to instantly apply a number of different aggregation operations to fields, unlocking significant insight into your data without writing your own calculations.

To apply a prefix operator, right-click a field in a measure bucket in a chart or report, point to Aggregate, and select one of the following options:

The operation is instantly applied to the field, indicated by a prefix in the measure bucket.

When you add a dimension field to a measure bucket in a chart, the only available aggregations are Count, Count distinct, and Percent of count. These options allow you to understand the distribution of values in dimension fields. When you add a dimension field to a chart as a measure, the Count aggregation is applied automatically in order to generate aggregated values for the chart.

In reports, numeric dimension fields are aggregated by default when added to the Summaries bucket, while alphanumeric dimension fields have the maximum aggregation prefix applied. When a dimension field is added to the Counts bucket, the count aggregation is applied. When a dimension field is added to the measure bucket of a report, the following aggregation options are available:

When using Counts display option, the Count prefix operator is used by default, but other operators, including Sum, can also be applied. These operators behave the same as when using the Summaries display option. When using the Details and Details with counter display options, measure values are not aggregated. As a result, measure fields in the Details and Details with counter buckets can only use the Distinct, Total, and Percent prefix operators.

You can use the same field multiple times in a chart or report with different prefix operators to enhance your understanding of your data set. For example, the report in the following image shows columns for average revenue and median revenue, which helps to understand the skewness of the data.


Report showing average and median revenue values

Since the average revenue values for each product category are all greater than the median revenue values, we can see that the data is skewed to the right. This means there are a higher proportion of records with lower than average revenue, and that the average revenue is brought up by some outlying high revenue values.

Similarly, you can use the Count prefix operator in combination with the binning feature to see the distribution of your data, such as in a histogram. To create a histogram, create a new chart, right-click a measure field in the Resources panel, point to Bin values, set a bin size and labeling option, and click OK. The bins appear as a field in the Dimensions area of the Resources panel. Drag the bin field into the sort bucket of your chart, such as the Horizontal bucket in a bar chart. Next, drag the same field for which you created your bins from the Measures area into the bucket used to aggregate measure data in the chart, such as the Vertical bucket in a bar chart. Finally, right-click that measure field, point to Aggregate, and click Count. The result is a histogram showing the distribution of values for the selected field, as shown in the following image.


Histogram created with bins and the count aggregation