DAX Functions List
DAX Functions List
Reference URL
DAX Syntax Reference https://msdn.microsoft.com/en-us/query-bi/dax/dax-syntax-reference
DAX Operator Reference https://msdn.microsoft.com/en-us/query-bi/dax/dax-operator-reference
DAX Parameter-Naming Conventions https://msdn.microsoft.com/en-us/query-bi/dax/dax-parameter-naming-conventions
DAX Function Reference https://msdn.microsoft.com/en-us/query-bi/dax/dax-function-reference
DAX Queries https://msdn.microsoft.com/en-us/query-bi/dax/dax-queries
DAX Error Reference https://msdn.microsoft.com/en-us/query-bi/dax/dax-error-reference
CALENDARAUTO CALENDARAUTO([fiscal_year_end_month]) Table Returns a table with one column of dates calculated from the model
automatically.
DATE DATE(<year>, <month>, <day>) Scalar Returns the specified date in datetime format.
DATEDIFF DATEDIFF(<start_date>, <end_date>, <interval>) Scalar Returns the number of units (unit specified in Interval) between the input two
dates.
DATEVALUE DATEVALUE(date_text) Scalar Converts a date in the form of text to a date in datetime format.
DAY DAY(<date>) Scalar Returns a number from 1 to 31 representing the day of the month.
EDATE EDATE(<start_date>, <months>) Scalar Returns the date that is the indicated number of months before or after the start
date.
EOMONTH EOMONTH(<start_date>, <months>) Scalar Returns the date in datetime format of the last day of the month before or after
a specified number of months.
HOUR HOUR(<datetime>) Scalar Returns the hour as a number from 0 (12:00 A.M.) to 23 (11:00 P.M.).
MINUTE MINUTE(<datetime>) Scalar Returns a number from 0 to 59 representing the minute.
MONTH MONTH(<datetime>) Scalar Returns a number from 1 (January) to 12 (December) representing the month.
NOW NOW() Scalar Returns the current date and time in datetime format.
SECOND SECOND(<time>) Scalar Returns a number from 0 to 59 representing the second.
TIME TIME(hour, minute, second) Scalar Converts hours, minutes, and seconds given as numbers to a time in datetime
format.
TIMEVALUE TIMEVALUE(time_text) Scalar Converts a time in text format to a time in datetime format.
TODAY TODAY() Scalar Returns the current date in datetime format.
UTCNOW UTCNOW()
UTCTODAY UTCTODAY()
WEEKDAY WEEKDAY(<date>, <return_type>) Scalar Returns a number from 1 to 7 identifying the day of the week of a date.
WEEKNUM WEEKNUM(<date>, <return_type>) Scalar Returns the week number in the year.
YEAR YEAR(<date>) Scalar Returns the year of a date as a four digit integer.
YEARFRAC YEARFRAC(<start_date>, <end_date>, <basis>) Scalar Returns the year fraction representing the number of whole days between
start_date and end_date.
Time Intelligence functions
Function Syntax Result type Description
CLOSINGBALANCEMONTH CLOSINGBALANCEMONTH(<expression>,<dates>[,<filter Scalar Evaluates the specified expression for the date corresponding to the end of the
>]) current month after applying specified filters.
CLOSINGBALANCEQUARTER CLOSINGBALANCEQUARTER(<expression>,<dates>[,<filt Scalar Evaluates the specified expression for the date corresponding to the end of the
er>]) current quarter after applying specified filters.
CLOSINGBALANCEYEAR CLOSINGBALANCEYEAR(<expression>,<dates>[,<filter>] Scalar Evaluates the specified expression for the date corresponding to the end of the
[,<year_end_date>]) current year after applying specified filters.
DATEADD DATEADD(<dates>,<number_of_intervals>,<interval>) Table Moves the given set of dates by a specified interval.
DATESBETWEEN DATESBETWEEN(<dates>,<start_date>,<end_date>) Table Returns the dates between two given dates.
DATESINPERIOD DATESINPERIOD(<dates>,<start_date>,<number_of_int Table Returns the dates from the given period.
ervals>,<interval>)
DATESMTD DATESMTD(<dates>) Table Returns a set of dates in the month up to current date.
DATESQTD DATESQTD(<dates>) Table Returns a set of dates in the quarter up to current date.
DATESYTD DATESYTD(<dates> [,<year_end_date>]) Table Returns a set of dates in the year up to current date.
ENDOFMONTH ENDOFMONTH(<dates>) Table Scalar Returns the end of month.
ENDOFQUARTER ENDOFQUARTER(<dates>) Table Scalar Returns the end of quarter.
ENDOFYEAR ENDOFYEAR(<dates> [,<year_end_date>]) Table Scalar Returns the end of year.
FIRSTDATE FIRSTDATE(<dates>) Table Scalar Returns first non blank date.
FIRSTNONBLANK FIRSTNONBLANK(<column>,<expression>) Table Scalar Returns the first value in the column for which the expression has a non blank
value.
LASTDATE LASTDATE(<dates>) Table Scalar Returns last non blank date.
LASTNONBLANK LASTNONBLANK(<column>,<expression>) Table Scalar Returns the last value in the column for which the expression has a non blank
value.
NEXTDAY NEXTDAY(<dates>) Table Scalar Returns a next day.
NEXTMONTH NEXTMONTH(<dates>) Table Returns a next month.
NEXTQUARTER NEXTQUARTER(<dates>) Table Returns a next quarter.
NEXTYEAR NEXTYEAR(<dates>[,<year_end_date>]) Table Returns a next year.
OPENINGBALANCEMONTH OPENINGBALANCEMONTH(<expression>,<dates>[,<filte Scalar Evaluates the specified expression for the date corresponding to the end of the
r>]) previous month after applying specified filters.
OPENINGBALANCEQUARTER OPENINGBALANCEQUARTER(<expression>,<dates>[,<fil Scalar Evaluates the specified expression for the date corresponding to the end of the
ter>]) previous quarter after applying specified filters.
Time Intelligence functions
Function Syntax Result type Description
OPENINGBALANCEYEAR OPENINGBALANCEYEAR(<expression>,<dates>[,<filter>] Scalar Evaluates the specified expression for the date corresponding to the end of the
[,<year_end_date>]) previous year after applying specified filters.
PARALLELPERIOD PARALLELPERIOD(<dates>,<number_of_intervals>,<inte Table Returns a parallel period of dates by the given set of dates and a specified
rval>) interval.
PREVIOUSDAY PREVIOUSDAY(<dates>) Table Returns a previous day.
PREVIOUSMONTH PREVIOUSMONTH(<dates>) Table Returns a previous month.
PREVIOUSQUARTER PREVIOUSQUARTER(<dates>) Table Returns a previous quarter.
PREVIOUSYEAR PREVIOUSYEAR(<dates>[,<year_end_date>]) Table Returns a previous year.
SAMEPERIODLASTYEAR SAMEPERIODLASTYEAR(<dates>) Table Returns a set of dates in the current selection from the previous year.
STARTOFMONTH STARTOFMONTH(<dates>) Table Scalar Returns the start of month.
STARTOFQUARTER STARTOFQUARTER(<dates>) Table Scalar Returns the start of quarter.
STARTOFYEAR STARTOFYEAR(<dates>) Table Scalar Returns the start of year.
TOTALMTD TOTALMTD(<expression>,<dates>[,<filter>]) Scalar Evaluates the specified expression over the interval which begins on the first of
the month and ends with the last date in the specified date column after
applying specified filters.
TOTALQTD TOTALQTD(<expression>,<dates>[,<filter>]) Scalar Evaluates the specified expression over the interval which begins on the first day
of the quarter and ends with the last date in the specified date column after
applying specified filters.
TOTALYTD TOTALYTD(<expression>,<dates>[,<filter>] Scalar Evaluates the specified expression over the interval which begins on the first day
[,<year_end_date>]) of the year and ends with the last date in the specified date column after
applying specified filters.
Filter functions
Function Syntax Result type Description
ADDMISSINGITEMS ADDMISSINGITEMS(<showAllColumn>[, Add the rows with empty measure values back.
<showAllColumn>]…, <table>, <groupingColumn>[,
<groupingColumn>]…[, filterTable]…)
ALL ALL( {<table> | <column>[, <column>[, <column>[,…]]]} ) Table Returns all the rows in a table, or all the values in a column, ignoring any filters
that might have been applied.
ALLEXCEPT ALLEXCEPT(<table>,<column>[,<column>[,…]]) Table Returns all the rows in a table except for those rows that are affected by the
specified column filters.
ALLNOBLANKROW ALLNOBLANKROW( {<table> | <column>[, <column>[, Table Returns all the rows except blank row in a table, or all the values in a column,
<column>[,…]]]} ) ignoring any filters that might have been applied.
ALLSELECTED ALLSELECTED([<tableName> | <columnName>]) Table Returns all the rows in a table, or all the values in a column, ignoring any filters
that might have been applied inside the query, but keeping filters that come
from outside.
CROSSFILTER CROSSFILTER(<columnName1>, <columnName2>, No Value Specifies cross filtering direction to be used in the evaluation of a DAX
<direction>) expression. The relationship is defined by naming, as arguments, the two
columns that serve as endpoints.
DISTINCT - column DISTINCT(<column>) Scalar Returns a one column table that contains the distinct (unique) values in a
column, for a column argument. Or multiple columns with distinct (unique)
combination of values, for a table expression argument.
DISTINCT - table DISTINCT(<table>) Table Returns a table containing only distinct rows.
EARLIER EARLIER(<column>, <number>) Scalar Returns the value in the column prior to the specified number of table scans
(default is 1).
EARLIEST EARLIEST(<column>) Scalar Returns the value in the column for the very first point at which there was a row
context.
FILTER FILTER(<table>,<filter>) Table Returns a table that has been filtered.
FILTERS FILTERS(<columnName>) Table Returns a table of the filter values applied directly to the specified column.
HASONEFILTER HASONEFILTER(<columnName>) Scalar Returns true the specified table or column have one and only one filter.
HASONEVALUE HASONEVALUE(<columnName>) Scalar Returns true when there's only one value in the specified column.
Filter functions
Function Syntax Result type Description
ISCROSSFILTERED ISCROSSFILTERED(<columnName>) Scalar Returns true when the specified table or column is crossfiltered.
ISFILTERED ISFILTERED(<columnName>) Scalar Returns true when there are direct filters on the specified column.
KEEPFILTERS KEEPFILTERS(<expression>) Table Changes the CALCULATE and CALCULATETABLE function filtering semantics.
SELECTEDVALUE SELECTEDVALUE(<columnName>[, <alternateResult>]) Scalar Returns the value when the context for columnName has been filtered down to
one distinct value only. Otherwise returns alternateResult.
SUBSTITUTEWITHINDEX SUBSTITUTEWITHINDEX(<table>, <indexColumnName>, Table Returns a table which represents the semijoin of two tables supplied and for
<indexColumnsTable>, [<orderBy_expression>, which the common set of columns are replaced by a 0-based index column. The
[<order>][, <orderBy_expression>, [<order>]]…]) index is based on the rows of the second table sorted by specified order
expressions.
USERELATIONSHIP USERELATIONSHIP(<columnName1>,<columnName2>) No Value Specifies an existing relationship to be used in the evaluation of a DAX
expression. The relationship is defined by naming, as arguments, the two
columns that serve as endpoints.
VALUES VALUES(<TableNameOrColumnName>) Table Returns a one column table or a table that contains the distinct (unique) values in
a column.
Information functions
Function Syntax Result type Description
CONTAINS CONTAINS(<table>, <columnName>, <value>[, Scalar Returns TRUE if there exists at least one row where all columns have specified
<columnName>, <value>]…) values.
CUSTOMDATA CUSTOMDATA() Scalar Returns the value of the CustomData connection string property if defined;
otherwise, BLANK().
IN Operator <scalarExpr> IN <tableExpr> The number of scalarExprN must match the number of columns in tableExpr.
( <scalarExpr1>, <scalarExpr2>, … ) IN <tableExpr> Unlike the = operator, the IN operator and the CONTAINSROW function perform
strict comparison. For example, the BLANK value does not match 0.
NOT IN is not an operator in DAX. To perform the logical negation of the IN
operator, put NOT in front of the entire expression. For example, NOT [Color] IN {
"Red", "Yellow", "Blue" }.
CONTAINSROW CONTAINSROW(<tableExpr>, <scalarExpr>[, The number of scalarExprN must match the number of columns in tableExpr.
<scalarExpr>, …]) Unlike the = operator, the IN operator and the CONTAINSROW function perform
strict comparison. For example, the BLANK value does not match 0.
NOT IN is not an operator in DAX. To perform the logical negation of the IN
operator, put NOT in front of the entire expression. For example, NOT [Color] IN {
"Red", "Yellow", "Blue" }.
ISBLANK ISBLANK(<value>) Scalar Checks whether a value is blank, and returns TRUE or FALSE.
ISERROR ISERROR(<value>) Scalar Checks whether a value is an error, and returns TRUE or FALSE.
ISEVEN ISEVEN(number) Scalar Returns TRUE if number is even, or FALSE if number is odd.
ISLOGICAL ISLOGICAL(<value>) Scalar Checks whether a value is a logical value (TRUE or FALSE), and returns TRUE or
FALSE.
ISNONTEXT ISNONTEXT(<value>) Scalar Checks whether a value is not text (blank cells are not text), and returns TRUE or
FALSE.
ISNUMBER ISNUMBER(<value>) Scalar Checks whether a value is a number, and returns TRUE or FALSE.
ISODD ISODD(number) Scalar Returns TRUE if number is odd, or FALSE if number is even.
Information functions
Function Syntax Result type Description
ISONORAFTER ISONORAFTER(<scalar_expression>, Scalar The IsOnOrAfter function is a boolean function that emulates the behavior of
<scalar_expression>sort_order] [,scalar_expression>, Start At clause and returns true for a row that meets all the conditions
<scalar_expression>, [sort_order][,…]) mentioned as parameters in this function.
ISTEXT ISTEXT(<value>) Scalar Checks whether a value is text, and returns TRUE or FALSE.
LOOKUPVALUE LOOKUPVALUE( <result_columnName>, Scalar Retrieves a value from a table.
<search_columnName>, <search_value>[,
<search_columnName>, <search_value>]…)
USERNAME USERNAME() Scalar Returns the domain name and user name of the current connection with the
format of domain-name\user-name.
Logical functions
Function Syntax Result type Description
AND AND(<logical1>,<logical2>) Scalar Checks whether all arguments are TRUE, and returns TRUE if all arguments are
TRUE.
0 FALSE() Scalar Returns the logical value FALSE.
IF IF(logical_test>,<value_if_true>, value_if_false) Scalar Checks whether a condition is met, and returns one value if TRUE, and another
value if FALSE.
IFERROR IFERROR(value, value_if_error) Scalar Returns value_if_error if the first expression is an error and the value of the
expression itself otherwise.
IN
NOT NOT(<logical>) Scalar Changes FALSE to TRUE, or TRUE to FALSE.
OR OR(<logical1>,<logical2>) Scalar Returns TRUE if any of the arguments are TRUE, and returns FALSE if all
arguments are FALSE.
SWITCH SWITCH(<expression>, <value>, <result>[, <value>, <resultScalar Returns different results depending on the value of an expression.
1 TRUE() Scalar Returns the logical value TRUE.
Math and Trignometry functions
Function Syntax Result type Description
ABS ABS(<number>) Scalar Returns the absolute value of a number.
ACOS ACOS(number) Scalar Returns the arccosine, or inverse cosine, of a number. The arccosine is the angle
whose cosine is number. The returned angle is given in radians in the range 0
(zero) to pi.
ACOSH ACOSH(number) Scalar Returns the inverse hyperbolic cosine of a number. The number must be greater
than or equal to 1. The inverse hyperbolic cosine is the value whose hyperbolic
cosine is number, so ACOSH(COSH(number)) equals number.
ASIN ASIN(number) Scalar Returns the arcsine, or inverse sine, of a number. The arcsine is the angle whose
sine is number. The returned angle is given in radians in the range -pi/2 to pi/2.
ASINH ASINH(number) Scalar Returns the inverse hyperbolic sine of a number. The inverse hyperbolic sine is
the value whose hyperbolic sine is number, so ASINH(SINH(number)) equals
number.
ATAN ATAN(number) Scalar Returns the arctangent, or inverse tangent, of a number. The arctangent is the
angle whose tangent is number. The returned angle is given in radians in the
range -pi/2 to pi/2.
ATANH ATANH(number) Scalar Returns the inverse hyperbolic tangent of a number. Number must be between -
1 and 1 (excluding -1 and 1). The inverse hyperbolic tangent is the value whose
hyperbolic tangent is number, so ATANH(TANH(number)) equals number.
CEILING CEILING(<number>, <significance>) Scalar Rounds a number up, to the nearest integer or to the nearest unit of significance.
COMBIN COMBIN(number, number_chosen) Scalar Returns the number of combinations for a given number of items. Use COMBIN
to determine the total possible number of groups for a given number of items.
COMBINA COMBINA(number, number_chosen) Scalar Returns the number of combinations (with repetitions) for a given number of
items.
COS COS(number) Scalar Returns the cosine of the given angle.
COSH COSH(number) Scalar Returns the hyperbolic cosine of a number.
CURRENCY CURRENCY(<value>) Scalar Returns the value as a currency data type.
DEGREES DEGREES(angle) Scalar Converts radians into degrees.
Math and Trignometry functions
Function Syntax Result type Description
DIVIDE DIVIDE(<numerator>, <denominator> Scalar Safe Divide function with ability to handle divide by zero case.
[,<alternateresult>])
EVEN EVEN(number) Scalar Returns number rounded up to the nearest even integer. You can use this
function for processing items that come in twos. For example, a packing crate
accepts rows of one or two items. The crate is full when the number of items,
rounded up to the nearest two, matches the crate's capacity.
GCD GCD(number1, [number2], ...) Scalar Returns the greatest common divisor of two integers. The greatest common
divisor is the largest integer that divides both number1 and number2 without a
remainder.
GENERATESERIES GENERATESERIES(<startValue>, <endValue>[, Scalar table Returns a single column table containing the values of an arithmetic series, that
<incrementValue>]) is, a sequence of values in which each differs from the preceding by a constant
quantity. The name of the column returned is Value.
GROUPBY GROUPBY (<table>, [<groupBy_columnName1>], Table Creates a summary the input table grouped by the specified columns.
[<name>, <expression>]… )
INTERSECT INTERSECT(<table_expression1>, <table_expression2>) Table Returns the rows of left-side table which appear in right-side table.
ISEMPTY ISEMPTY(<table_expression>) Scalar Returns true if the specified table or table-expression is Empty.
NATURALINNERJOIN NATURALINNERJOIN(<leftJoinTable>, <rightJoinTable>) Table Joins the Left table with right table using the Inner Join semantics.
NATURALLEFTOUTERJOIN NATURALLEFTOUTERJOIN(<leftJoinTable>, Table Joins the Left table with right table using the Left Outer Join semantics.
<rightJoinTable>)
SUMMARIZECOLUMNS SUMMARIZECOLUMNS( <groupBy_columnName> [, < Table Create a summary table for the requested totals over set of groups.
groupBy_columnName >]…, [<filterTable>]…[, <name>,
<expression>]…)
Table Constructor { <scalarExpr1>, <scalarExpr2>, … } Table Returns a table of one or more columns.
{ ( <scalarExpr1>, <scalarExpr2>, … ), ( <scalarExpr1>,
<scalarExpr2>, … ), … }
TREATAS TREATAS(table_expression, <column>[, <column>[, Table Applies the result of a table expression as filters to columns from an unrelated
<column>[,…]]]} ) table.
UNION UNION(<table_expression1>, <table_expression2> Table Returns the union of the two tables whose columns match.
[,<table_expression>]…)
Other functions
Function Syntax Result type Description
VAR VAR <name> = <expression> Scalar Stores the result of an expression as a named variable, which can then be passed
as an argument to other measure expressions. Once resultant values have been
calculated for a variable expression, those values do not change, even if the
variable is referenced in another expression.
Parent and child functions
Function Syntax Result type Description
PATH PATH(<ID_columnName>, <parent_columnName>) Scalar Returns a string which contains a delimited list of IDs, starting with the top/root
of a hierarchy and ending with the specified ID.
PATHCONTAINS PATHCONTAINS(<path>, <item>) Scalar Returns TRUE if the specified Item exists within the specified Path.
PATHITEM PATHITEM(<path>, <position>[, <type>]) Scalar Returns the nth item in the delimited list produced by the Path function.
PATHITEMREVERSE PATHITEMREVERSE(<path>, <position>[, <type>]) Scalar Returns the nth item in the delimited list produced by the Path function,
counting backwards from the last item in the path.
PATHLENGTH PATHLENGTH(<path>) Scalar Returns returns the number of items in a particular path string. This function
returns 1 for the path generated for an ID at the top/root of a hierarchy.
Statistical Functions
Function Syntax Result type Description
ADDCOLUMNS ADDCOLUMNS(<table>, <name>, <expression>[, Table Returns a table with new columns specified by the DAX expressions.
<name>, <expression>]…)
AVERAGE AVERAGE(<column>) Scalar Returns the average (arithmetic mean) of all the numbers in a column.
AVERAGEA AVERAGEA(<column>) Scalar Returns the average (arithmetic mean) of all the values in a column.
AVERAGEX AVERAGEX(<table>,<expression>) Scalar Returns the average (arithmetic mean) of all the numbers in a column.
BETA.DIST BETA.DIST(x,alpha,beta,cumulative,[A],[B]) Scalar Returns the beta distribution. The beta distribution is commonly used to study
variation in the percentage of something across samples, such as the fraction of
the day people spend watching television.
BETA.INV BETA.INV(probability,alpha,beta,[A],[B]) Scalar Returns the inverse of the beta cumulative probability density function
(BETA.DIST). If probability = BETA.DIST(x,...TRUE), then BETA.INV(probability,...) =
x. The beta distribution can be used in project planning to model probable
completion times given an expected completion time and variability.
CHISQ.INV CHISQ.INV(probability,deg_freedom) Scalar Returns the inverse of the left-tailed probability of the chi-squared distribution.
The chi-squared distribution is commonly used to study variation in the
percentage of something across samples, such as the fraction of the day people
spend watching television.
CHISQ.INV.RT CHISQ.INV.RT(probability,deg_freedom) Scalar Returns the inverse of the right-tailed probability of the chi-squared distribution.
If probability = CHISQ.DIST.RT(x,...), then CHISQ.INV.RT(probability,...) = x. Use
this function to compare observed results with expected ones in order to decide
whether your original hypothesis is valid.
CONFIDENCE.NORM CONFIDENCE.NORM(alpha,standard_dev,size) Scalar Returns the confidence interval for a population mean, using a normal
distribution.
CONFIDENCE.T CONFIDENCE.T(alpha,standard_dev,size) Scalar Returns the confidence interval for a population mean, using a Student's t
distribution.
COUNT COUNT(<column>) Scalar Counts the numbers in a column.
COUNTA COUNTA(<column>) Scalar Counts the number of values in a column.
COUNTAX COUNTAX(<table>,<expression>) Scalar Counts the number of values which result from evaluating an expression for each
row of a table.
COUNTBLANK COUNTBLANK(<column>) Scalar Counts the number of blanks in a column.
COUNTROWS COUNTROWS(<table>) Scalar Counts the number of rows in a table.
Statistical Functions
Function Syntax Result type Description
COUNTX COUNTX(<table>,<expression>) Scalar Counts the number of values which result from evaluating an expression for each
row of a table.
CROSSJOIN CROSSJOIN(<table>, <table>[, <table>]…) Table Returns a table that is a crossjoin of the specified tables.
DATATABLE Table Provides a mechanism for declaring an inline set of data values.
DISTINCTCOUNT DISTINCTCOUNT(<column>) Scalar Counts the number of distinct values in a column.
EXPON.DIST EXPON.DIST(x,lambda,cumulative) Scalar Returns the exponential distribution. Use EXPON.DIST to model the time
between events, such as how long an automated bank teller takes to deliver
cash. For example, you can use EXPON.DIST to determine the probability that the
process takes at most 1 minute.
GENERATE GENERATE(<table1>, <table2>) Table The second table expression will be evaluated for each row in the first table.
Returns the crossjoin of the first table with these results.
GENERATEALL GENERATEALL(<table1>, <table2>) Table The second table expression will be evaluated for each row in the first table.
Returns the crossjoin of the first table with these results, including rows for thich
the second table expression is empty.
MAXX MAXX(<table>,<expression>) Scalar Returns the largest numeric value that results from evaluating an expression for
each row of a table.
MEDIAN MEDIAN(<column>) Scalar Returns the 50th percentile of values in a column.
MEDIANX MEDIANX(<table>, <expression>) Scalar Returns the 50th percentile of an expression values in a table.
MIN MIN(<column>) Scalar Returns the smallest numeric value in a column, or the smaller value between
two scalar expressions. Ignores logical values and text.
MINA MINA(<column>) Scalar Returns the smallest value in a column. Does not ignore logical values and text.
MINX MINX(<table>, < expression>) Scalar Returns the smallest numeric value that results from evaluating an expression for
each row of a table.
PERCENTILE.EXC PERCENTILE.EXC(<column>, <k>) Scalar Returns the k-th (exclusive) percentile of values in a column.
PERCENTILE.INC PERCENTILE.INC(<column>, <k>) Scalar Returns the k-th (inclusive) percentile of values in a column.
PERCENTILEX.EXC PERCENTILEX.EXC(<table>, <expression>, k) Scalar Returns the k-th (exclusive) percentile of an expression values in a table.
Statistical Functions
Function Syntax Result type Description
PERCENTILEX.INC PERCENTILEX.INC(<table>, <expression>;, k) Scalar Returns the k-th (inclusive) percentile of an expression values in a table.
PERMUT PERMUT(number, number_chosen) Scalar Returns the number of permutations for a given number of objects that can be
selected from number objects
POISSON.DIST POISSON.DIST(x,mean,cumulative) Scalar Returns the Poisson distribution. A common application of the Poisson
distribution is predicting the number of events over a specific time, such as the
number of cars arriving at a toll plaza in 1 minute.
RANK.EQ RANK.EQ(<value>, <columnName>[, <order>]) Scalar Returns the rank of a number in a column of numbers. If more than one value
has the same rank, the top rank of that set of values is returned.
RANKX RANKX(<table>, <expression>[, <value>[, <order>[, Scalar Returns the rank of an expression evaluated in the current context in the list of
<ties>]]]) values for the expression evaluated for each row in the specified table.
ROW ROW(<name>, <expression>[[,<name>, <expression>] Scalar Returns a single row table with new columns specified by the DAX expressions.
…])
SAMPLE SAMPLE(<n_value>, <table>, <orderBy_expression>, Table Returns a sample subset from a given table expression.
[<order>[, <orderBy_expression>, [<order>]]…])
SELECTCOLUMNS SELECTCOLUMNS(<table>, <name>, Table Returns a table with selected columns from the table and new columns specified
<scalar_expression> [, <name>, <scalar_expression>]…) by the DAX expressions.
EXACT EXACT(<text1>,<text2>) Scalar Checks whether two text strings are exactly the same, and returns TRUE or
FALSE. EXACT is case-sensitive.
FIND FIND(<find_text>, <within_text>[, [<start_num>][, Scalar Returns the starting position of one text string within another text string. FIND is
<NotFoundValue>]]) case-sensitive.
FIXED FIXED(<number>, <decimals>, <no_commas>) Scalar Rounds a number to the specified number of decimals and returns the result as
text with optional commas.
FORMAT FORMAT(<value>, <format_string>) Scalar Converts a value to text in the specified number format.
LEFT LEFT(<text>, <num_chars> Scalar Returns the specified number of characters from the start of a text string.
UNICHAR UNICHAR(number) Scalar Returns the Unicode character referenced by the numeric value.
UPPER UPPER (<text>) Scalar Converts a text string to all uppercase letters.
VALUE VALUE(<text>) Scalar Converts a text string that represents a number to a number.
Alphabetical list of DAX functions
Function Syntax Result type Description Name
ABS ABS(<number>) Scalar Returns the absolute value of a number. Math_Trig
ACOS ACOS(number) Scalar Returns the arccosine, or inverse cosine, of a number. The arccosine is the angle Math_Trig
whose cosine is number. The returned angle is given in radians in the range 0
(zero) to pi.
ACOSH ACOSH(number) Scalar Returns the inverse hyperbolic cosine of a number. The number must be greater Math_Trig
than or equal to 1. The inverse hyperbolic cosine is the value whose hyperbolic
cosine is number, so ACOSH(COSH(number)) equals number.
ADDCOLUMNS ADDCOLUMNS(<table>, <name>, <expression>[, Table Returns a table with new columns specified by the DAX expressions. Statistics
<name>, <expression>]…)
ADDMISSINGITEMS ADDMISSINGITEMS(<showAllColumn>[, Add the rows with empty measure values back. Filter
<showAllColumn>]…, <table>, <groupingColumn>[,
<groupingColumn>]…[, filterTable]…)
ALL ALL( {<table> | <column>[, <column>[, <column>[, Table Returns all the rows in a table, or all the values in a column, ignoring any filters Filter
…]]]} ) that might have been applied.
ALLEXCEPT ALLEXCEPT(<table>,<column>[,<column>[,…]]) Table Returns all the rows in a table except for those rows that are affected by the Filter
specified column filters.
ALLNOBLANKROW ALLNOBLANKROW( {<table> | <column>[, <column>[, Table Returns all the rows except blank row in a table, or all the values in a column, Filter
<column>[,…]]]} ) ignoring any filters that might have been applied.
ALLSELECTED ALLSELECTED([<tableName> | <columnName>]) Table Returns all the rows in a table, or all the values in a column, ignoring any filters Filter
that might have been applied inside the query, but keeping filters that come
from outside.
AND AND(<logical1>,<logical2>) Scalar Checks whether all arguments are TRUE, and returns TRUE if all arguments are Logical
TRUE.
ASIN ASIN(number) Scalar Returns the arcsine, or inverse sine, of a number. The arcsine is the angle whose Math_Trig
sine is number. The returned angle is given in radians in the range -pi/2 to pi/2.
ASINH ASINH(number) Scalar Returns the inverse hyperbolic sine of a number. The inverse hyperbolic sine is Math_Trig
the value whose hyperbolic sine is number, so ASINH(SINH(number)) equals
number.
ATAN ATAN(number) Scalar Returns the arctangent, or inverse tangent, of a number. The arctangent is the Math_Trig
angle whose tangent is number. The returned angle is given in radians in the
range -pi/2 to pi/2.
Alphabetical list of DAX functions
Function Syntax Result type Description Name
ATANH ATANH(number) Scalar Returns the inverse hyperbolic tangent of a number. Number must be between - Math_Trig
1 and 1 (excluding -1 and 1). The inverse hyperbolic tangent is the value whose
hyperbolic tangent is number, so ATANH(TANH(number)) equals number.
AVERAGE AVERAGE(<column>) Scalar Returns the average (arithmetic mean) of all the numbers in a column. Statistics
AVERAGEA AVERAGEA(<column>) Scalar Returns the average (arithmetic mean) of all the values in a column. Statistics
AVERAGEX AVERAGEX(<table>,<expression>) Scalar Returns the average (arithmetic mean) of all the numbers in a column. Statistics
BETA.DIST BETA.DIST(x,alpha,beta,cumulative,[A],[B]) Scalar Returns the beta distribution. The beta distribution is commonly used to study Statistics
variation in the percentage of something across samples, such as the fraction of
the day people spend watching television.
BETA.INV BETA.INV(probability,alpha,beta,[A],[B]) Scalar Returns the inverse of the beta cumulative probability density function Statistics
(BETA.DIST). If probability = BETA.DIST(x,...TRUE), then BETA.INV(probability,...) =
x. The beta distribution can be used in project planning to model probable
completion times given an expected completion time and variability.
CALENDAR CALENDAR(<start_date>, <end_date>) Table Returns a table with one column of all dates between StartDate and EndDate. Date_Time
CALENDARAUTO CALENDARAUTO([fiscal_year_end_month]) Table Returns a table with one column of dates calculated from the model Date_Time
automatically.
CEILING CEILING(<number>, <significance>) Scalar Rounds a number up, to the nearest integer or to the nearest unit of significance. Math_Trig
CHISQ.INV CHISQ.INV(probability,deg_freedom) Scalar Returns the inverse of the left-tailed probability of the chi-squared distribution. Statistics
The chi-squared distribution is commonly used to study variation in the
percentage of something across samples, such as the fraction of the day people
spend watching television.
CHISQ.INV.RT CHISQ.INV.RT(probability,deg_freedom) Scalar Returns the inverse of the right-tailed probability of the chi-squared distribution. Statistics
If probability = CHISQ.DIST.RT(x,...), then CHISQ.INV.RT(probability,...) = x. Use
this function to compare observed results with expected ones in order to decide
whether your original hypothesis is valid.
CLOSINGBALANCEMONTH CLOSINGBALANCEMONTH(<expression>,<dates>[,<filter Scalar Evaluates the specified expression for the date corresponding to the end of the Time_Intel
>]) current month after applying specified filters.
CLOSINGBALANCEQUARTER CLOSINGBALANCEQUARTER(<expression>,<dates>[,<filt Scalar Evaluates the specified expression for the date corresponding to the end of the Time_Intel
er>]) current quarter after applying specified filters.
Alphabetical list of DAX functions
Function Syntax Result type Description Name
CLOSINGBALANCEYEAR CLOSINGBALANCEYEAR(<expression>,<dates>[,<filter>] Scalar Evaluates the specified expression for the date corresponding to the end of the Time_Intel
[,<year_end_date>]) current year after applying specified filters.
CODE CODE(text) Scalar Returns a numeric code for the first character in a text string. The returned code Text
corresponds to the character set used by your computer.
COMBIN COMBIN(number, number_chosen) Scalar Returns the number of combinations for a given number of items. Use COMBIN Math_Trig
to determine the total possible number of groups for a given number of items.
COMBINA COMBINA(number, number_chosen) Scalar Returns the number of combinations (with repetitions) for a given number of Math_Trig
items.
COMBINEVALUES COMBINEVALUES(<delimiter>, <expression>, Text
<expression>[, <expression>]…)
CONCATENATE CONCATENATE(<text1>, <text2>) Scalar Joins two text strings into one text string. Text
CONCATENATEX CONCATENATEX(<table>, <expression>, [delimiter]) Scalar Evaluates expression for each row on the table, then return the concatenation of Text
those values in a single string result, seperated by the specified delimiter.
CONFIDENCE.NORM CONFIDENCE.NORM(alpha,standard_dev,size) Scalar Returns the confidence interval for a population mean, using a normal Statistics
distribution.
CONFIDENCE.T CONFIDENCE.T(alpha,standard_dev,size) Scalar Returns the confidence interval for a population mean, using a Student's t Statistics
distribution.
CONTAINS CONTAINS(<table>, <columnName>, <value>[, Scalar Returns TRUE if there exists at least one row where all columns have specified Information
<columnName>, <value>]…) values.
CONTAINSROW CONTAINSROW(<tableExpr>, <scalarExpr>[, The number of scalarExprN must match the number of columns in tableExpr. Information
<scalarExpr>, …]) Unlike the = operator, the IN operator and the CONTAINSROW function perform
strict comparison. For example, the BLANK value does not match 0.
NOT IN is not an operator in DAX. To perform the logical negation of the IN
operator, put NOT in front of the entire expression. For example, NOT [Color] IN {
"Red", "Yellow", "Blue" }.
COS COS(number) Scalar Returns the cosine of the given angle. Math_Trig
COSH COSH(number) Scalar Returns the hyperbolic cosine of a number. Math_Trig
COUNT COUNT(<column>) Scalar Counts the numbers in a column. Statistics
COUNTA COUNTA(<column>) Scalar Counts the number of values in a column. Statistics
COUNTAX COUNTAX(<table>,<expression>) Scalar Counts the number of values which result from evaluating an expression for each Statistics
row of a table.
COUNTBLANK COUNTBLANK(<column>) Scalar Counts the number of blanks in a column. Statistics
COUNTROWS COUNTROWS(<table>) Scalar Counts the number of rows in a table. Statistics
Alphabetical list of DAX functions
Function Syntax Result type Description Name
COUNTX COUNTX(<table>,<expression>) Scalar Counts the number of values which result from evaluating an expression for each Statistics
row of a table.
CROSSFILTER CROSSFILTER(<columnName1>, <columnName2>, No Value Specifies cross filtering direction to be used in the evaluation of a DAX Filter
<direction>) expression. The relationship is defined by naming, as arguments, the two
columns that serve as endpoints.
CROSSJOIN CROSSJOIN(<table>, <table>[, <table>]…) Table Returns a table that is a crossjoin of the specified tables. Statistics
CURRENCY CURRENCY(<value>) Scalar Returns the value as a currency data type. Math_Trig
CUSTOMDATA CUSTOMDATA() Scalar Returns the value of the CustomData connection string property if defined; Information
otherwise, BLANK().
DATATABLE Table Provides a mechanism for declaring an inline set of data values. Statistics
DATATABLE DATATABLE (ColumnName1, DataType1, Table Provides a mechanism for declaring an inline set of data values. Other
ColumnName2, DataType2..., {{Value1, Value2...},
{ValueN, ValueN+1...}...})
DATE DATE(<year>, <month>, <day>) Scalar Returns the specified date in datetime format. Date_Time
DATEADD DATEADD(<dates>,<number_of_intervals>,<interval>) Table Moves the given set of dates by a specified interval. Time_Intel
DATEDIFF DATEDIFF(<start_date>, <end_date>, <interval>) Scalar Returns the number of units (unit specified in Interval) between the input two Date_Time
dates.
DATESBETWEEN DATESBETWEEN(<dates>,<start_date>,<end_date>) Table Returns the dates between two given dates. Time_Intel
DATESINPERIOD DATESINPERIOD(<dates>,<start_date>,<number_of_int Table Returns the dates from the given period. Time_Intel
ervals>,<interval>)
DATESMTD DATESMTD(<dates>) Table Returns a set of dates in the month up to current date. Time_Intel
DATESQTD DATESQTD(<dates>) Table Returns a set of dates in the quarter up to current date. Time_Intel
DATESYTD DATESYTD(<dates> [,<year_end_date>]) Table Returns a set of dates in the year up to current date. Time_Intel
DATEVALUE DATEVALUE(date_text) Scalar Converts a date in the form of text to a date in datetime format. Date_Time
DAY DAY(<date>) Scalar Returns a number from 1 to 31 representing the day of the month. Date_Time
DEGREES DEGREES(angle) Scalar Converts radians into degrees. Math_Trig
DISTINCT - COLUMN DISTINCT(<column>) Scalar Returns a one column table that contains the distinct (unique) values in a Filter
column, for a column argument. Or multiple columns with distinct (unique)
combination of values, for a table expression argument.
DISTINCT - TABLE DISTINCT(<table>) Table Returns a table containing only distinct rows. Filter
DISTINCTCOUNT DISTINCTCOUNT(<column>) Scalar Counts the number of distinct values in a column. Statistics
DIVIDE DIVIDE(<numerator>, <denominator> Scalar Safe Divide function with ability to handle divide by zero case. Math_Trig
[,<alternateresult>])
EARLIER EARLIER(<column>, <number>) Scalar Returns the value in the column prior to the specified number of table scans Filter
(default is 1).
Alphabetical list of DAX functions
Function Syntax Result type Description Name
EARLIEST EARLIEST(<column>) Scalar Returns the value in the column for the very first point at which there was a row Filter
context.
EDATE EDATE(<start_date>, <months>) Scalar Returns the date that is the indicated number of months before or after the start Date_Time
date.
ENDOFMONTH ENDOFMONTH(<dates>) Table Scalar Returns the end of month. Time_Intel
ENDOFQUARTER ENDOFQUARTER(<dates>) Table Scalar Returns the end of quarter. Time_Intel
ENDOFYEAR ENDOFYEAR(<dates> [,<year_end_date>]) Table Scalar Returns the end of year. Time_Intel
EOMONTH EOMONTH(<start_date>, <months>) Scalar Returns the date in datetime format of the last day of the month before or after Date_Time
a specified number of months.
ERROR ERROR(<text>) Scalar Raises an error with an error message. Other
EVEN EVEN(number) Scalar Returns number rounded up to the nearest even integer. You can use this Math_Trig
function for processing items that come in twos. For example, a packing crate
accepts rows of one or two items. The crate is full when the number of items,
rounded up to the nearest two, matches the crate's capacity.
EXACT EXACT(<text1>,<text2>) Scalar Checks whether two text strings are exactly the same, and returns TRUE or Text
FALSE. EXACT is case-sensitive.
EXCEPT EXCEPT(<table_expression1>, <table_expression2>) Scalar Returns the rows of left-side table which do not appear in right-side table. Other
EXP EXP(<number>) Scalar Returns e raised to the power of a given number. Math_Trig
EXPON.DIST EXPON.DIST(x,lambda,cumulative) Scalar Returns the exponential distribution. Use EXPON.DIST to model the time Statistics
between events, such as how long an automated bank teller takes to deliver
cash. For example, you can use EXPON.DIST to determine the probability that the
process takes at most 1 minute.
FACT FACT(<number>) Scalar Returns the factorial of a number, equal to 1*2*3*...* Number. Math_Trig
FILTER FILTER(<table>,<filter>) Table Returns a table that has been filtered. Filter
FILTERS FILTERS(<columnName>) Table Returns a table of the filter values applied directly to the specified column. Filter
FIND FIND(<find_text>, <within_text>[, [<start_num>][, Scalar Returns the starting position of one text string within another text string. FIND is Text
<NotFoundValue>]]) case-sensitive.
FIRSTDATE FIRSTDATE(<dates>) Table Scalar Returns first non blank date. Time_Intel
FIRSTNONBLANK FIRSTNONBLANK(<column>,<expression>) Table Scalar Returns the first value in the column for which the expression has a non blank Time_Intel
value.
FIXED FIXED(<number>, <decimals>, <no_commas>) Scalar Rounds a number to the specified number of decimals and returns the result as Text
text with optional commas.
FLOOR FLOOR(<number>, <significance>) Scalar Rounds a number down, toward zero, to the nearest multiple of significance. Math_Trig
FORMAT FORMAT(<value>, <format_string>) Scalar Converts a value to text in the specified number format. Text
Alphabetical list of DAX functions
Function Syntax Result type Description Name
GCD GCD(number1, [number2], ...) Scalar Returns the greatest common divisor of two integers. The greatest common Math_Trig
divisor is the largest integer that divides both number1 and number2 without a
remainder.
GENERATE GENERATE(<table1>, <table2>) Table The second table expression will be evaluated for each row in the first table. Statistics
Returns the crossjoin of the first table with these results.
GENERATEALL GENERATEALL(<table1>, <table2>) Table The second table expression will be evaluated for each row in the first table. Statistics
Returns the crossjoin of the first table with these results, including rows for thich
the second table expression is empty.
GENERATESERIES GENERATESERIES(<startValue>, <endValue>[, Scalar table Returns a single column table containing the values of an arithmetic series, that Other
<incrementValue>]) is, a sequence of values in which each differs from the preceding by a constant
quantity. The name of the column returned is Value.
GEOMEAN GEOMEAN(<column>) Scalar Returns geometric mean of given column reference. Statistics
GEOMEANX GEOMEANX(<table>, <expression>) Scalar Returns geometric mean of an expression values in a table. Statistics
GROUPBY GROUPBY (<table>, [<groupBy_columnName1>], Table Creates a summary the input table grouped by the specified columns. Other
[<name>, <expression>]… )
HASONEFILTER HASONEFILTER(<columnName>) Scalar Returns true the specified table or column have one and only one filter. Filter
HASONEVALUE HASONEVALUE(<columnName>) Scalar Returns true when there's only one value in the specified column. Filter
HOUR HOUR(<datetime>) Scalar Returns the hour as a number from 0 (12:00 A.M.) to 23 (11:00 P.M.). Date_Time
IF IF(logical_test>,<value_if_true>, value_if_false) Scalar Checks whether a condition is met, and returns one value if TRUE, and another Logical
value if FALSE.
IFERROR IFERROR(value, value_if_error) Scalar Returns value_if_error if the first expression is an error and the value of the Logical
expression itself otherwise.
IN Logical
IN OPERATOR <scalarExpr> IN <tableExpr> The number of scalarExprN must match the number of columns in tableExpr. Information
( <scalarExpr1>, <scalarExpr2>, … ) IN <tableExpr> Unlike the = operator, the IN operator and the CONTAINSROW function perform
strict comparison. For example, the BLANK value does not match 0.
NOT IN is not an operator in DAX. To perform the logical negation of the IN
operator, put NOT in front of the entire expression. For example, NOT [Color] IN {
"Red", "Yellow", "Blue" }.
INT INT(<number>) Scalar Rounds a number down to the nearest integer. Math_Trig
INTERSECT INTERSECT(<table_expression1>, <table_expression2>) Table Returns the rows of left-side table which appear in right-side table. Other
ISBLANK ISBLANK(<value>) Scalar Checks whether a value is blank, and returns TRUE or FALSE. Information
ISCROSSFILTERED ISCROSSFILTERED(<columnName>) Scalar Returns true when the specified table or column is crossfiltered. Filter
ISEMPTY ISEMPTY(<table_expression>) Scalar Returns true if the specified table or table-expression is Empty. Other
Alphabetical list of DAX functions
Function Syntax Result type Description Name
ISERROR ISERROR(<value>) Scalar Checks whether a value is an error, and returns TRUE or FALSE. Information
ISEVEN ISEVEN(number) Scalar Returns TRUE if number is even, or FALSE if number is odd. Information
ISFILTERED ISFILTERED(<columnName>) Scalar Returns true when there are direct filters on the specified column. Filter
ISLOGICAL ISLOGICAL(<value>) Scalar Checks whether a value is a logical value (TRUE or FALSE), and returns TRUE or Information
FALSE.
ISNONTEXT ISNONTEXT(<value>) Scalar Checks whether a value is not text (blank cells are not text), and returns TRUE or Information
FALSE.
ISNUMBER ISNUMBER(<value>) Scalar Checks whether a value is a number, and returns TRUE or FALSE. Information
ISO.CEILING ISO.CEILING(<number>[, <significance>]) Scalar Rounds a number up, to the nearest integer or to the nearest multiple of Math_Trig
significance.
ISODD ISODD(number) Scalar Returns TRUE if number is odd, or FALSE if number is even. Information
ISONORAFTER ISONORAFTER(<scalar_expression>, Scalar The IsOnOrAfter function is a boolean function that emulates the behavior of Information
<scalar_expression>sort_order] [,scalar_expression>, Start At clause and returns true for a row that meets all the conditions
<scalar_expression>, [sort_order][,…]) mentioned as parameters in this function.
ISTEXT ISTEXT(<value>) Scalar Checks whether a value is text, and returns TRUE or FALSE. Information
KEEPFILTERS KEEPFILTERS(<expression>) Table Changes the CALCULATE and CALCULATETABLE function filtering semantics. Filter
LASTDATE LASTDATE(<dates>) Table Scalar Returns last non blank date. Time_Intel
LASTNONBLANK LASTNONBLANK(<column>,<expression>) Table Scalar Returns the last value in the column for which the expression has a non blank Time_Intel
value.
LCM LCM(number1, [number2], ...) Scalar Returns the least common multiple of integers. The least common multiple is the Math_Trig
smallest positive integer that is a multiple of both integer arguments number1,
number2. Use LCM to add fractions with different denominators.
LEFT LEFT(<text>, <num_chars> Scalar Returns the specified number of characters from the start of a text string. Text
LEN LEN(<text>) Scalar Returns the number of characters in a text string. Text
LN LN(<number>) Scalar Returns the natural logarithm of a number. Math_Trig
LOG LOG(<number>,<base>) Scalar Returns the logarithm of a number to the base you specify. Math_Trig
LOG10 LOG10(<number>) Scalar Returns the base-10 logarithm of a number. Math_Trig
LOOKUPVALUE LOOKUPVALUE( <result_columnName>, Scalar Retrieves a value from a table. Information
<search_columnName>, <search_value>[,
<search_columnName>, <search_value>]…)
LOWER LOWER(<text>) Scalar Converts all letters in a text string to lowercase. Text
MAX MAX(<column>) Scalar Returns the largest numeric value in a column, or the larger value between two Statistics
MAX(<expression1>, <expression2>) scalar expressions. Ignores logical values and text.
Alphabetical list of DAX functions
Function Syntax Result type Description Name
MAXA MAXA(<column>) Scalar Returns the largest value in a column. Does not ignore logical values and text. Statistics
MAXX MAXX(<table>,<expression>) Scalar Returns the largest numeric value that results from evaluating an expression for Statistics
each row of a table.
MEDIAN MEDIAN(<column>) Scalar Returns the 50th percentile of values in a column. Statistics
MEDIANX MEDIANX(<table>, <expression>) Scalar Returns the 50th percentile of an expression values in a table. Statistics
MID MID(<text>, <start_num>, <num_chars>) Scalar Returns a string of characters from the middle of a text string, given a starting Text
position and length.
MIN MIN(<column>) Scalar Returns the smallest numeric value in a column, or the smaller value between Statistics
two scalar expressions. Ignores logical values and text.
MINA MINA(<column>) Scalar Returns the smallest value in a column. Does not ignore logical values and text. Statistics
MINUTE MINUTE(<datetime>) Scalar Returns a number from 0 to 59 representing the minute. Date_Time
MINX MINX(<table>, < expression>) Scalar Returns the smallest numeric value that results from evaluating an expression for Statistics
each row of a table.
MOD MOD(<number>, <divisor>) Scalar Rounds a number down to the nearest integer. Math_Trig
MONTH MONTH(<datetime>) Scalar Returns a number from 1 (January) to 12 (December) representing the month. Date_Time
MROUND MROUND(<number>, <multiple>) Scalar Returns a number rounded to the desired multiple. Math_Trig
NATURALINNERJOIN NATURALINNERJOIN(<leftJoinTable>, <rightJoinTable>) Table Joins the Left table with right table using the Inner Join semantics. Other
NATURALLEFTOUTERJOIN NATURALLEFTOUTERJOIN(<leftJoinTable>, Table Joins the Left table with right table using the Left Outer Join semantics. Other
<rightJoinTable>)
NEXTDAY NEXTDAY(<dates>) Table Scalar Returns a next day. Time_Intel
NEXTMONTH NEXTMONTH(<dates>) Table Returns a next month. Time_Intel
NEXTQUARTER NEXTQUARTER(<dates>) Table Returns a next quarter. Time_Intel
NEXTYEAR NEXTYEAR(<dates>[,<year_end_date>]) Table Returns a next year. Time_Intel
NOT NOT(<logical>) Scalar Changes FALSE to TRUE, or TRUE to FALSE. Logical
NOW NOW() Scalar Returns the current date and time in datetime format. Date_Time
ODD ODD(number) Scalar Returns number rounded up to the nearest odd integer. Math_Trig
OPENINGBALANCEMONTH OPENINGBALANCEMONTH(<expression>,<dates>[,<filte Scalar Evaluates the specified expression for the date corresponding to the end of the Time_Intel
r>]) previous month after applying specified filters.
OPENINGBALANCEQUARTER OPENINGBALANCEQUARTER(<expression>,<dates>[,<fil Scalar Evaluates the specified expression for the date corresponding to the end of the Time_Intel
ter>]) previous quarter after applying specified filters.
OPENINGBALANCEYEAR OPENINGBALANCEYEAR(<expression>,<dates>[,<filter>] Scalar Evaluates the specified expression for the date corresponding to the end of the Time_Intel
[,<year_end_date>]) previous year after applying specified filters.
OR OR(<logical1>,<logical2>) Scalar Returns TRUE if any of the arguments are TRUE, and returns FALSE if all Logical
arguments are FALSE.
Alphabetical list of DAX functions
Function Syntax Result type Description Name
PARALLELPERIOD PARALLELPERIOD(<dates>,<number_of_intervals>,<inte Table Returns a parallel period of dates by the given set of dates and a specified Time_Intel
rval>) interval.
PATH PATH(<ID_columnName>, <parent_columnName>) Scalar Returns a string which contains a delimited list of IDs, starting with the top/root Parent_Child
of a hierarchy and ending with the specified ID.
PATHCONTAINS PATHCONTAINS(<path>, <item>) Scalar Returns TRUE if the specified Item exists within the specified Path. Parent_Child
PATHITEM PATHITEM(<path>, <position>[, <type>]) Scalar Returns the nth item in the delimited list produced by the Path function. Parent_Child
PATHITEMREVERSE PATHITEMREVERSE(<path>, <position>[, <type>]) Scalar Returns the nth item in the delimited list produced by the Path function, Parent_Child
counting backwards from the last item in the path.
PATHLENGTH PATHLENGTH(<path>) Scalar Returns returns the number of items in a particular path string. This function Parent_Child
returns 1 for the path generated for an ID at the top/root of a hierarchy.
PERCENTILE.EXC PERCENTILE.EXC(<column>, <k>) Scalar Returns the k-th (exclusive) percentile of values in a column. Statistics
PERCENTILE.INC PERCENTILE.INC(<column>, <k>) Scalar Returns the k-th (inclusive) percentile of values in a column. Statistics
PERCENTILEX.EXC PERCENTILEX.EXC(<table>, <expression>, k) Scalar Returns the k-th (exclusive) percentile of an expression values in a table. Statistics
PERCENTILEX.INC PERCENTILEX.INC(<table>, <expression>;, k) Scalar Returns the k-th (inclusive) percentile of an expression values in a table. Statistics
PERMUT PERMUT(number, number_chosen) Scalar Returns the number of permutations for a given number of objects that can be Statistics
selected from number objects
PI PI() Scalar Returns the value of Pi, 3.14159265358979, accurate to 15 digits. Math_Trig
POISSON.DIST POISSON.DIST(x,mean,cumulative) Scalar Returns the Poisson distribution. A common application of the Poisson Statistics
distribution is predicting the number of events over a specific time, such as the
number of cars arriving at a toll plaza in 1 minute.
POWER POWER(<number>, <power>) Scalar Returns the result of a number raised to a power. Math_Trig
PREVIOUSDAY PREVIOUSDAY(<dates>) Table Returns a previous day. Time_Intel
PREVIOUSMONTH PREVIOUSMONTH(<dates>) Table Returns a previous month. Time_Intel
PREVIOUSQUARTER PREVIOUSQUARTER(<dates>) Table Returns a previous quarter. Time_Intel
PREVIOUSYEAR PREVIOUSYEAR(<dates>[,<year_end_date>]) Table Returns a previous year. Time_Intel
PRODUCT PRODUCT(<column>) Scalar Returns the product of given column reference. Math_Trig
PRODUCTX PRODUCTX(<table>, <expression>) Scalar Returns the product of an expression values in a table. Math_Trig
QUOTIENT QUOTIENT(<numerator>, <denominator>) Scalar Returns the integer portion of a division. Math_Trig
RADIANS RADIANS(angle) Scalar Converts degrees to radians. Math_Trig
RAND RAND() Scalar Returns a random number greater than or equal to 0 and less than 1, evenly Math_Trig
distributed. Random numbers change on recalculation.
RANDBETWEEN RANDBETWEEN(<bottom>,<top>) Scalar Returns a random number between the numbers you specify. Math_Trig
RANK.EQ RANK.EQ(<value>, <columnName>[, <order>]) Scalar Returns the rank of a number in a column of numbers. If more than one value Statistics
has the same rank, the top rank of that set of values is returned.
Alphabetical list of DAX functions
Function Syntax Result type Description Name
RANKX RANKX(<table>, <expression>[, <value>[, <order>[, Scalar Returns the rank of an expression evaluated in the current context in the list of Statistics
<ties>]]]) values for the expression evaluated for each row in the specified table.
RELATED RELATED(<column>) Scalar Returns a related value from another table. Filter
RELATEDTABLE RELATEDTABLE(<tableName>) Table Returns the related tables filtered so that it only includes the related rows. Filter
REPLACE REPLACE(<old_text>, <start_num>, <num_chars>, Scalar Replaces part of a text string with a different text string. Text
<new_text>)
REPT REPT(<text>, <num_times>) Scalar Repeats text a given number of times. Use REPT to fill a cell with a number of Text
instances of a text string.
RIGHT RIGHT(<text>, <num_chars>) Scalar Returns the specified number of characters from the end of a text string. Text
ROUND ROUND(<number>, <num_digits>) Scalar Rounds a number to a specified number of digits. Math_Trig
ROUNDDOWN ROUNDDOWN(<number>, <num_digits>) Scalar Rounds a number down, toward zero. Math_Trig
ROUNDUP ROUNDUP(<number>, <num_digits>) Scalar Rounds a number up, away from zero. Math_Trig
ROW ROW(<name>, <expression>[[,<name>, <expression>] Scalar Returns a single row table with new columns specified by the DAX expressions. Statistics
…])
SAMEPERIODLASTYEAR SAMEPERIODLASTYEAR(<dates>) Table Returns a set of dates in the current selection from the previous year. Time_Intel
SAMPLE SAMPLE(<n_value>, <table>, <orderBy_expression>, Table Returns a sample subset from a given table expression. Statistics
[<order>[, <orderBy_expression>, [<order>]]…])
SEARCH SEARCH(<find_text>, <within_text>[, [<start_num>][, Scalar Returns the starting position of one text string within another text string. SEARCH Text
<NotFoundValue>]]) is not case-sensitive.
SECOND SECOND(<time>) Scalar Returns a number from 0 to 59 representing the second. Date_Time
SELECTCOLUMNS SELECTCOLUMNS(<table>, <name>, Table Returns a table with selected columns from the table and new columns specified Statistics
<scalar_expression> [, <name>, <scalar_expression>]…) by the DAX expressions.
SELECTEDVALUE SELECTEDVALUE(<columnName>[, <alternateResult>]) Scalar Returns the value when the context for columnName has been filtered down to Filter
one distinct value only. Otherwise returns alternateResult.
SIGN SIGN(<number>) Scalar Returns the sign of a number: 1 if the number is positive, zero if the number is Math_Trig
zero, or -1 if the number is negative.
SIN SIN(number) Scalar Returns the sine of the given angle. Statistics
SINH SINH(number) Scalar Returns the hyperbolic sine of a number. Statistics
SQRT SQRT(<number>) Scalar Returns the square root of a number. Math_Trig
SQRTPI SQRTPI(number) Scalar Returns the square root of (number * pi). Statistics
STARTOFMONTH STARTOFMONTH(<dates>) Table Scalar Returns the start of month. Time_Intel
STARTOFQUARTER STARTOFQUARTER(<dates>) Table Scalar Returns the start of quarter. Time_Intel
STARTOFYEAR STARTOFYEAR(<dates>) Table Scalar Returns the start of year. Time_Intel
Alphabetical list of DAX functions
Function Syntax Result type Description Name
STDEV.P STDEV.P(<ColumnName>) Scalar Calculates standard deviation based on the entire population given as Statistics
arguments. Ignores logical values and text.
STDEV.S STDEV.S(<ColumnName>) Scalar Estimates standard deviation based on a sample. Ignores logical values and text Statistics
in the sample.
STDEVX.P STDEVX.P(<table>, <expression>) Scalar Estimates standard deviation based on the entire population that results from Statistics
evaluating an expression for each row of a table.
STDEVX.S STDEVX.S(<table>, <expression>) Scalar Estimates standard deviation based on a sample that results from evaluating an Statistics
expression for each row of a table.
SUBSTITUTE SUBSTITUTE(<text>, <old_text>, <new_text>, Scalar Replaces existing text with new text in a text string. Text
<instance_num>)
SUBSTITUTEWITHINDEX SUBSTITUTEWITHINDEX(<table>, <indexColumnName>, Table Returns a table which represents the semijoin of two tables supplied and for Filter
<indexColumnsTable>, [<orderBy_expression>, which the common set of columns are replaced by a 0-based index column. The
[<order>][, <orderBy_expression>, [<order>]]…]) index is based on the rows of the second table sorted by specified order
expressions.
SUMMARIZECOLUMNS SUMMARIZECOLUMNS( <groupBy_columnName> [, < Table Create a summary table for the requested totals over set of groups. Other
groupBy_columnName >]…, [<filterTable>]…[, <name>,
<expression>]…)
SUMX SUMX(<table>, <expression>) Scalar Returns the sum of an expression evaluated for each row in a table. Math_Trig
SWITCH SWITCH(<expression>, <value>, <result>[, <value>, Scalar Returns different results depending on the value of an expression. Logical
<result>]…[, <else>])
TAN TAN(number) Scalar Returns the tangent of the given angle. Statistics
TANH TANH(number) Scalar Returns the hyperbolic tangent of a number. Statistics
TIME TIME(hour, minute, second) Scalar Converts hours, minutes, and seconds given as numbers to a time in datetime Date_Time
format.
TIMEVALUE TIMEVALUE(time_text) Scalar Converts a time in text format to a time in datetime format. Date_Time
TODAY TODAY() Scalar Returns the current date in datetime format. Date_Time
TOPN TOPN(<n_value>, <table>, <orderBy_expression>, Scalar Returns a given number of top rows according to a specified expression. Statistics
[<order>[, <orderBy_expression>, [<order>]]…])
TOTALMTD TOTALMTD(<expression>,<dates>[,<filter>]) Scalar Evaluates the specified expression over the interval which begins on the first of Time_Intel
the month and ends with the last date in the specified date column after
applying specified filters.
TOTALQTD TOTALQTD(<expression>,<dates>[,<filter>]) Scalar Evaluates the specified expression over the interval which begins on the first day Time_Intel
of the quarter and ends with the last date in the specified date column after
applying specified filters.
Alphabetical list of DAX functions
Function Syntax Result type Description Name
TOTALYTD TOTALYTD(<expression>,<dates>[,<filter>] Scalar Evaluates the specified expression over the interval which begins on the first day Time_Intel
[,<year_end_date>]) of the year and ends with the last date in the specified date column after
applying specified filters.
TREATAS TREATAS(table_expression, <column>[, <column>[, Table Applies the result of a table expression as filters to columns from an unrelated Other
<column>[,…]]]} ) table.
TRIM TRIM(<text>) Scalar Removes all spaces from a text string except for single spaces between words. Text
TRUNC TRUNC(<number>,<num_digits>) Scalar Truncates a number to an integer by removing the decimal, or fractional, part of Math_Trig
the number.
TABLE CONSTRUCTOR { <scalarExpr1>, <scalarExpr2>, … } Table Returns a table of one or more columns. Other
{ ( <scalarExpr1>, <scalarExpr2>, … ), ( <scalarExpr1>,
<scalarExpr2>, … ), … }
UNICHAR UNICHAR(number) Scalar Returns the Unicode character referenced by the numeric value. Text
UNION UNION(<table_expression1>, <table_expression2> Table Returns the union of the two tables whose columns match. Other
[,<table_expression>]…)
UPPER UPPER (<text>) Scalar Converts a text string to all uppercase letters. Text
USERELATIONSHIP USERELATIONSHIP(<columnName1>,<columnName2>) No Value Specifies an existing relationship to be used in the evaluation of a DAX Filter
expression. The relationship is defined by naming, as arguments, the two
columns that serve as endpoints.
USERNAME USERNAME() Scalar Returns the domain name and user name of the current connection with the Information
format of domain-name\user-name.
UTCNOW UTCNOW() Date_Time
UTCTODAY UTCTODAY() Date_Time
VALUE VALUE(<text>) Scalar Converts a text string that represents a number to a number. Text
VALUES VALUES(<TableNameOrColumnName>) Table Returns a one column table or a table that contains the distinct (unique) values in Filter
a column.
VAR VAR <name> = <expression> Scalar Stores the result of an expression as a named variable, which can then be passed Other
as an argument to other measure expressions. Once resultant values have been
calculated for a variable expression, those values do not change, even if the
variable is referenced in another expression.
VAR.P VAR.P(<columnName>) Scalar Calculates variance based on the entire population. Ignores logical values and Statistics
text in the population.
VAR.S VAR.S(<columnName>) Scalar Estimates variance based on a sample. Ignores logical values and text in the Statistics
sample.
VARX.P VARX.P(<columnName>) Scalar Estimates variance based on the entire population that results from evaluating Statistics
an expression for each row of a table.
VARX.S VARx.S(<columnName>) Scalar Estimates variance based on a sample that results from evaluating an expression Statistics
for each row of a table.
Alphabetical list of DAX functions
Function Syntax Result type Description Name
WEEKDAY WEEKDAY(<date>, <return_type>) Scalar Returns a number from 1 to 7 identifying the day of the week of a date. Date_Time
WEEKNUM WEEKNUM(<date>, <return_type>) Scalar Returns the week number in the year. Date_Time
XIRR XIRR(<table>, <values>, <dates>, [guess]) Scalar Returns the internal rate of return for a schedule of cash flows that is not Statistics
necessarily periodic.
XNPV XNPV(<table>, <values>, <dates>, <rate>) Scalar Returns the net present value for a schedule of cash flows. Statistics
YEAR YEAR(<date>) Scalar Returns the year of a date as a four digit integer. Date_Time
YEARFRAC YEARFRAC(<start_date>, <end_date>, <basis>) Scalar Returns the year fraction representing the number of whole days between Date_Time
start_date and end_date.
FALSE FALSE() Scalar Returns the logical value FALSE. Logical
TRUE TRUE() Scalar Returns the logical value TRUE. Logical