average | Average of all values of a column | average (revenue) |
average_if | Average of columns meeting a criteria | average_if(city = "San Francisco", revenue) |
count | Number of rows in the table containing the column | count (product) |
count_if | Number of rows meeting a specified condition | count_if(region = 'west', region) |
cumulative_average | Average of the Measure, accumulated by attribute(s) in the order specified | cumulative_average (revenue, order date, state) |
cumulative_max | Maximum of the Measure, accumulated by attribute(s) in the order specified | cumulative_max (revenue, state) |
cumulative_min | Minimum of the Measure, accumulated by attribute(s) in the order specified | cumulative_min (revenue, campaign) |
cumulative_sum | Sum of the Measure, accumulated by attribute(s) in the order specified | cumulative_sum (revenue, order date) |
group_aggregate | Aggregates a Measure with different granularities and filters than the columns used in the search. Define lists with { }. Optional query_groupings() / query_filters() reuse the original search’s lists; use + / - to add or exclude columns | group_aggregate (sum (revenue), {ship mode, date}, {} ) |
group_average | Average of the Measure grouped by attribute(s) | group_average (revenue, customer region, state) |
group_count | Count of the Measure grouped by attribute(s) | group_count (revenue, customer region) |
group_max | Maximum of the Measure grouped by attribute(s) | group_max (revenue, customer region) |
group_min | Minimum of the Measure grouped by attribute(s) | group_min (revenue, customer region) |
group_stddev | Standard deviation of the Measure grouped by attribute(s) | group_stddev (revenue, customer region) |
group_sum | Sum of the Measure grouped by attribute(s) | group_sum (revenue, customer region) |
group_unique_count | Unique count of the Measure grouped by attribute(s) | group_unique_count (product, supplier) |
group_variance | Variance of the Measure grouped by attribute(s) | group_variance (revenue, customer region) |
max | Maximum value of a column | max (sales) |
max_if | Maximum value among columns meeting a criteria | max_if( (revenue > 10), customer region ) |
median | Value of the Measure from the row at the 50th percentile. See limitations below | median (sales) |
min | Minimum value of a column | min (revenue) |
min_if | Minimum value among columns meeting a criteria | min_if( (revenue < 10), customer region ) |
moving_average | Average of the Measure over a window (current − Num1 … current + Num2, inclusive; a negative Num2 defines a window before the current row) | moving_average (revenue, 2, 1, customer region) |
moving_max | Maximum of the Measure over the given window | moving_max (complaints, 1, 2, store name) |
moving_min | Minimum of the Measure over the given window | moving_min (defects, 3, 1, product) |
moving_sum | Sum of the Measure over the given window | moving_sum (revenue, 1, 1, order date) |
percentile | Value of the Measure from the row with a rank_percentile ≤ N (or the first row above N, if none is below it) | percentile (sales, 99, 'asc') |
rank | Rank for the current row; identical values receive an identical rank. First argument is an aggregate; second is 'asc' or 'desc' | rank (sum (revenue), 'asc') |
rank_percentile | Percentile rank for the current row; identical values receive an identical percentile rank | rank_percentile (sum (revenue), 'asc') |
stddev | Standard deviation of all values of a column | stddev (revenue) |
stddev_if | Standard deviation of values meeting a criteria | stddev_if( (revenue > 10), (revenue/10.0) ) |
sum | Sum of all values of a column | sum (revenue) |
sum_if | Sum of values meeting a criteria | sum_if(region='west', revenue) |
unique count | Number of unique values of a column | unique count (customer) |
unique_count_if | Number of unique values meeting a condition | unique_count_if( (revenue > 10), order date ) |
variance | Variance of all values of a column | variance (revenue) |
variance_if | Variance of values meeting a criteria | variance_if( (revenue > 10), (revenue/10.0) ) |