> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://help.sigmacomputing.com/docs/aggregate-functions/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://help.sigmacomputing.com/_mcp/server. # Aggregate functions > Browse Sigma aggregate functions available in formulas and calculations. > **Info** > > These functions work best with aggregated data in a grouped table. For a video explanation of working with functions of this type, see [Getting started with functions and groupings in Sigma](https://www.sigmacomputing.com/resources/training-videos/table-grouping-and-functions). Aggregate functions evaluate multiple rows of data to return a single value. For example, you can use aggregate functions to perform group calculations (like **Sum** and **Avg**), retrieve specific values (like **Min** and **Max**), assess the data to provide insights (like **Count** and **CountDistinct**), or join multiple values (like **ArrayAgg** and **ListAgg**). | Function | Description | | ------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------- | | [ArrayAgg](/docs/arrayagg) | Identifies non-null row values in a column or group and aggregates them into a single array. | | [ArrayAggDistinct](/docs/arrayaggdistinct) | Identifies distinct non-null row values in a column or group and aggregates them into a single array. | | [Avg](/docs/avg) | Calculates the average value of a column or group. | | [AvgIf](/docs/avgif) | Calculates the average value of a column or group *when the specified condition is* `True`. | | [Corr](/docs/corr) | Calculates the Pearson correlation coefficient (bivariate correlation) of two columns. | | [Count](/docs/count) | Counts the number of non-null and non-empty values in a column or group. | | [CountDistinct](/docs/countdistinct) | Counts the number of unique non-null and non-empty values in a column or group. Does not count duplicate values. (Same as **[Ndv](/docs/ndv)**.) | | [CountDistinctIf](/docs/countdistinctif) | Counts the number of unique non-null and non-empty values in a column or group *when the specified condition is* `True`. Does not count duplicate values. | | [CountIf](/docs/countif) | Counts the number of non-null and non-empty values in a column or group *when the specified condition is* `True`. | | [GrandTotal](/docs/grandtotal) | Calculates the grand total for column or group. | | [ListAgg](/docs/listagg) | Joins the values of a group or column into a single text string. | | [ListAggDistinct](/docs/listaggdistinct) | Joins the unique values of a group or column into a single text string. Does not include duplicate values. | | [Max](/docs/max) | Retrieves the maximum (largest or latest) value in a column or group. | | [MaxIf](/docs/maxif) | Retrieves the maximum (largest or latest) value in a column or group *when the specified condition is* `True`. | | [Median](/docs/median) | Determines the median (midpoint) value of a column or group. | | [Min](/docs/min) | Retrieves the minimum (smallest or earliest) value in a column or group. | | [MinIf](/docs/minif) | Retrieves the minimum (smallest or earliest) value in a column or group *when the specified condition is* `True`. | | [PercentileCont](/docs/percentilecont) | Calculates the continuous kth percentile of a column or group. | | [PercentileDisc](/docs/percentiledisc) | Calculates the discrete kth percentile of a column or group. | | [PercentOfTotal](/docs/percentoftotal) | Calculates the percentage a value contributes to the specified aggregate total. | | [RegressionIntercept](/docs/regressionintercept) | Calculates the y-intercept of the linear regression line. | | [RegressionR2](/docs/regressionr2) | Calculates the coefficient of determination of the linear regression line. | | [RegressionSlope](/docs/regressionslope) | Calculates the slope of the linear regression line. | | [StdDev](/docs/stddev) | Calculates the standard deviation of a column or group. | | [Subtotal](/docs/subtotal) | Calculates the subtotal of a column or group. | | [Sum](/docs/sum) | Calculates the sum of a column or group. | | [SumIf](/docs/sumif) | Calculates the sum of a column or group *when the specified condition is* `True`. | | [SumProduct](/docs/sumproduct) | Calculates the product of row values across specified columns, then calculates the sum of the resulting products for a column or group. | | [Variance](/docs/variance) | Estimates the sample variance (spread of distribution) of a column or group. | | [VariancePop](/docs/variancepop) | Calculates the population variance (spread of distribution) of a column or group. | > Official documentation and guidance for using Sigma to build AI apps, dashboards, and agents on governed warehouse data. ## Docs - [ArrayAgg](https://help.sigmacomputing.com/docs/arrayagg.md): Use the Sigma ArrayAgg function to identify non-null row values in a column or group and aggregate them into a single array. - [ArrayAggDistinct](https://help.sigmacomputing.com/docs/arrayaggdistinct.md): Use the Sigma ArrayAggDistinct function to identify distinct non-null row values in a column or group and aggregate them into a single array. - [Avg](https://help.sigmacomputing.com/docs/avg.md): Use the Sigma Avg function to calculate the average value of a column of numbers. - [AvgIf](https://help.sigmacomputing.com/docs/avgif.md): Use the Sigma AvgIf function to find the average value for a column or group for entries that the condition is true. - [Corr](https://help.sigmacomputing.com/docs/corr.md): Use the Sigma Corr function to calculate the Pearson correlation coefficient, also known as the bivariate correlation, of two numerical columns. - [Count](https://help.sigmacomputing.com/docs/count.md): Use the Sigma Count function to return the number of non-Null and non-empty values within a column or group. - [CountDistinct](https://help.sigmacomputing.com/docs/countdistinct.md): Use the Sigma CountDistinct function to return the number of unique values within a column or group. - [CountDistinctIf](https://help.sigmacomputing.com/docs/countdistinctif.md): Use the Sigma CountDistinctIf function to return the number of unique values within a column or group for which all given conditions are true. - [CountIf](https://help.sigmacomputing.com/docs/countif.md): Use the Sigma CountIf function to return the number of rows in a table or group for which all given conditions are true. - [GrandTotal](https://help.sigmacomputing.com/docs/grandtotal.md): Use the Sigma GrandTotal function to return the grand total for all records in a column based on a provided aggregate formula. - [ListAgg](https://help.sigmacomputing.com/docs/listagg.md): Use the Sigma ListAgg function to join a given column's row values into a single list. - [ListAggDistinct](https://help.sigmacomputing.com/docs/listaggdistinct.md): Use the Sigma ListAggDistinct function to join multiple values from a column into a list (as a single text string). - [Max](https://help.sigmacomputing.com/docs/max.md): Use the Sigma Max function to find the maximum value for a column or group. - [MaxIf](https://help.sigmacomputing.com/docs/maxif.md): Use the Sigma MaxIf function to find the maximum value for a column or group if the conditions are true. - [Median](https://help.sigmacomputing.com/docs/median.md): Use the Sigma Median function to find the mathematical median of a column or group. - [Min](https://help.sigmacomputing.com/docs/min.md): Use the Sigma Min function to find the minimum value for a column or group. - [MinIf](https://help.sigmacomputing.com/docs/minif.md): Use the Sigma MinIf function to find the minimum value for a column or group if the conditions are true. - [PercentileCont](https://help.sigmacomputing.com/docs/percentilecont.md): Use the Sigma PercentileCont function to calculate the continuous kth percentile value for a column or group. - [PercentileDisc](https://help.sigmacomputing.com/docs/percentiledisc.md): Use the Sigma PercentileDisc function to calculate the discrete kth percentile value for a column or group. - [PercentOfTotal](https://help.sigmacomputing.com/docs/percentoftotal.md): Use the Sigma PercentOfTotal function to return the percent of total for an aggregate formula. - [RegressionIntercept](https://help.sigmacomputing.com/docs/regressionintercept.md): Use the Sigma RegressionIntercept function to calculate the y-intercept of the linear regression line. - [RegressionR2](https://help.sigmacomputing.com/docs/regressionr2.md): Use the Sigma RegressionR2 function to calculate the R2 value, or coefficient of determination, of the linear regression line. - [RegressionSlope](https://help.sigmacomputing.com/docs/regressionslope.md): Use the Sigma RegressionSlope function to calculate the slope of the linear regression line. - [StdDev](https://help.sigmacomputing.com/docs/stddev.md): Use the Sigma StdDev function to compute the standard deviation of a column or group. - [Subtotal](https://help.sigmacomputing.com/docs/subtotal.md): Use the Sigma Subtotal function to return the subtotal for an aggregate formula. - [Sum](https://help.sigmacomputing.com/docs/sum.md): Use the Sigma Sum function to add the numerical values in a column or group. - [SumIf](https://help.sigmacomputing.com/docs/sumif.md): Use the Sigma SumIf function to add the numbers in a column if all conditions are True for that row. - [SumProduct](https://help.sigmacomputing.com/docs/sumproduct.md): Use the Sigma SumProduct function to return the sum of the product of values in a series of columns. - [Variance](https://help.sigmacomputing.com/docs/variance.md): The Variance function estimates the sample variance of a column or group, measuring how far values deviate from the mean. - [VariancePop](https://help.sigmacomputing.com/docs/variancepop.md): The VariancePop function calculates the population variance of a column or group, measuring how far values deviate from the mean.