# Popular functions

Functions are powerful tools that allow you to perform complex analysis, while still having access to your entire database.

These functions are the most popular functions in Sigma. To see them all, see Functions.

- If
- Returns the value following the first condition that is met.
- CountIf
- Counts the number of rows in a table or group for which all given conditions are true.
- SumIf
- Sum the values in a column if all the conditions are true.
- Sum
- Sum the values in a column or group.
- Avg
- Calculate the average of a column of numbers.
- Min
- Find the minimum value for a column or group.
- Max
- Find the maximum value for a column or group.
- Count
- Count the non-Null values within a column or group.
- CountDistinct
- Counts the number of unique values within a column or group.
- Concat
- Combine strings together.
- Contains
- Returns true if a string contains a substring.
- Right
- Returns a substring terminating at the end of a given string.
- Choose
- Returns the value with the corresponding index position. When an index number is provided and a corresponding value does not exist, a Null result is returned.
- BinRange
- Computes the bin for a value using the provided lower bounds.
- Coalesce
- Returns the first non-Null value from the arguments provided.
- DateDiff
- Calculates the time difference between two dates.
- Today
- Returns the current UTC date.
- MovingAvg
- Calculates the numerical average in a moving window.
- CumulativeSum
- Calculates the sum across the values up to and including the current value.
- First
- Repeats the first row value of the given column for every row in the output column.
- Nth
- Repeat the nth value of the the given column for every row in a column.
- Lead
- Shift a column upward.
- Rank
- Rank the rows in the table using the input column. Begins with 1.
- Identical values are assigned identical rank. Defaults to sort Ascending.