Supported Table Calculations
Table calculations are a group of functions that provide context in an analysis and
can help you create enriched aggregated analyses. A table calculation function performs
operations on the data to reveal relationships between fields. For example, you can
calculate percentage of total, running sum, difference, common baseline, and rank.
Lookup-Based Functions
Differencecalculates the difference between a measure based on one set of partitions and sorts, and a measure based on another.Lagcalculates the lag (previous) value for a measure.Leadcalculates the lead (following) value for a measure.percentDifferencecalculates the percentage difference between the current value and a comparison value.
Over Functions
avgOvercalculates the average of a measure over one or more dimensions.countOvercalculates the count of a field over one or more dimensions.distinctCountOvercalculates the distinct count of the operand partitioned by the specified attributes at a specified level.maxOvercalculates the maximum of a measure over one or more dimensions.minOvercalculates the minimum of a measure over one or more dimensions.percentileOvercalculates the nth percentile of a measure partitioned by a list of dimensions.percentileContOvercalculates the nth percentile based on a continuous distribution of the numbers of a measure partitioned by a list of dimensions.percentileDiscOvercalculates the nth percentile based on the actual numbers of a measure partitioned by a list of dimensions.percentOfTotalcalculates the percentage that a measure contributes to the total.periodOverPeriodDifferencecalculates the difference of a measure over two different time periods as specified by period granularity and offset.periodOverPeriodLastValuecalculates the last (previous) value of a measure from a previous time period as specified by period granularity and offset.periodOverPeriodPercentDifferencecalculates the percent difference of a measure over two different time periods as specified by period granularity and offset.periodToDateAvgOverTimecalculates the average of a measure for a given time granularity, such as a quarter, up to a point in time.periodToDateCountOverTimecalculates the count of a dimension or measure for a given time granularity, such as a quarter, up to a point in time.periodToDateMaxOverTimecalculates the maximum of a measure or date for a given time granularity, such as a quarter, up to a point in time.periodToDateMinOverTimecalculates the minimum of a measure or date for a given time granularity, such as a quarter, up to a point in time.periodToDateSumOverTimecalculates the sum of a measure for a given time granularity, such as a quarter, up to a point in time.sumOvercalculates the sum of a measure over one or more dimensions.stdevOvercalculates the standard deviation of the specified measure, partitioned by the specified attribute or attributes, based on a sample.stdevpOvercalculates the standard deviation of the specified measure, partitioned by the chosen attribute or attributes, based on a biased population.varOvercalculates the variance of the specified measure, partitioned by the chosen attribute or attributes, based on a sample.varpOvercalculates the variance of the specified measure, partitioned by the chosen attribute or attributes, based on a biased population.
Ranking Functions
Rankcalculates the rank of a measure or a dimension.denseRankcalculates the rank of a measure or a dimension, ignoring duplicates.percentileRankcalculates the rank of a measure or a dimension, based on percentile.
Running Functions
runningAvgcalculates a running average for a measure.runningCountcalculates a running count for a measure.runningMaxcalculates a running maximum for a measure.runningMincalculates a running minimum for a measure.runningSumcalculates a running sum for a measure.
Window Functions
firstValuecalculates the first value of the aggregated measure or dimension partitioned and sorted by specified attributes.lastValuecalculates the last value of the aggregated measure or dimension partitioned and sorted by specified attributes.windowAvgcalculates the average of the aggregated measure in a custom window that is partitioned and sorted by specified attributes.windowCountcalculates the count of the aggregated measure in a custom window that is partitioned and sorted by specified attributes.windowMaxcalculates the maximum of the aggregated measure in a custom window that is partitioned and sorted by specified attributes.windowMincalculates the minimum of the aggregated measure in a custom window that is partitioned and sorted by specified attributes.windowSumcalculates the sum of the aggregated measure in a custom window that is partitioned and sorted by specified attributes.