0% found this document useful (0 votes)
22 views9 pages

Dax Functions 200116

The document describes various date and time functions in DAX including DATE, DATEVALUE, DAY, EDATE, EOMONTH, HOUR, MINUTE, MONTH, NOW, SECOND, TIME, TIMEVALUE, TODAY, WEEKDAY, WEEKNUM, and YEAR. It also describes time intelligence functions such as CLOSINGBALANCEMONTH, DATEADD, DATESBETWEEN, DATESINPERIOD, DATESMTD, and ENDOFMONTH that allow calculations and filtering of dates in DAX.

Uploaded by

pkumar950811
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views9 pages

Dax Functions 200116

The document describes various date and time functions in DAX including DATE, DATEVALUE, DAY, EDATE, EOMONTH, HOUR, MINUTE, MONTH, NOW, SECOND, TIME, TIMEVALUE, TODAY, WEEKDAY, WEEKNUM, and YEAR. It also describes time intelligence functions such as CLOSINGBALANCEMONTH, DATEADD, DATESBETWEEN, DATESINPERIOD, DATESMTD, and ENDOFMONTH that allow calculations and filtering of dates in DAX.

Uploaded by

pkumar950811
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
You are on page 1/ 9

DAX Functions

DAX Functions

Category Function Syntax Description


Date and Time Functions DATE Function DATE(<year>, <month>, <day>) Returns the specified date in datetime format.
Converts a date in the form of text to a date in datetime
Date and Time Functions DATEVALUE Function DATEVALUE(date_text)
format.
Date and Time Functions DAY Function DAY(<date>) <<datetime or text>> Returns the day of the month, a number from 1 to 31.
Returns the date that is the indicated number of months
before or after the start date. Use EDATE to calculate
Date and Time Functions EDATE Function EDATE(<start_date>, <months>)
maturity dates or due dates that fall on the same day of
the month as the date of issue.
Returns the date in datetime format of the last day of the
month, before or after a specified number of months. Use
Date and Time Functions EOMONTH Function EOMONTH(<start_date>, <months>)
EOMONTH to calculate maturity dates or due dates that
fall on the last day of the month.
Returns the hour as a number from 0 (12:00 A.M.) to 23
Date and Time Functions HOUR Function HOUR(<datetime>)
(11:00 P.M.).
Returns the minute as a number from 0 to 59, given a
Date and Time Functions MINUTE Function MINUTE(<datetime>)
date and time value.
Returns the month as a number from 1 (January) to 12
Date and Time Functions MONTH Function MONTH(<datetime>)
(December).
The NOW function is useful when you need to display the
current date and time on a worksheet or calculate a value
Date and Time Functions NOW Function NOW()
based on the current date and time, and have that value
updated each time you open the worksheet.
Returns the seconds of a time value, as a number from 0
Date and Time Functions SECOND Function SECOND(<time>)
to 59.
Converts hours, minutes, and seconds given as numbers
Date and Time Functions TIME Function TIME(hour, minute, second)
to a time in datetime format.
Converts a time in text format to a time in datetime
Date and Time Functions TIMEVALUE Function TIMEVALUE(time_text)
format.
Date and Time Functions TODAY Function TODAY() Returns the current date.
Returns a number from 1 to 7 identifying the day of the
Date and Time Functions WEEKDAY Function WEEKDAY(<date>, <return_type>) week of a date. By default the day ranges from 1 (Sunday)
to 7 (Saturday).
Returns the week number for the given date and year
Date and Time Functions WEEKNUM Function WEEKNUM(<date>, <return_type>) according to the return_type value. The week number
indicates where the week falls numerically within a year.
Returns the year of a date as a four digit integer in the
Date and Time Functions YEAR Function YEAR(<date>)
range 1900-9999.
Calculates the fraction of the year represented by the
number of whole days between two dates. Use the
YEARFRAC(<start_date>, <end_date>,
Date and Time Functions YEARFRAC Function <basis>) YEARFRAC worksheet function to identify the proportion
of a whole year's benefits or obligations to assign to a
specific term.
CLOSINGBALANCEMONTH(<expression>,<dat Evaluates the expression at the last date of the month in
Time Intelligence Functions CLOSINGBALANCEMONTH Function
es>[,<filter>]) the current context.

Time Intelligence Functions CLOSINGBALANCEQUARTER Function

Time Intelligence Functions CLOSINGBALANCEYEAR Function

Returns a table that contains a column of dates, shifted


DATEADD(<dates>,<number_of_intervals>
Time Intelligence Functions DATEADD Function ,<interval>) either forward or backward in time by the specified
number of intervals from the dates in the current context.
Returns a table that contains a column of dates that
DATESBETWEEN(<dates>,<start_date>,<en
Time Intelligence Functions DATESBETWEEN Function d_date>) begins with the start_date and continues until
the end_date.
Returns a table that contains a column of dates that
DATESINPERIOD(<dates>,<start_date>,<n
Time Intelligence Functions DATESINPERIOD Function umber_of_intervals>,<interval>) begins with the start_date and continues for the
specified number_of_intervals.
Returns a table that contains a column of the dates for the
Time Intelligence Functions DATESMTD Function DATESMTD(<dates>)
month to date, in the current context.
Time Intelligence Functions DATESQTD Function
Time Intelligence Functions DATESYTD Function
Returns the last date of the month in the current context
Time Intelligence Functions ENDOFMONTH Function ENDOFMONTH(<dates>)
for the specified column of dates.
Time Intelligence Functions ENDOFQUARTER Function
Time Intelligence Functions ENDOFYEAR Function
Returns the first date in the current context for the
Time Intelligence Functions FIRSTDATE Function FIRSTDATE(<dates>)
specified column of dates.

Time Intelligence Functions FIRSTNONBLANK Function FIRSTNONBLANK(<column>,<expression>) Returns the first value in the column, column, filtered by
the current context, where the expression is not blank.
Returns the last date in the current context for the
Time Intelligence Functions LASTDATE Function LASTDATE(<dates>)
specified column of dates.
Returns the last value in the column, column, filtered by
Time Intelligence Functions LASTNONBLANK Function LASTNONBLANK(<column>,<expression>)
the current context, where the expression is not blank.
Returns a table that contains a column of all dates from
Time Intelligence Functions NEXTDAY Function NEXTDAY(<dates>) the next day, based on the first date specified in
the dates column in the current context.
Time Intelligence Functions NEXTMONTH Function
Time Intelligence Functions NEXTQUARTER Function
Time Intelligence Functions NEXTYEAR Function

11/17/2023 09:32:22 Page 1 of 9 705498572.xlsx


DAX Functions

DAX Functions

Category Function Syntax Description


OPENINGBALANCEMONTH(<expression>,<dat Evaluates the expression at the first date of the month in
Time Intelligence Functions OPENINGBALANCEMONTH Function
es>[,<filter>]) the current context.

Time Intelligence Functions OPENINGBALANCEQUARTER Function

Time Intelligence Functions OPENINGBALANCEYEAR Function

Returns a table that contains a column of dates that


represents a period parallel to the dates in the
PARALLELPERIOD(<dates>,<number_of_int
Time Intelligence Functions PARALLELPERIOD Function ervals>,<interval>) specified dates column, in the current context, with the
dates shifted a number of intervals either forward in time
or back in time.
Returns a table that contains a column of all dates
Time Intelligence Functions PREVIOUSDAY Function PREVIOUSDAY(<dates>) representing the day that is previous to the first date in
the dates column, in the current context.
Time Intelligence Functions PREVIOUSMONTH Function
Time Intelligence Functions PREVIOUSQUARTER Function
Time Intelligence Functions PREVIOUSYEAR Function
Returns a table that contains a column of dates shifted
Time Intelligence Functions SAMEPERIODLASTYEAR FunctionSAMEPERIODLASTYEAR(<dates>) one year back in time from the dates in the
specified dates column, in the current context.
Returns the first date of the month in the current context
Time Intelligence Functions STARTOFMONTH Function STARTOFMONTH(<dates>)
for the specified column of dates.
Time Intelligence Functions STARTOFQUARTER Function
Time Intelligence Functions STARTOFYEAR Function
TOTALMTD(<expression>,<dates>[,<filte Evaluates the value of the expression for the month to
Time Intelligence Functions TOTALMTD Function r>]) date, in the current context.
Time Intelligence Functions TOTALQTD Function
Time Intelligence Functions TOTALYTD Function

ADDMISSINGITEMS(<showAllColumn>[,
<showAllColumn>]…, <table>,
<groupingColumn>[, <groupingColumn>]…
[, filterTable]…) Adds combinations of items from multiple columns to a
ADDMISSINGITEMS(<showAllColumn>[, table if they do not already exist. The determination of
Filter Functions ADDMISSINGITEMS Function <showAllColumn>]…, <table>, which item combinations to add is based on referencing
[ROLLUPISSUBTOTAL(]<groupingColumn>[,
<isSubtotal_columnName>][, source columns which contain all the possible values for
<groupingColumn>][, the columns.
<isSubtotal_columnName>]…[)], [,
filterTable]…)

Returns all the rows in a table, or all the values in a


ALL( {<table> | <column>[, <column>[, column, ignoring any filters that might have been applied.
Filter Functions ALL Function <column>[,…]]]} ) This function is useful for clearing filters and creating
calculations on all the rows in a table.
ALLEXCEPT(<table>,<column>[,<column>[ Removes all context filters in the table except filters that
Filter Functions ALLEXCEPT Function ,…]]) have been applied to the specified columns.
From the parent table of a relationship, returns all rows
but the blank row, or all distinct values of a column but
Filter Functions ALLNOBLANKROW Function ALLNOBLANKROW(<table>|<column>)
the blank row, and disregards any context filters that
might exist.
Removes context filters from columns and rows in the
ALLSELECTED([<tableName> |
Filter Functions ALLSELECTED Function <columnName>]) current query, while retaining all other context filters or
explicit filters.
CALCULATE(<expression>,<filter1>,<fil Evaluates an expression in a context that is modified by
Filter Functions CALCULATE Function ter2>…) the specified filters.
CALCULATETABLE(<expression>,<filter1> Evaluates a table expression in a context modified by the
Filter Functions CALCULATETABLE Function ,<filter2>,…) given filters.
Specifies the cross-filtering direction to be used in a
CROSSFILTER(<columnName1>,
Filter Functions CROSSFILTER Function <columnName2>, <direction>) calculation for a relationship that exists between two
columns.
Returns a one-column table that contains the distinct
values from the specified column. In other words,
Filter Functions DISTINCT Function DISTINCT(<column>)
duplicate values are removed and only unique values are
returned.
Returns the current value of the specified column in an
Filter Functions EARLIER Function EARLIER(<column>, <number>)
outer evaluation pass of the mentioned column.
Returns the current value of the specified column in an
Filter Functions EARLIEST Function EARLIEST(<column>)
outer evaluation pass of the specified column.
Returns a table that represents a subset of another table
Filter Functions FILTER Function FILTER(<table>,<filter>)
or expression.
Returns the values that are directly applied as filters
Filter Functions FILTERS Function FILTERS(<columnName>)
to columnName.
Returns TRUE when the number of directly filtered values
Filter Functions HASONEFILTER Function HASONEFILTER(<columnName>)
on columnName is one; otherwise returns FALSE.
Returns TRUE when the context for columnName has
Filter Functions HASONEVALUE Function HASONEVALUE(<columnName>) been filtered down to one distinct value only. Otherwise
is FALSE.
Returns TRUE when columnName or another column in
Filter Functions ISCROSSFILTERED Function ISCROSSFILTERED(<columnName>)
the same or related table is being filtered.

11/17/2023 09:32:23 Page 2 of 9 705498572.xlsx


DAX Functions

DAX Functions

Category Function Syntax Description


Returns TRUE when columnName is being filtered directly.
If there is no filter on the column or if the filtering
Filter Functions ISFILTERED Function ISFILTERED(<columnName>) happens because a different column in the same table or
in a related table is being filtered then the function
returns FALSE.
Modifies how filters are applied while evaluating a
Filter Functions KEEPFILTERS Function KEEPFILTERS(<expression>)
CALCULATE or CALCULATETABLE function.
Filter Functions RELATED Function RELATED(<column>) Returns a related value from another table.
Evaluates a table expression in a context modified by the
Filter Functions RELATEDTABLE Function RELATEDTABLE(<tableName>)
given filters.
SUBSTITUTEWITHINDEX(<table>,
<indexColumnName>,
Returns a table which represents a left semijoin of the two
Filter Functions SUBSTITUTEWITHINDEX Function
<indexColumnsTable>,
[<orderBy_expression>, [<order>][, tables supplied as arguments.
<orderBy_expression>, [<order>]]…])
Specifies the relationship to be used in a specific
USERELATIONSHIP(<columnName1>,<column
Filter Functions USERELATIONSHIP Function Name2>) calculation as the one that exists between columnName1
and columnName2.
Returns a one-column table that contains the distinct
values from the specified table or column. In other words,
Filter Functions VALUES Function VALUES(<TableNameOrColumnName>)
duplicate values are removed and only unique values are
returned.
Returns true if values for all referred columns exist, or are
CONTAINS(<table>, <columnName>,
Information Functions CONTAINS Function <value>[, <columnName>, <value>]…) contained, in those columns; otherwise, the function
returns false.
Returns the content of the CustomData property in the
Information Functions CUSTOMDATA Function CUSTOMDATA()
connection string.
Checks whether a value is blank, and returns TRUE or
Information Functions ISBLANK Function ISBLANK(<value>)
FALSE.
Checks whether a value is an error, and returns TRUE or
Information Functions ISERROR Function ISERROR(<value>)
FALSE.
Returns TRUE if number is even, or FALSE if number is
Information Functions ISEVEN Function ISEVEN(number)
odd.
Checks whether a value is a logical value, (TRUE or FALSE),
Information Functions ISLOGICAL Function ISLOGICAL(<value>)
and returns TRUE or FALSE.
Checks if a value is not text (blank cells are not text), and
Information Functions ISNONTEXT Function ISNONTEXT(<value>)
returns TRUE or FALSE.
Checks whether a value is a number, and returns TRUE or
Information Functions ISNUMBER Function ISNUMBER(<value>)
FALSE.
ISONORAFTER(<scalar_expression>,
<scalar_expression>sort_order] A boolean function that emulates the behavior of a ‘Start
Information Functions ISONORAFTER Function [,scalar_expression>, At’ clause and returns true for a row that meets all of the
<scalar_expression>, [sort_order][,
…]) condition parameters. New for 2016.

Information Functions ISTEXT Function ISTEXT(<value>) Checks if a value is text, and returns TRUE or FALSE.

LOOKUPVALUE( <result_columnName>, Returns the value in result_columnName for the row that
<search_columnName>, <search_value>[,
Information Functions LOOKUPVALUE Function <search_columnName>, <search_value>] meets all criteria specified
…) by search_columnName and search_value.

Returns the domain name and username from the


Information Functions USERNAME Function USERNAME()
credentials given to the system at connection time
Checks whether both arguments are TRUE, and returns
Logical Functions AND Function AND(<logical1>,<logical2>)
TRUE if both arguments are TRUE. Otherwise returns false.
Logical Functions FALSE Function FALSE() Returns the logical value FALSE.
Checks if a condition provided as the first argument is
IF(logical_test>,<value_if_true>,
Logical Functions IF Function value_if_false) met. Returns one value if the condition is TRUE, and
returns another value if the condition is FALSE.
Evaluates an expression and returns a specified value if
Logical Functions IFERROR Function IFERROR(value, value_if_error) the expression returns an error; otherwise returns the
value of the expression itself.
Logical Functions NOT Function NOT(<logical>) Changes FALSE to TRUE, or TRUE to FALSE.
Checks whether one of the arguments is TRUE to return
Logical Functions OR Function OR(<logical1>,<logical2>) TRUE. The function returns FALSE if both arguments are
FALSE.
SWITCH(<expression>, <value>,
Evaluates an expression against a list of values and returns
Logical Functions SWITCH Function <result>[, <value>, <result>]…[,
<else>]) one of multiple possible result expressions.
Logical Functions TRUE Function TRUE() Returns the logical value TRUE.
Math and Trig Functions ABS Function ABS(<number>) Returns the absolute value of a number.
Returns the arccosine, or inverse cosine, of a number. The
arccosine is the angle whose cosine is number. The
Math and Trig Functions ACOS Function ACOS(number)
returned angle is given in radians in the range 0 (zero) to
pi.
Math and Trig Functions ACOSH Function
Math and Trig Functions ASIN Function
Math and Trig Functions ASINH Function
Math and Trig Functions ATAN Function
Math and Trig Functions ATANH Function
Rounds a number up, to the nearest integer or to the
Math and Trig Functions CEILING Function CEILING(<number>, <significance>)
nearest multiple of significance.
Returns the number of combinations for a given number
Math and Trig Functions COMBIN Function COMBIN(number, number_chosen) of items. Use COMBIN to determine the total possible
number of groups for a given number of items.

11/17/2023 09:32:23 Page 3 of 9 705498572.xlsx


DAX Functions

DAX Functions

Category Function Syntax Description


Returns the number of combinations (with repetitions) for
Math and Trig Functions COMBINA Function COMBINA(number, number_chosen)
a given number of items.
Math and Trig Functions COS Function
Math and Trig Functions COSH Function
Evaluates the argument and returns the result as currency
Math and Trig Functions CURRENCY Function CURRENCY(<value>)
data type.
Math and Trig Functions DEGREES Function DEGREES(angle) Converts radians into degrees.
DIVIDE(<numerator>, <denominator> Performs division and returns alternate result or BLANK()
Math and Trig Functions DIVIDE Function [,<alternateresult>]) on division by 0.
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
Math and Trig Functions EVEN Function EVEN(number)
or two items. The crate is full when the number of items,
rounded up to the nearest two, matches the crate's
capacity.
Returns e raised to the power of a given number. The
Math and Trig Functions EXP Function EXP(<number>) constant e equals 2.71828182845904, the base of the 3
natural logarithm.
Returns the factorial of a number, equal to the series
Math and Trig Functions FACT Function FACT(<number>)
1*2*3*...* , ending in the given number.
Rounds a number down, toward zero, to the nearest
Math and Trig Functions FLOOR Function FLOOR(<number>, <significance>)
multiple of significance.
Returns the greatest common divisor of two or more
integers. The greatest common divisor is the largest
Math and Trig Functions GCD Function GCD(number1, [number2], ...)
integer that divides both number1 and number2 without
a remainder.
Math and Trig Functions INT Function INT(<number>) Rounds a number down to the nearest integer.
ISO.CEILING(<number>[, Rounds a number up, to the nearest integer or to the
Math and Trig Functions ISO.CEILING Function <significance>]) nearest multiple of significance.
Returns the least common multiple of integers. The least
common multiple is the smallest positive integer that is a
Math and Trig Functions LCM Function LCM(number1, [number2], ...) multiple of all integer arguments number1, number2, and
so on. Use LCM to add fractions with different
denominators.
Returns the natural logarithm of a number. Natural
Math and Trig Functions LN Function LN(<number>) logarithms are based on the constant e 1
(2.71828182845904).
Returns the logarithm of a number to the base you
Math and Trig Functions LOG Function LOG(<number>,<base>)
specify.
Math and Trig Functions LOG10 Function LOG10(<number>) Returns the base-10 logarithm of a number.
Returns the remainder after a number is divided by a
Math and Trig Functions MOD Function MOD(<number>, <divisor>)
divisor. The result always has the same sign as the divisor.
Math and Trig Functions MROUND Function MROUND(<number>, <multiple>) Returns a number rounded to the desired multiple.
Math and Trig Functions ODD Function ODD(number) Returns number rounded up to the nearest odd integer.
Returns the value of Pi, 3.14159265358979, accurate to 15
Math and Trig Functions PI Function PI()
digits.
Math and Trig Functions POWER Function POWER(<number>, <power>) Returns the result of a number raised to a power. 27
Math and Trig Functions PRODUCT Function PRODUCT(<column>) Returns the product of the numbers in a column.
Returns the product of an expression evaluated for each
Math and Trig Functions PRODUCTX Function PRODUCTX(<table>, <expression>)
row in a table.
Performs division and returns only the integer portion of
Math and Trig Functions QUOTIENT Function QUOTIENT(<numerator>, <denominator>) the division result. Use this function when you want to
discard the remainder of division.
Math and Trig Functions RADIANS Function RADIANS(angle) Converts degrees to radians.
Returns a random number greater than or equal to 0 and
less than 1, evenly distributed. The number that is
Math and Trig Functions RAND Function RAND()
returned changes each time the cell containing this
function is recalculated.
Returns a random number in the range between two
Math and Trig Functions RANDBETWEEN Function RANDBETWEEN(<bottom>,<top>)
numbers you specify.
Math and Trig Functions ROUND Function ROUND(<number>, <num_digits>) Rounds a number to the specified number of digits.
Math and Trig Functions ROUNDDOWN Function ROUNDDOWN(<number>, <num_digits>) Rounds a number down, toward zero.
Math and Trig Functions ROUNDUP Function ROUNDUP(<number>, <num_digits>) Rounds a number up, away from 0 (zero).
Determines the sign of a number, the result of a
calculation, or a value in a column. The function returns 1
Math and Trig Functions SIGN Function SIGN(<number>)
if the number is positive, 0 (zero) if the number is zero, or
-1 if the number is negative.
Math and Trig Functions SQRT Function SQRT(<number>) Returns the square root of a number. 3
Math and Trig Functions SUM Function SUM(<column>) Adds all the numbers in a column.
Returns the sum of an expression evaluated for each row
Math and Trig Functions SUMX Function SUMX(<table>, <expression>)
in a table.
Truncates a number to an integer by removing the
Math and Trig Functions TRUNC Function TRUNC(<number>,<num_digits>)
decimal, or fractional, part of the number.
EXCEPT(<table_expression1>, Returns the rows of one table which do not appear in
Other functions EXCEPT Function <table_expression2> another table.
The GROUPBY function is similar to the SUMMARIZE
function. However, GROUPBY does not do an implicit
GROUPBY (<table>, CALCULATE for any extension columns that it adds.
Other functions GROUPBY Function [<groupBy_columnName1>], [<name>, GROUPBY permits a new function, CURRENTGROUP(), to
<expression>]… ) be used inside aggregation functions in the extension
columns that it adds. GROUPBY attempts to reuse the
data that has been grouped making it highly performant.

11/17/2023 09:32:23 Page 4 of 9 705498572.xlsx


DAX Functions

DAX Functions

Category Function Syntax Description


INTERSECT(<table_expression1>, Returns the row intersection of two tables, retaining
Other functions INTERSECT Function <table_expression2>) duplicates.
Other functions ISEMPTY Function ISEMPTY(<table_expression>) Checks if a table is empty.
Performs an inner join of a table with another table. The
tables are joined on common columns (by name) in the
Other functions NATURALINNERJOIN Function NATURALINNERJOIN(<leftJoinTable>,
<rightJoinTable>) two tables. If the two tables have no common column
names, an error is returned.
Performs a left outer join of a table with another table.
NATURALLEFTOUTERJOIN(<leftJoinTable>, The tables are joined on common columns (by name) in
Other functions NATURALLEFTOUTERJOIN Function
<rightJoinTable>) the two tables. If the two tables have no common column
names, an error is returned.
SUMMARIZECOLUMNS( <groupBy_columnName
Other functions SUMMARIZECOLUMNS Function> [, < groupBy_columnName >]…,
[<filterTable>]…[, <name>, Returns a summary table over a set of groups.
<expression>]…)
UNION(<table_expression1>,
Other functions UNION Function <table_expression2> Creates a union (join) table from a pair of tables.
[,<table_expression>]…)
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
Other functions VAR VAR <name> = <expression>
calculated for a variable expression, those values do not
change, even if the variable is referenced in another
expression.
Returns a delimited text string with the identifiers of all
PATH(<ID_columnName>,
Parent and Child Functions PATH Function <parent_columnName>) the parents of the current identifier, starting with the
oldest and continuing until current.
Returns TRUE if the specified item exists within the
Parent and Child Functions PATHCONTAINS Function PATHCONTAINS(<path>, <item>)
specified path.
Returns the item at the specified position from a string
PATHITEM(<path>, <position>[,
Parent and Child Functions PATHITEM Function <type>]) resulting from evaluation of a PATH function. Positions
are counted from left to right.
Returns the item at the specified position from a string
PATHITEMREVERSE(<path>, <position>[,
Parent and Child Functions PATHITEMREVERSE Function <type>]) resulting from evaluation of a PATH function. Positions
are counted backwards from right to left.
Returns the number of parents to the specified item in a
Parent and Child Functions PATHLENGTH Function PATHLENGTH(<path>)
given PATH result, including self.
ADDCOLUMNS(<table>, <name>,
Statistical Functions ADDCOLUMNS Function <expression>[, <name>, <expression>] Adds calculated columns to the given table or table
…) expression.
Returns the average (arithmetic mean) of all the numbers
Statistical Functions AVERAGE Function AVERAGE(<column>)
in a column.
Returns the average (arithmetic mean) of the values in a
Statistical Functions AVERAGEA Function AVERAGEA(<column>)
column. Handles text and non-numeric values.
Calculates the average (arithmetic mean) of a set of
Statistical Functions AVERAGEX Function AVERAGEX(<table>,<expression>)
expressions evaluated over a table.
Returns the beta distribution. The beta distribution is
BETA.DIST(x,alpha,beta,cumulative, commonly used to study variation in the percentage of
Statistical Functions BETA.DIST Function [A],[B]) something across samples, such as the fraction of the day
people spend watching television.
BETA.INV(probability,alpha,beta,[A], Returns the inverse of the beta cumulative probability
Statistical Functions BETA.INV Function [B]) density function (BETA.DIST).
Returns the inverse of the left-tailed probability of the chi-
Statistical Functions CHISQ.INV Function CHISQ.INV(probability,deg_freedom)
squared distribution.
CHISQ.INV.RT(probability,deg_freedom) Returns the inverse of the right-tailed probability of the
Statistical Functions CHISQ.INV.RT Function
chi-squared distribution.
The confidence interval is a range of values. Your sample
Statistical Functions CONFIDENCE.NORM Function CONFIDENCE.NORM(alpha,standard_dev,si
ze) mean, x, is at the center of this range and the range is x ±
CONFIDENCE.NORM.
CONFIDENCE.T(alpha,standard_dev,size) Returns the confidence interval for a population mean,
Statistical Functions CONFIDENCE.T Function
using a Student's t distribution.
The COUNT function counts the number of cells in a
Statistical Functions COUNT Function COUNT(<column>)
column that contain numbers.
The COUNTA function counts the number of cells in a
column that are not empty. It counts not just rows that
Statistical Functions COUNTA Function COUNTA(<column>)
contain numeric values, but also rows that contain
nonblank values, including text, dates, and logical values.
The COUNTAX function counts nonblank results when
evaluating the result of an expression over a table. That is,
Statistical Functions COUNTAX Function COUNTAX(<table>,<expression>) it works just like the COUNTA function, but is used to
iterate through the rows in a table and count rows where
the specified expressions results in a nonblank result.
Statistical Functions COUNTBLANK Function COUNTBLANK(<column>) Counts the number of blank cells in a column.
The COUNTROWS function counts the number of rows in
Statistical Functions COUNTROWS Function COUNTROWS(<table>)
the specified table, or in a table defined by an expression.
Counts the number of rows that contain a number or an
Statistical Functions COUNTX Function COUNTX(<table>,<expression>) expression that evaluates to a number, when evaluating
an expression over a table.
Returns a table that contains the Cartesian product of all
CROSSJOIN(<table>, <table>[, <table>]
Statistical Functions CROSSJOIN Function …) rows from all tables in the arguments. The columns in the
new table are all the columns in all the argument tables.

11/17/2023 09:32:23 Page 5 of 9 705498572.xlsx


DAX Functions

DAX Functions

Category Function Syntax Description


DATATABLE (ColumnName1, DataType1,
ColumnName2, DataType2..., {{Value1, Provides a mechanism for declaring an inline set of data
Statistical Functions DATATABLE Function Value2...}, {ValueN, values.
ValueN+1...}...})
The DISTINCTCOUNT function counts the number of
Statistical Functions DISTINCTCOUNT Function DISTINCTCOUNT(<column>)
different cells in a column of numbers.
Returns the exponential distribution. Use EXPON.DIST to
model the time between events, such as how long an
Statistical Functions EXPON.DIST Function EXPON.DIST(x,lambda,cumulative) 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.
Returns a table with the Cartesian product between each
row in table1 and the table that results from
Statistical Functions GENERATE Function GENERATE(<table1>, <table2>)
evaluating table2 in the context of the current row
from table1.
Returns a table with the Cartesian product between each
row in table1 and the table that results from
Statistical Functions GENERATEALL Function GENERATEALL(<table1>, <table2>)
evaluating table2 in the context of the current row
from table1.
Statistical Functions GEOMEAN Function GEOMEAN(<column>) Returns the geometric mean of the numbers in a column.
Returns the geometric mean of an expression evaluated
Statistical Functions GEOMEANX Function GEOMEANX(<table>, <expression>)
for each row in a table.
Statistical Functions MAX Function MAX(<column>) Returns the largest numeric value in a column.
Returns the largest value in a column. Logical values and
Statistical Functions MAXA Function MAXA(<column>)
blanks are counted.
Evaluates an expression for each row of a table and
Statistical Functions MAXX Function MAXX(<table>,<expression>)
returns the largest numeric value.
Statistical Functions MEDIAN Function MEDIAN(<column>) Returns the median of numbers in a column.
Returns the median number of an expression evaluated
Statistical Functions MEDIANX Function MEDIANX(<table>, <expression>)
for each row in a table.
Returns the smallest numeric value in a column. Ignores
Statistical Functions MIN Function MIN(<column>)
logical values and text.
Returns the smallest value in a column, including any
Statistical Functions MINA Function MINA(<column>)
logical values and numbers represented as text.
Returns the smallest numeric value that results from
Statistical Functions MINX Function MINX(<table>, < expression>)
evaluating an expression for each row of a table.
Returns the k-th percentile of values in a range, where k is
Statistical Functions PERCENTILE.EXC Function PERCENTILE.EXC(<column>, <k>)
in the range 0..1, exclusive.
Returns the k-th percentile of values in a range, where k is
Statistical Functions PERCENTILE.INC Function PERCENTILE.INC(<column>, <k>)
in the range 0..1, inclusive.
PERCENTILEX.EXC(<table>, Returns the percentile number of an expression evaluated
Statistical Functions PERCENTILEX.EXC Function <expression>, k) for each row in a table.
PERCENTILEX.INC(<table>, Returns the percentile number of an expression evaluated
Statistical Functions PERCENTILEX.INC Function <expression>;, k) for each row in a table.
Returns the Poisson distribution. A common application
of the Poisson distribution is predicting the number of
Statistical Functions POISSON.DIST Function POISSON.DIST(x,mean,cumulative)
events over a specific time, such as the number of cars
arriving at a toll plaza in 1 minute.
RANK.EQ(<value>, <columnName>[,
Statistical Functions RANK.EQ Function <order>]) Returns the ranking of a number in a list of numbers.

RANKX(<table>, <expression>[, Returns the ranking of a number in a list of numbers for


Statistical Functions RANKX Function <value>[, <order>[, <ties>]]]) each row in the table argument.
ROW(<name>, <expression>[[,<name>, Returns a table with a single row containing values that
Statistical Functions ROW Function <expression>]…]) result from the expressions given to each column.
SAMPLE(<n_value>, <table>,
Statistical Functions SAMPLE Function <orderBy_expression>, [<order>[, Returns a sample of N rows from the specified table.
<orderBy_expression>, [<order>]]…])
SELECTCOLUMNS(<table>, <name>,
Adds calculated columns to the given table or table
Statistical Functions SELECTCOLUMNS Function <scalar_expression> [, <name>,
<scalar_expression>]…) expression.
Statistical Functions SIN Function SIN(number) Returns the sine of the given angle.
Statistical Functions SINH Function SINH(number) Returns the hyperbolic sine of a number.
Statistical Functions STDEV.P Function STDEV.P(<ColumnName>) Returns the standard deviation of the entire population.
Statistical Functions STDEV.S Function STDEV.S(<ColumnName>) Returns the standard deviation of a sample population.
Statistical Functions STDEVX.P Function STDEVX.P(<table>, <expression>) Returns the standard deviation of the entire population.
Statistical Functions STDEVX.S Function STDEVX.S(<table>, <expression>) Returns the standard deviation of a sample population.
Statistical Functions SQRTPI Function SQRTPI(number) Returns the square root of (number * pi).
SUMMARIZE(<table>,
<groupBy_columnName>[, Returns a summary table for the requested totals over a
Statistical Functions SUMMARIZE Function <groupBy_columnName>]…[, <name>, set of groups.
<expression>]…)
Statistical Functions TAN Function TAN(number) Returns the tangent of the given angle.
Statistical Functions TANH Function TANH(number) Returns the hyperbolic tangent of a number.
TOPN(<n_value>, <table>,
Statistical Functions TOPN Function <orderBy_expression>, [<order>[, Returns the top N rows of the specified table.
<orderBy_expression>, [<order>]]…])
Statistical Functions VAR.P Function VAR.P(<columnName>) Returns the variance of the entire population.
Statistical Functions VAR.S Function VAR.S(<columnName>) Returns the variance of a sample population.
Statistical Functions VARX.P Function VARX.P(<table>, <expression>) Returns the variance of the entire population.
Statistical Functions VARX.S Function VARX.S(<table>, <expression>) Returns the variance of a sample population.
XIRR(<table>, <values>, <dates>, Returns the internal rate of return for a schedule of cash
Statistical Functions XIRR Function [guess]) flows that is not necessarily periodic.

11/17/2023 09:32:23 Page 6 of 9 705498572.xlsx


DAX Functions

DAX Functions

Category Function Syntax Description


XNPV(<table>, <values>, <dates>, Returns the present value for a schedule of cash flows that
Statistical Functions XNPV Function <rate>) is not necessarily periodic.
Text functions BLANK Function BLANK() Returns a blank.
Returns a numeric code for the first character in a text
Text functions CODE Function CODE(text) string. The returned code corresponds to the character set
used by your computer.
Text functions CONCATENATE Function CONCATENATE(<text1>, <text2>) Joins two text strings into one text string.
CONCATENATEX(<table>, <expression>, Concatenates the result of an expression evaluated for
Text functions CONCATENATEX Function [delimiter]) each row in a table.
Compares two text strings and returns TRUE if they are
exactly the same, FALSE otherwise. EXACT is case-sensitive
Text functions EXACT Function EXACT(<text1>,<text2>)
but ignores formatting differences. You can use EXACT to
test text being entered into a document.
FIND(<find_text>, <within_text>[, Returns the starting position of one text string within
Text functions FIND Function [<start_num>][, <NotFoundValue>]]) another text string. FIND is case-sensitive.
Rounds a number to the specified number of decimals
FIXED(<number>, <decimals>,
Text functions FIXED Function <no_commas>) and returns the result as text. You can specify that the
result be returned with or without commas.
Text functions FORMAT Function FORMAT(<value>, <format_string>) Converts a value to text according to the specified format.
Text functions Pre-Defined Numeric Formats for the FORMAT Function

Text functions Custom Numeric Formats for the FORMAT Function

Text functions Pre-defined Date and Time formats for the FORMAT Function

Text functions Custom Date and Time formats for the FORMAT Function

Returns the specified number of characters from the start


Text functions LEFT Function LEFT(<text>, <num_chars>)
of a text string.
Text functions LEN Function LEN(<text>) Returns the number of characters in a text string.
Text functions LOWER Function LOWER(<text>) Converts all letters in a text string to lowercase.
MID(<text>, <start_num>, <num_chars>) Returns a string of characters from the middle of a text
Text functions MID Function
string, given a starting position and length.
REPLACE replaces part of a text string, based on the
REPLACE(<old_text>, <start_num>,
Text functions REPLACE Function <num_chars>, <new_text>) number of characters you specify, with a different text
string.
Repeats text a given number of times. Use REPT to fill a
Text functions REPT Function REPT(<text>, <num_times>)
cell with a number of instances of a text string.
RIGHT returns the last character or characters in a text
Text functions RIGHT Function RIGHT(<text>, <num_chars>)
string, based on the number of characters you specify.
Returns the number of the character at which a specific
SEARCH(<find_text>, <within_text>[,
Text functions SEARCH Function [<start_num>][, <NotFoundValue>]]) character or text string is first found, reading left to right.
Search is case-insensitive and accent sensitive.
SUBSTITUTE(<text>, <old_text>,
Text functions SUBSTITUTE Function <new_text>, <instance_num>) Replaces existing text with new text in a text string.
Removes all spaces from text except for single spaces
Text functions TRIM Function TRIM(<text>)
between words.
Text functions UPPER Function UPPER (<text>) Converts a text string to all uppercase letters
Converts a text string that represents a number to a
Text functions VALUE Function VALUE(<text>)
number.

11/17/2023 09:32:23 Page 7 of 9 705498572.xlsx


measure 'Reseller Sales'[Reseller Sales Amount]=sum('Reseller Sales'[Sales Amount])
measure 'Reseller Sales'[Reseller Grand Total]=calculate(sum('Reseller Sales'[Sales Amount]), ALL('Reseller Sales'))
measure 'Reseller Sales'[Reseller Visual Total]=calculate(sum('Reseller Sales'[Sales Amount]), ALLSELECTED())
measure 'Reseller Sales'[Reseller Visual Total for All of Calendar Year]=calculate(sum('Reseller Sales'[Sales Amount]), ALLSE
measure 'Reseller Sales'[Reseller Visual Total for All of Product Category Name]=calculate(sum('Reseller Sales'[Sales Amou

[Product [Calendar
[Reseller Sales Amount] [Reseller Grand Total]
Category Name] Year]

Accessories 2002 $626 $80,450,597


Bikes 2002 $73,779 $80,450,597
Clothing 2002 $12,132 $80,450,597
Components 2002 $4,958 $80,450,597
ount]), ALL('Reseller Sales'))
ount]), ALLSELECTED())
Reseller Sales'[Sales Amount]), ALLSELECTED('Date'[Calendar Year]))
ate(sum('Reseller Sales'[Sales Amount]), ALLSELECTED('Product Category'[Product Category Name]))
[Reseller Visual Total for
[Reseller Visual Total for
[Reseller Visual Total] All of Product Category
All of Calendar Year]
Name]
$877,007 $38,786 $91,495
$877,007 $689,288 $91,495
$877,007 $95,091 $91,495
$877,007 $53,842 $91,495

You might also like