Functions perform specific calculations and operations on your data. Use this reference to find the right function for your task—whether you're calculating totals, working with dates, or manipulating text.
You don't need to memorise function names. As you type in the formula bar, suggestions appear automatically to help you discover available functions and complete your formulas.
Aggregate functions
Aggregate functions calculate a single result from multiple rows of data. Use these when you need totals, averages, counts, or other calculations across groups of records.
Function | Description | Example |
ArrayAgg | Collects values into a list (array) |
|
ArrayAggDistinct | Collects unique values into a list (array) |
|
Avg | Calculates the average of values |
|
AvgIf | Calculates average for values meeting a condition |
|
Corr | Calculates the correlation between two columns |
|
Count | Counts the number of non-empty values |
|
CountDistinct | Counts unique values only |
|
CountDistinctIf | Counts unique values meeting a condition |
|
CountIf | Counts values that meet a condition |
|
GrandTotal | Calculates the grand total for a column |
|
ListAgg | Joins values into a text string with a separator |
|
ListAggDistinct | Joins unique values into a text string |
|
Max | Finds the largest value |
|
MaxIf | Finds the largest value meeting a condition |
|
Median | Finds the middle value |
|
Min | Finds the smallest value |
|
MinIf | Finds the smallest value meeting a condition |
|
PercentileCont | Calculates a continuous percentile value |
|
PercentileDisc | Calculates a discrete percentile value |
|
PercentOfTotal | Calculates what percentage a value contributes to the total |
|
RegressionIntercept | Calculates the y-intercept of a regression line |
|
RegressionR2 | Calculates the R² value of a regression line |
|
RegressionSlope | Calculates the slope of a regression line |
|
StdDev | Calculates the standard deviation |
|
Subtotal | Calculates the subtotal for a group |
|
Sum | Adds all values in a column or group |
|
SumIf | Adds values that meet a condition |
|
SumProduct | Multiplies corresponding values and sums the results |
|
Variance | Calculates the sample variance |
|
VariancePop | Calculates the population variance |
|
Array functions
Array functions work with lists of values. These are useful when you need to store multiple values in a single cell or work with data that has a list structure.
Function | Description | Example |
Array | Creates a list from specified values |
|
ArrayCompact | Removes empty values from a list |
|
ArrayConcat | Combines multiple lists into one |
|
ArrayContains | Checks if a list contains a specific value |
|
ArrayDistinct | Removes duplicate values from a list |
|
ArrayExcept | Returns values in the first list not found in the second |
|
ArrayIntersection | Returns values that appear in both lists |
|
ArrayJoin | Joins list items into a text string |
|
ArrayLength | Counts the number of items in a list |
|
ArraySlice | Extracts a portion of a list |
|
RaggedHierarchy | Creates a hierarchy from multiple columns |
|
Sequence | Creates a list of sequential numbers |
|
SplitToArray | Splits text into a list using a delimiter |
|
Sparkline | Generates a sparkline chart from data |
|
SparklineAgg | Generates a sparkline by aggregating values over time |
|
Date functions
Date functions let you work with dates and times—calculating differences, extracting components, or shifting dates forward and back.
Function | Description | Example |
ConvertTimezone | Converts a date to a different time zone |
|
DateAdd | Adds a time period to a date |
|
DateDiff | Calculates the difference between two dates |
|
DateFormat | Formats a date as text |
|
DateFromUnix | Converts a Unix timestamp to a date |
|
DateLookback | Returns a value from a previous time period |
|
DatePart | Extracts a specific component from a date |
|
DateParse | Converts text to a date value |
|
DateTrunc | Truncates a date to a specific period |
|
Day | Extracts the day of the month from a date |
|
DayOfYear | Returns the day number within the year (1–366) |
|
EndOfMonth | Returns the last day of the month |
|
Hour | Extracts the hour from a date/time |
|
InDateRange | Checks if a date falls within a range |
|
InPriorDateRange | Checks if a date falls within a prior period |
|
LastDay | Returns the last day of a specified period |
|
MakeDate | Creates a date from year, month, and day values |
|
Minute | Extracts the minute from a date/time |
|
Month | Extracts the month number from a date |
|
MonthName | Returns the month name from a date |
|
Now | Returns the current date and time |
|
Quarter | Extracts the quarter number from a date |
|
Second | Extracts the second from a date/time |
|
Today | Returns the current date |
|
Weekday | Returns the day of the week as a number (1–7) |
|
WeekdayName | Returns the day name from a date |
|
Year | Extracts the year from a date |
|
Join functions
Join functions retrieve data from other tables based on matching values. These work similarly to VLOOKUP in Excel.
Function | Description | Example |
Lookup | Finds a matching value and returns a corresponding value from another column |
|
Rollup | Finds matching values and calculates a total from another column—similar to SUMIF in Excel, but pulls data from a different table |
|
Logical functions
Logical functions evaluate conditions and return results based on whether those conditions are true or false. These are essential for categorising data and creating conditional calculations.
For functions that help you handle empty values (nulls), see Working with empty values.
Function | Description | Example |
Between | Checks if a value falls within a range |
|
Choose | Returns a value from a list based on an index number |
|
Coalesce | Returns the first non-empty value from a list |
|
If | Returns different values based on a condition |
|
In | Checks if a value matches any value in a list |
|
IsNotNull | Checks if a value exists (returns true or false) |
|
IsNull | Checks if a value is empty (returns true or false) |
|
NullIf | Returns empty if two values are equal |
|
Switch | Tests a value against multiple options and returns matching result |
|
Zn | Returns the value, or 0 if the value is empty |
|
Tip: The If function supports multiple conditions in a single formula. Instead of nesting multiple If statements, you can chain conditions: If([Value] < 100, "Low", [Value] < 500, "Medium", "High").
Maths functions
Maths functions perform calculations—rounding numbers, trigonometry, logarithms, and more.
Function | Description | Example |
Abs | Returns the absolute value (removes negative sign) |
|
Acos | Returns the arccosine of a number |
|
Asin | Returns the arcsine of a number |
|
Atan | Returns the arctangent of a number |
|
Atan2 | Returns the arctangent of a coordinate pair |
|
BinFixed | Assigns values to fixed-size bins |
|
BinRange | Assigns values to custom bin ranges |
|
BitAnd | Performs a bitwise AND operation |
|
BitOr | Performs a bitwise OR operation |
|
Ceiling | Rounds up to the nearest whole number or multiple |
|
Cos | Returns the cosine of an angle |
|
Cot | Returns the cotangent of an angle |
|
Degrees | Converts radians to degrees |
|
DistanceGlobe | Calculates distance between coordinates on a globe |
|
DistancePlane | Calculates distance between points on a plane |
|
Div | Returns the integer part of a division |
|
Exp | Returns e raised to a power |
|
Floor | Rounds down to the nearest whole number or multiple |
|
Greatest | Returns the largest value from a list |
|
Int | Converts a value to an integer (rounds down) |
|
IsEven | Checks if a number is even |
|
IsOdd | Checks if a number is odd |
|
Least | Returns the smallest value from a list |
|
Ln | Calculates the natural logarithm |
|
Log | Calculates the logarithm (base 10 by default) |
|
Mod | Returns the remainder after division |
|
MRound | Rounds to the nearest specified multiple |
|
Pi | Returns the value of π (3.14159...) |
|
Power | Raises a number to a power |
|
Radians | Converts degrees to radians |
|
Round | Rounds to a specified number of decimal places |
|
RoundDown | Rounds down to a specified number of decimal places |
|
RoundUp | Rounds up to a specified number of decimal places |
|
RowAvg | Calculates the average of values in a row |
|
Sign | Returns -1 for negative, 0 for zero, or 1 for positive |
|
Sin | Returns the sine of an angle |
|
Sqrt | Calculates the square root |
|
Tan | Returns the tangent of an angle |
|
Trunc | Truncates a number to a specified number of decimal places |
|
Text functions
Text functions help you work with text values—combining text, extracting parts of it, or transforming how it appears.
Function | Description | Example |
Concat | Joins multiple text values together |
|
Contains | Checks if text contains a specific substring |
|
EndsWith | Checks if text ends with a specific substring |
|
Find | Finds the position of text within a string (returns 0 if not found) |
|
ILike | Checks if text matches a pattern (case-insensitive) |
|
Left | Extracts characters from the start of text |
|
Len | Returns the number of characters in text |
|
Like | Checks if text matches a pattern (case-sensitive) |
|
LPad | Pads text on the left to a specified length |
|
Lower | Converts text to lowercase |
|
LTrim | Removes spaces from the start of text |
|
MD5 | Creates an MD5 hash of text |
|
Mid | Extracts characters from the middle of text |
|
Proper | Capitalises the first letter of each word |
|
StartsWith | Checks if text starts with a specific substring |
|
Substring | Extracts a portion of text (same as Mid) |
|
Trim | Removes spaces from the start and end of text |
|
Upper | Converts text to uppercase |
|
UrlPart | Extracts a component from a URL |
|
Type functions
Type functions convert values from one data type to another.
Function | Description | Example |
Date | Converts a value to a date |
|
Json | Converts a value to JSON format |
|
Logical | Converts a value to true or false |
|
Number | Converts a value to a number |
|
Text | Converts a value to text |
|
Variant | Converts text to a variant (flexible) data type |
|
Window functions
Window functions perform calculations across rows in your table, taking into account the order or position of data. These are useful for running totals, comparisons with previous periods, and rankings.
Ranking functions
Ranking functions assign positions to rows based on their values.
Function | Description | Example |
Ntile | Divides rows into equal groups and assigns group numbers |
|
Rank | Assigns ranks, with gaps for ties (1, 2, 2, 4) |
|
RankDense | Assigns ranks without gaps for ties (1, 2, 2, 3) |
|
RankPercentile | Ranks rows by percentile |
|
RowNumber | Numbers each row sequentially (1, 2, 3, 4) |
|
VisibilityLimit | Limits displayed values based on ranking |
|
Cumulative functions
Cumulative functions calculate running totals and values that accumulate row by row.
Function | Description | Example |
CumulativeAvg | Calculates a running average |
|
CumulativeCorr | Calculates a running correlation between two columns |
|
CumulativeCount | Counts rows up to and including the current row |
|
CumulativeMax | Tracks the maximum value seen so far |
|
CumulativeMin | Tracks the minimum value seen so far |
|
CumulativeStdDev | Calculates a running standard deviation |
|
CumulativeSum | Calculates a running total |
|
CumulativeVariance | Calculates a running variance |
|
CumeDist | Calculates the cumulative distribution of values |
|
Shifting functions
Shifting functions let you compare the current row with previous or subsequent rows—helpful for period-over-period analysis.
Function | Description | Example |
FillDown | Fills empty values with the last non-empty value |
|
First | Returns the first value in a group |
|
FirstNonNull | Returns the first non-empty value in a group |
|
Lag | Returns the value from a previous row |
|
Last | Returns the last value in a group |
|
LastNonNull | Returns the last non-empty value in a group |
|
Lead | Returns the value from a subsequent row |
|
Nth | Returns the value from a specific row position |
|
Working with empty values
Empty cells (called Null values) require special attention in formulas. Any arithmetic operation involving a Null value returns Null as the result.
For example, if [Scope 2 Emissions] is empty for a particular row:
[Scope 1 Emissions] + [Scope 2 Emissions]
This formula returns Null for that row, even if Scope 1 has a value.
Use these approaches to handle empty values:
IsNull function: Tests whether a value is empty:
If(IsNull([Date]), "Missing", "Present")Zn function: Converts empty values to zero:
Zn([Value1]) + Zn([Value2])Coalesce function: Returns the first non-empty value:
Coalesce([Primary], [Backup], 0)
Tips for writing formulas
Reference columns by name: Put column names in square brackets:
[Column Name]Reference columns from other tables: Include the table name:
[Table Name/Column Name]Use autocomplete: Start typing a function name and select from the suggestions that appear.
Chain conditions in If: Instead of nesting If statements, list multiple conditions:
If([Size] < 3, "Small", [Size] < 6, "Medium", "Large")
For step-by-step guidance on creating formulas, see Formula basics.
