0% found this document useful (0 votes)
52 views239 pages

MDA - Mastering DAX

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

MDA - Mastering DAX

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

Mastering Data Analytics

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Date and Time Functions

Function DATE Function

Syntax DATE(<year>, <month>, <day>)

Description Returns the specified date


in datetime format.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Date and Time Functions

Function DATEVALUE Function

Syntax DATEVALUE(date_text)

Description Converts a date in the form of text to


a date in datetime format.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Date and Time Functions

Function DAY Function

Syntax DAY(<date>) <<datetime or text>>

Description Returns the day of the month, a


number from 1 to 31.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Date and Time Functions

Function EDATE Function

Syntax EDATE(<start_date>, <months>)

Description Returns the date that is the indicated


number of months before or after the
start date. Use EDATE to calculate
maturity dates or due dates that fall
on the same day of the month as the
date of issue.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Date and Time Functions

Function EOMONTH Function

Syntax EOMONTH(<start_date>, <months>)

Description Returns the date in datetime format


of the last day of the month, before or
after a specified number of months.
Use EOMONTH to calculate maturity
dates or due dates that fall on the
last day of the month.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Date and Time Functions

Function HOUR Function

Syntax HOUR(<datetime>)

Description Returns the hour as a number from 0


(12:00 A.M.) to 23 (11:00 P.M.).

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Date and Time Functions

Function MINUTE Function

Syntax MINUTE(<datetime>)

Description Returns the minute as a number from


0 to 59, given a date and time value.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Date and Time Functions

Function MONTH Function

Syntax MONTH(<datetime>)

Description Returns the month as a number from 1


(January) to 12 (December).

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Date and Time Functions

Function NOW Function

Syntax NOW()

Description The NOW function is useful when you


need to display the current date and
time on a worksheet or calculate a
value based on the current date and
time, and have that value updated
each time you open the worksheet.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Date and Time Functions

Function SECOND Function

Syntax SECOND(<time>)

Description Returns the seconds of a time value,


as a number from 0 to 59.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Date and Time Functions

Function TIME Function

Syntax TIME(hour, minute, second)

Description Converts hours, minutes, and seconds


given as numbers to a time
in datetime format.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Date and Time Functions

Function TIMEVALUE Function

Syntax TIMEVALUE(time_text)

Description Converts a time in text format to a


time in datetime format.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Date and Time Functions

Function TODAY Function

Syntax TODAY()

Description Returns the current date.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Date and Time Functions

Function WEEKDAY Function

Syntax WEEKDAY(<date>, <return_type>)

Description Returns a number from 1 to 7


identifying the day of the week of a
date. By default the day ranges from
1 (Sunday) to 7 (Saturday).

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Date and Time Functions

Function WEEKNUM Function

Syntax WEEKNUM(<date>, <return_type>)

Description Returns the week number for the


given date and year according to
the return_type value. The week
number indicates where the week
falls numerically within a year.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Date and Time Functions

Function YEAR Function

Syntax YEAR(<date>)

Description Returns the year of a date as a four


digit integer in the range 1900-9999.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Date and Time Functions

Function YEARFRAC Function

Syntax YEARFRAC(<start_date>, <end_date>,


<basis>)

Description Calculates the fraction of the year


represented by the number of whole
days between two dates. Use the
YEARFRAC worksheet function to
identify the proportion of a whole
year's benefits or obligations to
assign to a specific term.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Time Intelligence Functions

Function CLOSINGBALANCEMONTH Function

Syntax CLOSINGBALANCEMONTH(<expressio
n>,<dates>[,<filter>])

Description Evaluates the expression at the last


date of the month in the current
context.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Time Intelligence Functions

Function CLOSINGBALANCEQUARTER Function

Syntax

Description

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Time Intelligence Functions

Function CLOSINGBALANCEYEAR Function

Syntax

Description

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Time Intelligence Functions

Function DATEADD Function

Syntax DATEADD(<dates>,
<number_of_intervals>,<interval>)

Description Returns a table that contains a


column of dates, shifted either
forward or backward in time by the
specified number of intervals from the
dates in the current context.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Time Intelligence Functions

Function DATESBETWEEN Function

Syntax DATESBETWEEN(<dates>,
<start_date>,<end_date>)

Description Returns a table that contains a


column of dates that begins with
the start_date and continues until
the end_date.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Time Intelligence Functions

Function DATESINPERIOD Function

Syntax DATESINPERIOD(<dates>,
<start_date>,<number_of_intervals>,
<interval>)

Description Returns a table that contains a


column of dates that begins with
the start_date and continues for the
specified number_of_intervals.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Time Intelligence Functions

Function DATESMTD Function

Syntax DATESMTD(<dates>)

Description Returns a table that contains a


column of the dates for the month to
date, in the current context.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Time Intelligence Functions

Function DATESQTD Function

Syntax

Description

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Time Intelligence Functions

Function DATESYTD Function

Syntax

Description

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Time Intelligence Functions

Function ENDOFMONTH Function

Syntax ENDOFMONTH(<dates>)

Description Returns the last date of the month in


the current context for the specified
column of dates.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Time Intelligence Functions

Function ENDOFQUARTER Function

Syntax

Description

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Time Intelligence Functions

Function ENDOFYEAR Function

Syntax

Description

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Time Intelligence Functions

Function FIRSTDATE Function

Syntax FIRSTDATE(<dates>)

Description Returns the first date in the current


context for the specified column of
dates.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Time Intelligence Functions

Function FIRSTNONBLANK Function

Syntax FIRSTNONBLANK(<column>,
<expression>)

Description Returns the first value in the


column, column, filtered by the
current context, where the expression
is not blank.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Time Intelligence Functions

Function LASTDATE Function

Syntax LASTDATE(<dates>)

Description Returns the last date in the current


context for the specified column of
dates.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Time Intelligence Functions

Function LASTNONBLANK Function

Syntax LASTNONBLANK(<column>,
<expression>)

Description Returns the last value in the


column, column, filtered by the
current context, where the expression
is not blank.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Time Intelligence Functions

Function NEXTDAY Function

Syntax NEXTDAY(<dates>)

Description Returns a table that contains a


column of all dates from the next day,
based on the first date specified in
the dates column in the current
context.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Time Intelligence Functions

Function NEXTMONTH Function

Syntax

Description

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Time Intelligence Functions

Function NEXTQUARTER Function

Syntax

Description

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Time Intelligence Functions

Function NEXTYEAR Function

Syntax

Description

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Time Intelligence Functions

Function OPENINGBALANCEMONTH Function

Syntax OPENINGBALANCEMONTH(<expressio
n>,<dates>[,<filter>])

Description Evaluates the expression at the first


date of the month in the current
context.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Time Intelligence Functions

Function OPENINGBALANCEQUARTER Function

Syntax

Description

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Time Intelligence Functions

Function OPENINGBALANCEYEAR Function

Syntax

Description

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Time Intelligence Functions

Function PARALLELPERIOD Function

Syntax PARALLELPERIOD(<dates>,
<number_of_intervals>,<interval>)

Description Returns a table that contains a


column of dates that represents a
period parallel to the dates in the
specified dates column, in the current
context, with the dates shifted a
number of intervals either forward in
time or back in time.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Time Intelligence Functions

Function PREVIOUSDAY Function

Syntax PREVIOUSDAY(<dates>)

Description Returns a table that contains a


column of all dates representing the
day that is previous to the first date
in the dates column, in the current
context.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Time Intelligence Functions

Function PREVIOUSMONTH Function

Syntax

Description

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Time Intelligence Functions

Function PREVIOUSQUARTER Function

Syntax

Description

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Time Intelligence Functions

Function PREVIOUSYEAR Function

Syntax

Description

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Time Intelligence Functions

Function SAMEPERIODLASTYEAR Function

Syntax SAMEPERIODLASTYEAR(<dates>)

Description Returns a table that contains a


column of dates shifted one year
back in time from the dates in the
specified dates column, in the current
context.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Time Intelligence Functions

Function STARTOFMONTH Function

Syntax STARTOFMONTH(<dates>)

Description Returns the first date of the month in


the current context for the specified
column of dates.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Time Intelligence Functions

Function STARTOFQUARTER Function

Syntax

Description

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Time Intelligence Functions

Function STARTOFYEAR Function

Syntax

Description

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Time Intelligence Functions

Function TOTALMTD Function

Syntax TOTALMTD(<expression>,<dates>[,
<filter>])

Description Evaluates the value of


the expression for the month to date,
in the current context.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Time Intelligence Functions

Function TOTALQTD Function

Syntax

Description

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Time Intelligence Functions

Function TOTALYTD Function

Syntax

Description

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Filter Functions

Function ADDMISSINGITEMS Function

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

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Filter Functions

Function ALL Function

Syntax ALL( {<table> | <column>[, <column>[,


<column>[,…]]]} )

Description Returns all the rows in a table, or all


the values in a column, ignoring any
filters that might have been applied.
This function is useful for clearing
filters and creating calculations on all
the rows in a table.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Filter Functions

Function ALLEXCEPT Function

Syntax ALLEXCEPT(<table>,<column>[,
<column>[,…]])

Description Removes all context filters in the


table except filters that have been
applied to the specified columns.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Filter Functions

Function ALLNOBLANKROW Function

Syntax ALLNOBLANKROW(<table>|<column>)

Description From the parent table of a


relationship, returns all rows but the
blank row, or all distinct values of a
column but the blank row, and
disregards any context filters that
might exist.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Filter Functions

Function ALLSELECTED Function

Syntax ALLSELECTED([<tableName> |
<columnName>])

Description Removes context filters from columns


and rows in the current query, while
retaining all other context filters or
explicit filters.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Filter Functions

Function CALCULATE Function

Syntax CALCULATE(<expression>,<filter1>,
<filter2>…)

Description Evaluates an expression in a context


that is modified by the specified
filters.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Filter Functions

Function CALCULATETABLE Function

Syntax CALCULATETABLE(<expression>,
<filter1>,<filter2>,…)

Description Evaluates a table expression in a


context modified by the given filters.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Filter Functions

Function CROSSFILTER Function

Syntax CROSSFILTER(<columnName1>,
<columnName2>, <direction>)

Description Specifies the cross-filtering direction


to be used in a calculation for a
relationship that exists between two
columns.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Filter Functions

Function DISTINCT Function

Syntax DISTINCT(<column>)

Description Returns a one-column table that


contains the distinct values from the
specified column. In other words,
duplicate values are removed and
only unique values are returned.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Filter Functions

Function EARLIER Function

Syntax EARLIER(<column>, <number>)

Description Returns the current value of the


specified column in an outer
evaluation pass of the mentioned
column.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Filter Functions

Function EARLIEST Function

Syntax EARLIEST(<column>)

Description Returns the current value of the


specified column in an outer
evaluation pass of the specified
column.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Filter Functions

Function FILTER Function

Syntax FILTER(<table>,<filter>)

Description Returns a table that represents a


subset of another table or expression.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Filter Functions

Function FILTERS Function

Syntax FILTERS(<columnName>)

Description Returns the values that are directly


applied as filters to columnName.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Filter Functions

Function HASONEFILTER Function

Syntax HASONEFILTER(<columnName>)

Description Returns TRUE when the number of


directly filtered values
on columnName is one; otherwise
returns FALSE.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Filter Functions

Function HASONEVALUE Function

Syntax HASONEVALUE(<columnName>)

Description Returns TRUE when the context


for columnName has been filtered
down to one distinct value only.
Otherwise is FALSE.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Filter Functions

Function ISCROSSFILTERED Function

Syntax ISCROSSFILTERED(<columnName>)

Description Returns TRUE when columnName or


another column in the same or
related table is being filtered.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Filter Functions

Function ISFILTERED Function

Syntax ISFILTERED(<columnName>)

Description Returns TRUE when columnName is


being filtered directly. If there is no
filter on the column or if the filtering
happens because a different column
in the same table or in a related table
is being filtered then the function
returns FALSE.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Filter Functions

Function KEEPFILTERS Function

Syntax KEEPFILTERS(<expression>)

Description Modifies how filters are applied while


evaluating a CALCULATE or
CALCULATETABLE function.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Filter Functions

Function RELATED Function

Syntax RELATED(<column>)

Description Returns a related value from another


table.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Filter Functions

Function RELATEDTABLE Function

Syntax RELATEDTABLE(<tableName>)

Description Evaluates a table expression in a


context modified by the given filters.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Filter Functions

Function SUBSTITUTEWITHINDEX Function

Syntax SUBSTITUTEWITHINDEX(<table>,
<indexColumnName>,
<indexColumnsTable>,
[<orderBy_expression>, [<order>][,
<orderBy_expression>, [<order>]]…])

Description Returns a table which represents a


left semijoin of the two tables
supplied as arguments.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Filter Functions

Function USERELATIONSHIP Function

Syntax USERELATIONSHIP(<columnName1>,
<columnName2>)

Description Specifies the relationship to be used


in a specific calculation as the one
that exists between columnName1
and columnName2.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Filter Functions

Function VALUES Function

Syntax VALUES(<TableNameOrColumnName>
)

Description Returns a one-column table that


contains the distinct values from the
specified table or column. In other
words, duplicate values are removed
and only unique values are returned.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Information Functions

Function CONTAINS Function

Syntax CONTAINS(<table>, <columnName>,


<value>[, <columnName>, <value>]…)

Description Returns true if values for all referred


columns exist, or are contained, in
those columns; otherwise, the
function returns false.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Information Functions

Function CUSTOMDATA Function

Syntax CUSTOMDATA()

Description Returns the content of


the CustomData property in the
connection string.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Information Functions

Function ISBLANK Function

Syntax ISBLANK(<value>)

Description Checks whether a value is blank, and


returns TRUE or FALSE.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Information Functions

Function ISERROR Function

Syntax ISERROR(<value>)

Description Checks whether a value is an error,


and returns TRUE or FALSE.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Information Functions

Function ISEVEN Function

Syntax ISEVEN(number)

Description Returns TRUE if number is even, or


FALSE if number is odd.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Information Functions

Function ISLOGICAL Function

Syntax ISLOGICAL(<value>)

Description Checks whether a value is a logical


value, (TRUE or FALSE), and returns
TRUE or FALSE.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Information Functions

Function ISNONTEXT Function

Syntax ISNONTEXT(<value>)

Description Checks if a value is not text (blank


cells are not text), and returns TRUE
or FALSE.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Information Functions

Function ISNUMBER Function

Syntax ISNUMBER(<value>)

Description Checks whether a value is a number,


and returns TRUE or FALSE.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Information Functions

Function ISONORAFTER Function

Syntax ISONORAFTER(<scalar_expression>,
<scalar_expression>sort_order]
[,scalar_expression>,
<scalar_expression>, [sort_order][,…])

Description A boolean function that emulates the


behavior of a ‘Start At’ clause and
returns true for a row that meets all of
the condition parameters. New for
2016.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Information Functions

Function ISTEXT Function

Syntax ISTEXT(<value>)

Description Checks if a value is text, and returns


TRUE or FALSE.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Information Functions

Function LOOKUPVALUE Function

Syntax LOOKUPVALUE(
<result_columnName>,
<search_columnName>,
<search_value>[,
<search_columnName>,
<search_value>]…)
Description Returns the value
in result_columnName for the row
that meets all criteria specified
by search_columnName and search_v
alue.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Information Functions

Function USERNAME Function

Syntax USERNAME()

Description Returns the domain name and


username from the credentials given
to the system at connection time

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Logical Functions

Function AND Function

Syntax AND(<logical1>,<logical2>)

Description Checks whether both arguments are


TRUE, and returns TRUE if both
arguments are TRUE. Otherwise
returns false.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Logical Functions

Function FALSE Function

Syntax FALSE()

Description Returns the logical value FALSE.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Logical Functions

Function IF Function

Syntax IF(logical_test>,<value_if_true>,
value_if_false)

Description Checks if a condition provided as the


first argument is met. Returns one
value if the condition is TRUE, and
returns another value if the condition
is FALSE.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Logical Functions

Function IFERROR Function

Syntax IFERROR(value, value_if_error)

Description Evaluates an expression and returns


a specified value if the expression
returns an error; otherwise returns the
value of the expression itself.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Logical Functions

Function NOT Function

Syntax NOT(<logical>)

Description Changes FALSE to TRUE, or TRUE to


FALSE.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Logical Functions

Function OR Function

Syntax OR(<logical1>,<logical2>)

Description Checks whether one of the arguments


is TRUE to return TRUE. The function
returns FALSE if both arguments are
FALSE.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Logical Functions

Function SWITCH Function

Syntax SWITCH(<expression>, <value>,


<result>[, <value>, <result>]…[, <else>])

Description Evaluates an expression against a list


of values and returns one of multiple
possible result expressions.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Logical Functions

Function TRUE Function

Syntax TRUE()

Description Returns the logical value TRUE.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Math and Trig Functions

Function ABS Function

Syntax ABS(<number>)

Description Returns the absolute value of a


number.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Math and Trig Functions

Function ACOS Function

Syntax ACOS(number)

Description 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.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Math and Trig Functions

Function ACOSH Function

Syntax

Description

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Math and Trig Functions

Function ASIN Function

Syntax

Description

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Math and Trig Functions

Function ASINH Function

Syntax

Description

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Math and Trig Functions

Function ATAN Function

Syntax

Description

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Math and Trig Functions

Function ATANH Function

Syntax

Description

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Math and Trig Functions

Function CEILING Function

Syntax CEILING(<number>, <significance>)

Description Rounds a number up, to the nearest


integer or to the nearest multiple of
significance.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Math and Trig Functions

Function COMBIN Function

Syntax COMBIN(number, number_chosen)

Description 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.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Math and Trig Functions

Function COMBINA Function

Syntax COMBINA(number, number_chosen)

Description Returns the number of combinations


(with repetitions) for a given number
of items.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Math and Trig Functions

Function COS Function

Syntax

Description

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Math and Trig Functions

Function COSH Function

Syntax

Description

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Math and Trig Functions

Function CURRENCY Function

Syntax CURRENCY(<value>)

Description Evaluates the argument and returns


the result as currency data type.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Math and Trig Functions

Function DEGREES Function

Syntax DEGREES(angle)

Description Converts radians into degrees.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Math and Trig Functions

Function DIVIDE Function

Syntax DIVIDE(<numerator>, <denominator>


[,<alternateresult>])

Description Performs division and returns


alternate result or BLANK() on division
by 0.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Math and Trig Functions

Function EVEN Function

Syntax EVEN(number)

Description 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.
www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]
Mastering Data Analytics - DAX Popular Functions

Category Math and Trig Functions

Function EXP Function

Syntax EXP(<number>)

Description Returns e raised to the power of a


given number. The constant e equals
2.71828182845904, the base of the
natural logarithm.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Math and Trig Functions

Function FACT Function

Syntax FACT(<number>)

Description Returns the factorial of a number,


equal to the series 1*2*3*...* , ending
in the given number.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Math and Trig Functions

Function FLOOR Function

Syntax FLOOR(<number>, <significance>)

Description Rounds a number down, toward zero,


to the nearest multiple of
significance.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Math and Trig Functions

Function GCD Function

Syntax GCD(number1, [number2], ...)

Description Returns the greatest common divisor


of two or more integers. The greatest
common divisor is the largest integer
that divides both number1 and
number2 without a remainder.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Math and Trig Functions

Function INT Function

Syntax INT(<number>)

Description Rounds a number down to the


nearest integer.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Math and Trig Functions

Function ISO.CEILING Function

Syntax ISO.CEILING(<number>[,
<significance>])

Description Rounds a number up, to the nearest


integer or to the nearest multiple of
significance.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Math and Trig Functions

Function LCM Function

Syntax LCM(number1, [number2], ...)

Description Returns the least common multiple of


integers. The least common multiple
is the smallest positive integer that is
a multiple of all integer arguments
number1, number2, and so on. Use
LCM to add fractions with different
denominators.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Math and Trig Functions

Function LN Function

Syntax LN(<number>)

Description Returns the natural logarithm of a


number. Natural logarithms are
based on the constant e
(2.71828182845904).

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Math and Trig Functions

Function LOG Function

Syntax LOG(<number>,<base>)

Description Returns the logarithm of a number to


the base you specify.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Math and Trig Functions

Function LOG10 Function

Syntax LOG10(<number>)

Description Returns the base-10 logarithm of a


number.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Math and Trig Functions

Function MOD Function

Syntax MOD(<number>, <divisor>)

Description Returns the remainder after a number


is divided by a divisor. The result
always has the same sign as the
divisor.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Math and Trig Functions

Function MROUND Function

Syntax MROUND(<number>, <multiple>)

Description Returns a number rounded to the


desired multiple.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Math and Trig Functions

Function ODD Function

Syntax ODD(number)

Description Returns number rounded up to the


nearest odd integer.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Math and Trig Functions

Function PI Function

Syntax PI()

Description Returns the value of Pi,


3.14159265358979, accurate to 15
digits.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Math and Trig Functions

Function POWER Function

Syntax POWER(<number>, <power>)

Description Returns the result of a number raised


to a power.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Math and Trig Functions

Function PRODUCT Function

Syntax PRODUCT(<column>)

Description Returns the product of the numbers in


a column.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Math and Trig Functions

Function PRODUCTX Function

Syntax PRODUCTX(<table>, <expression>)

Description Returns the product of an expression


evaluated for each row in a table.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Math and Trig Functions

Function QUOTIENT Function

Syntax QUOTIENT(<numerator>,
<denominator>)

Description Performs division and returns only the


integer portion of the division result.
Use this function when you want to
discard the remainder of division.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Math and Trig Functions

Function RADIANS Function

Syntax RADIANS(angle)

Description Converts degrees to radians.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Math and Trig Functions

Function RAND Function

Syntax RAND()

Description Returns a random number greater


than or equal to 0 and less than 1,
evenly distributed. The number that is
returned changes each time the cell
containing this function is
recalculated.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Math and Trig Functions

Function RANDBETWEEN Function

Syntax RANDBETWEEN(<bottom>,<top>)

Description Returns a random number in the


range between two numbers you
specify.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Math and Trig Functions

Function ROUND Function

Syntax ROUND(<number>, <num_digits>)

Description Rounds a number to the specified


number of digits.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Math and Trig Functions

Function ROUNDDOWN Function

Syntax ROUNDDOWN(<number>,
<num_digits>)

Description Rounds a number down, toward zero.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Math and Trig Functions

Function ROUNDUP Function

Syntax ROUNDUP(<number>, <num_digits>)

Description Rounds a number up, away from 0


(zero).

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Math and Trig Functions

Function SIGN Function

Syntax SIGN(<number>)

Description Determines the sign of a number, the


result of a calculation, or a value in a
column. The function returns 1 if the
number is positive, 0 (zero) if the
number is zero, or -1 if the number is
negative.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Math and Trig Functions

Function SQRT Function

Syntax SQRT(<number>)

Description Returns the square root of a number.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Math and Trig Functions

Function SUM Function

Syntax SUM(<column>)

Description Adds all the numbers in a column.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Math and Trig Functions

Function SUMX Function

Syntax SUMX(<table>, <expression>)

Description Returns the sum of an expression


evaluated for each row in a table.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Math and Trig Functions

Function TRUNC Function

Syntax TRUNC(<number>,<num_digits>)

Description Truncates a number to an integer by


removing the decimal, or fractional,
part of the number.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Other functions

Function EXCEPT Function

Syntax EXCEPT(<table_expression1>,
<table_expression2>

Description Returns the rows of one table which


do not appear in another table.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Other functions

Function GROUPBY Function

Syntax GROUPBY (<table>,


[<groupBy_columnName1>], [<name>,
<expression>]… )

Description The GROUPBY function is similar to


the SUMMARIZE function. However,
GROUPBY does not do an implicit
CALCULATE for any extension
columns that it adds. GROUPBY
permits a new function,
CURRENTGROUP(), to be used inside
aggregation functions in the
extension columns that it adds.
www.mastering-da.com GROUPBY
0961 48 66 48 (Zalo) attempts to reuse the data
[email protected]
Mastering Data Analytics - DAX Popular Functions

Category Other functions

Function INTERSECT Function

Syntax INTERSECT(<table_expression1>,
<table_expression2>)

Description Returns the row intersection of two


tables, retaining duplicates.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Other functions

Function ISEMPTY Function

Syntax ISEMPTY(<table_expression>)

Description Checks if a table is empty.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Other functions

Function NATURALINNERJOIN Function

Syntax NATURALINNERJOIN(<leftJoinTable>,
<rightJoinTable>)

Description Performs an inner join of a table with


another table. The tables are joined
on common columns (by name) in the
two tables. If the two tables have no
common column names, an error is
returned.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Other functions

Function NATURALLEFTOUTERJOIN Function

Syntax NATURALLEFTOUTERJOIN(<leftJoinTa
ble>, <rightJoinTable>)

Description Performs a left outer join of a table


with another table. The tables are
joined on common columns (by name)
in the two tables. If the two tables
have no common column names, an
error is returned.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Other functions

Function SUMMARIZECOLUMNS Function

Syntax SUMMARIZECOLUMNS(
<groupBy_columnName> [, <
groupBy_columnName >]…,
[<filterTable>]…[, <name>,
<expression>]…)

Description Returns a summary table over a set of


groups.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Other functions

Function UNION Function

Syntax UNION(<table_expression1>,
<table_expression2> [,
<table_expression>]…)

Description Creates a union (join) table from a


pair of tables.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Other functions

Function VAR

Syntax VAR <name> = <expression>

Description 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.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Parent and Child Functions

Function PATH Function

Syntax PATH(<ID_columnName>,
<parent_columnName>)

Description Returns a delimited text string with


the identifiers of all the parents of the
current identifier, starting with the
oldest and continuing until current.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Parent and Child Functions

Function PATHCONTAINS Function

Syntax PATHCONTAINS(<path>, <item>)

Description Returns TRUE if the


specified item exists within the
specified path.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Parent and Child Functions

Function PATHITEM Function

Syntax PATHITEM(<path>, <position>[,


<type>])

Description Returns the item at the


specified position from a string
resulting from evaluation of a PATH
function. Positions are counted from
left to right.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Parent and Child Functions

Function PATHITEMREVERSE Function

Syntax PATHITEMREVERSE(<path>, <position>


[, <type>])

Description Returns the item at the


specified position from a string
resulting from evaluation of a PATH
function. Positions are counted
backwards from right to left.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Parent and Child Functions

Function PATHLENGTH Function

Syntax PATHLENGTH(<path>)

Description Returns the number of parents to the


specified item in a given PATH result,
including self.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Statistical Functions

Function ADDCOLUMNS Function

Syntax ADDCOLUMNS(<table>, <name>,


<expression>[, <name>,
<expression>]…)

Description Adds calculated columns to the given


table or table expression.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Statistical Functions

Function AVERAGE Function

Syntax AVERAGE(<column>)

Description Returns the average (arithmetic


mean) of all the numbers in a column.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Statistical Functions

Function AVERAGEA Function

Syntax AVERAGEA(<column>)

Description Returns the average (arithmetic


mean) of the values in a column.
Handles text and non-numeric values.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Statistical Functions

Function AVERAGEX Function

Syntax AVERAGEX(<table>,<expression>)

Description Calculates the average (arithmetic


mean) of a set of expressions
evaluated over a table.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Statistical Functions

Function BETA.DIST Function

Syntax BETA.DIST(x,alpha,beta,cumulative,
[A],[B])

Description 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.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Statistical Functions

Function BETA.INV Function

Syntax BETA.INV(probability,alpha,beta,[A],
[B])

Description Returns the inverse of the beta


cumulative probability density
function (BETA.DIST).

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Statistical Functions

Function CHISQ.INV Function

Syntax CHISQ.INV(probability,deg_freedom)

Description Returns the inverse of the left-tailed


probability of the chi-squared
distribution.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Statistical Functions

Function CHISQ.INV.RT Function

Syntax CHISQ.INV.RT(probability,deg_freedo
m)

Description Returns the inverse of the right-tailed


probability of the chi-squared
distribution.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Statistical Functions

Function CONFIDENCE.NORM Function

Syntax CONFIDENCE.NORM(alpha,standard_
dev,size)

Description The confidence interval is a range of


values. Your sample mean, x, is at the
center of this range and the range is x
± CONFIDENCE.NORM.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Statistical Functions

Function CONFIDENCE.T Function

Syntax CONFIDENCE.T(alpha,standard_dev,s
ize)

Description Returns the confidence interval for a


population mean, using a Student's t
distribution.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Statistical Functions

Function COUNT Function

Syntax COUNT(<column>)

Description The COUNT function counts the


number of cells in a column that
contain numbers.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Statistical Functions

Function COUNTA Function

Syntax COUNTA(<column>)

Description The COUNTA function counts the


number of cells in a column that are
not empty. It counts not just rows that
contain numeric values, but also rows
that contain nonblank values,
including text, dates, and logical
values.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Statistical Functions

Function COUNTAX Function

Syntax COUNTAX(<table>,<expression>)

Description The COUNTAX function counts


nonblank results when evaluating the
result of an expression over a table.
That is, 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.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Statistical Functions

Function COUNTBLANK Function

Syntax COUNTBLANK(<column>)

Description Counts the number of blank cells in a


column.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Statistical Functions

Function COUNTROWS Function

Syntax COUNTROWS(<table>)

Description The COUNTROWS function counts the


number of rows in the specified table,
or in a table defined by an
expression.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Statistical Functions

Function COUNTX Function

Syntax COUNTX(<table>,<expression>)

Description Counts the number of rows that


contain a number or an expression
that evaluates to a number, when
evaluating an expression over a
table.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Statistical Functions

Function CROSSJOIN Function

Syntax CROSSJOIN(<table>, <table>[,


<table>]…)

Description Returns a table that contains the


Cartesian product of all rows from all
tables in the arguments. The columns
in the new table are all the columns in
all the argument tables.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Statistical Functions

Function DATATABLE Function

Syntax DATATABLE (ColumnName1,


DataType1, ColumnName2,
DataType2..., {{Value1, Value2...},
{ValueN, ValueN+1...}...})

Description Provides a mechanism for declaring


an inline set of data values.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Statistical Functions

Function DISTINCTCOUNT Function

Syntax DISTINCTCOUNT(<column>)

Description The DISTINCTCOUNT function counts


the number of different cells in a
column of numbers.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Statistical Functions

Function EXPON.DIST Function

Syntax EXPON.DIST(x,lambda,cumulative)

Description 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.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Statistical Functions

Function GENERATE Function

Syntax GENERATE(<table1>, <table2>)

Description Returns a table with the Cartesian


product between each row
in table1 and the table that results
from evaluating table2 in the context
of the current row from table1.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Statistical Functions

Function GENERATEALL Function

Syntax GENERATEALL(<table1>, <table2>)

Description Returns a table with the Cartesian


product between each row
in table1 and the table that results
from evaluating table2 in the context
of the current row from table1.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Statistical Functions

Function GEOMEAN Function

Syntax GEOMEAN(<column>)

Description Returns the geometric mean of the


numbers in a column.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Statistical Functions

Function GEOMEANX Function

Syntax GEOMEANX(<table>, <expression>)

Description Returns the geometric mean of an


expression evaluated for each row in
a table.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Statistical Functions

Function MAX Function

Syntax MAX(<column>)

Description Returns the largest numeric value in a


column.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Statistical Functions

Function MAXA Function

Syntax MAXA(<column>)

Description Returns the largest value in a column.


Logical values and blanks are
counted.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Statistical Functions

Function MAXX Function

Syntax MAXX(<table>,<expression>)

Description Evaluates an expression for each row


of a table and returns the largest
numeric value.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Statistical Functions

Function MEDIAN Function

Syntax MEDIAN(<column>)

Description Returns the median of numbers in a


column.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Statistical Functions

Function MEDIANX Function

Syntax MEDIANX(<table>, <expression>)

Description Returns the median number of an


expression evaluated for each row in
a table.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Statistical Functions

Function MIN Function

Syntax MIN(<column>)

Description Returns the smallest numeric value in


a column. Ignores logical values and
text.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Statistical Functions

Function MINA Function

Syntax MINA(<column>)

Description Returns the smallest value in a


column, including any logical values
and numbers represented as text.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Statistical Functions

Function MINX Function

Syntax MINX(<table>, < expression>)

Description Returns the smallest numeric value


that results from evaluating an
expression for each row of a table.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Statistical Functions

Function PERCENTILE.EXC Function

Syntax PERCENTILE.EXC(<column>, <k>)

Description Returns the k-th percentile of values


in a range, where k is in the range
0..1, exclusive.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Statistical Functions

Function PERCENTILE.INC Function

Syntax PERCENTILE.INC(<column>, <k>)

Description Returns the k-th percentile of values


in a range, where k is in the range
0..1, inclusive.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Statistical Functions

Function PERCENTILEX.EXC Function

Syntax PERCENTILEX.EXC(<table>,
<expression>, k)

Description Returns the percentile number of an


expression evaluated for each row in
a table.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Statistical Functions

Function PERCENTILEX.INC Function

Syntax PERCENTILEX.INC(<table>,
<expression>;, k)

Description Returns the percentile number of an


expression evaluated for each row in
a table.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Statistical Functions

Function POISSON.DIST Function

Syntax POISSON.DIST(x,mean,cumulative)

Description 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.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Statistical Functions

Function RANK.EQ Function

Syntax RANK.EQ(<value>, <columnName>[,


<order>])

Description Returns the ranking of a number in a


list of numbers.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Statistical Functions

Function RANKX Function

Syntax RANKX(<table>, <expression>[,


<value>[, <order>[, <ties>]]])

Description Returns the ranking of a number in a


list of numbers for each row in
the table argument.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Statistical Functions

Function ROW Function

Syntax ROW(<name>, <expression>[[,


<name>, <expression>]…])

Description Returns a table with a single row


containing values that result from the
expressions given to each column.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Statistical Functions

Function SAMPLE Function

Syntax SAMPLE(<n_value>, <table>,


<orderBy_expression>, [<order>[,
<orderBy_expression>, [<order>]]…])

Description Returns a sample of N rows from the


specified table.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Statistical Functions

Function SELECTCOLUMNS Function

Syntax SELECTCOLUMNS(<table>, <name>,


<scalar_expression> [, <name>,
<scalar_expression>]…)

Description Adds calculated columns to the given


table or table expression.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Statistical Functions

Function SIN Function

Syntax SIN(number)

Description Returns the sine of the given angle.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Statistical Functions

Function SINH Function

Syntax SINH(number)

Description Returns the hyperbolic sine of a


number.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Statistical Functions

Function STDEV.P Function

Syntax STDEV.P(<ColumnName>)

Description Returns the standard deviation of the


entire population.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Statistical Functions

Function STDEV.S Function

Syntax STDEV.S(<ColumnName>)

Description Returns the standard deviation of a


sample population.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Statistical Functions

Function STDEVX.P Function

Syntax STDEVX.P(<table>, <expression>)

Description Returns the standard deviation of the


entire population.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Statistical Functions

Function STDEVX.S Function

Syntax STDEVX.S(<table>, <expression>)

Description Returns the standard deviation of a


sample population.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Statistical Functions

Function SQRTPI Function

Syntax SQRTPI(number)

Description Returns the square root of (number *


pi).

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Statistical Functions

Function SUMMARIZE Function

Syntax SUMMARIZE(<table>,
<groupBy_columnName>[,
<groupBy_columnName>]…[, <name>,
<expression>]…)

Description Returns a summary table for the


requested totals over a set of groups.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Statistical Functions

Function TAN Function

Syntax TAN(number)

Description Returns the tangent of the given


angle.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Statistical Functions

Function TANH Function

Syntax TANH(number)

Description Returns the hyperbolic tangent of a


number.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Statistical Functions

Function TOPN Function

Syntax TOPN(<n_value>, <table>,


<orderBy_expression>, [<order>[,
<orderBy_expression>, [<order>]]…])

Description Returns the top N rows of the


specified table.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Statistical Functions

Function VAR.P Function

Syntax VAR.P(<columnName>)

Description Returns the variance of the entire


population.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Statistical Functions

Function VAR.S Function

Syntax VAR.S(<columnName>)

Description Returns the variance of a sample


population.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Statistical Functions

Function VARX.P Function

Syntax VARX.P(<table>, <expression>)

Description Returns the variance of the entire


population.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Statistical Functions

Function VARX.S Function

Syntax VARX.S(<table>, <expression>)

Description Returns the variance of a sample


population.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Statistical Functions

Function XIRR Function

Syntax XIRR(<table>, <values>, <dates>,


[guess])

Description Returns the internal rate of return for


a schedule of cash flows that is not
necessarily periodic.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Statistical Functions

Function XNPV Function

Syntax XNPV(<table>, <values>, <dates>,


<rate>)

Description Returns the present value for a


schedule of cash flows that is not
necessarily periodic.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Text functions

Function BLANK Function

Syntax BLANK()

Description Returns a blank.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Text functions

Function CODE Function

Syntax CODE(text)

Description Returns a numeric code for the first


character in a text string. The
returned code corresponds to the
character set used by your computer.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Text functions

Function CONCATENATE Function

Syntax CONCATENATE(<text1>, <text2>)

Description Joins two text strings into one text


string.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Text functions

Function CONCATENATEX Function

Syntax CONCATENATEX(<table>,
<expression>, [delimiter])

Description Concatenates the result of an


expression evaluated for each row in
a table.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Text functions

Function EXACT Function

Syntax EXACT(<text1>,<text2>)

Description Compares two text strings and


returns TRUE if they are exactly the
same, FALSE otherwise. EXACT is
case-sensitive but ignores formatting
differences. You can use EXACT to
test text being entered into a
document.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Text functions

Function FIND Function

Syntax FIND(<find_text>, <within_text>[,


[<start_num>][, <NotFoundValue>]])

Description Returns the starting position of one


text string within another text string.
FIND is case-sensitive.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Text functions

Function FIXED Function

Syntax FIXED(<number>, <decimals>,


<no_commas>)

Description Rounds a number to the specified


number of decimals and returns the
result as text. You can specify that
the result be returned with or without
commas.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Text functions

Function FORMAT Function

Syntax FORMAT(<value>, <format_string>)

Description Converts a value to text according to


the specified format.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Text functions

Function Pre-Defined Numeric Formats for the


FORMAT Function

Syntax

Description

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Text functions

Function Custom Numeric Formats for the


FORMAT Function

Syntax

Description

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Text functions

Function Pre-defined Date and Time formats


for the FORMAT Function

Syntax

Description

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Text functions

Function Custom Date and Time formats for


the FORMAT Function

Syntax

Description

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Text functions

Function LEFT Function

Syntax LEFT(<text>, <num_chars>)

Description Returns the specified number of


characters from the start of a text
string.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Text functions

Function LEN Function

Syntax LEN(<text>)

Description Returns the number of characters in a


text string.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Text functions

Function LOWER Function

Syntax LOWER(<text>)

Description Converts all letters in a text string to


lowercase.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Text functions

Function MID Function

Syntax MID(<text>, <start_num>,


<num_chars>)

Description Returns a string of characters from


the middle of a text string, given a
starting position and length.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Text functions

Function REPLACE Function

Syntax REPLACE(<old_text>, <start_num>,


<num_chars>, <new_text>)

Description REPLACE replaces part of a text


string, based on the number of
characters you specify, with a
different text string.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Text functions

Function REPT Function

Syntax REPT(<text>, <num_times>)

Description Repeats text a given number of times.


Use REPT to fill a cell with a number of
instances of a text string.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Text functions

Function RIGHT Function

Syntax RIGHT(<text>, <num_chars>)

Description RIGHT returns the last character or


characters in a text string, based on
the number of characters you specify.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Text functions

Function SEARCH Function

Syntax SEARCH(<find_text>, <within_text>[,


[<start_num>][, <NotFoundValue>]])

Description Returns the number of the character


at which a specific character or text
string is first found, reading left to
right. Search is case-insensitive and
accent sensitive.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Text functions

Function SUBSTITUTE Function

Syntax SUBSTITUTE(<text>, <old_text>,


<new_text>, <instance_num>)

Description Replaces existing text with new text


in a text string.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Text functions

Function TRIM Function

Syntax TRIM(<text>)

Description Removes all spaces from text except


for single spaces between words.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Text functions

Function UPPER Function

Syntax UPPER (<text>)

Description Converts a text string to all


uppercase letters

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


Mastering Data Analytics - DAX Popular Functions

Category Text functions

Function VALUE Function

Syntax VALUE(<text>)

Description Converts a text string that represents


a number to a number.

www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]


www.mastering-da.com 0961 48 66 48 (Zalo) [email protected]

You might also like