0% found this document useful (0 votes)
21 views

List of Powerpivot Dax Functions With Description: Date and Time Functions

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)
21 views

List of Powerpivot Dax Functions With Description: Date and Time Functions

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/ 9

List of PowerPivot DAX functions with description

Written by Vidas Matelis on 13 November 2009.

Vote 5 Rate

Download formated pdf document with DAX functions here... (/public_files/cheat-


sheet/powerpivot-dax-functions-long.pdf)

DATE AND TIME FUNCTIONS


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

INFORMATION FUNCTIONS
Function Description
ISBLANK(<value>) Checks whether a value is blank, and returns TRUE or FALSE.
ISERROR(<value>) Checks whether a value is an error, and returns TRUE or FALSE.
ISLOGICAL Checks whether a value is a logical value, (TRUE or FALSE), and returns
(<value>) TRUE or FALSE.
ISNONTEXT Checks whether a value is not text (blank cells are not text), and
(<value>) returns TRUE or FALSE.
ISNUMBER
Checks whether a value is a number, and returns TRUE or FALSE.
(<value>)
ISTEXT(<value>) Checks whether a value is text, and returns TRUE or FALSE.

FILTER AND VALUE FUNCTIONS


Function Description
Returns all the rows in a table, or all the values in
ALL(<table_or_column>) a column, ignoring any filters that might have
been applied.
Overrides all context filters in the table except
ALLEXCEPT
filters that have been applied to the specified
(<table>,column1>,<column2>,…)
columns.
BLANK() Returns a blank.
CALCULATE Evaluates an expression in a context that is
(<expression>,<filter1>,<filter2>…) modified by the specified filters.
CALCULATETABLE( <expression>, Evaluates a table expression in a context modified
<filter1>, <filter2>,…) by filters.
Returns a one-column table that contains the
DISTINCT(<column>)
distinct values from the specified column.
Returns the current value of the specified column
EARLIER(<column>, <number>) in an outer evaluation pass of the mentioned
column.
Returns the current value of the specified column
EARLIEST(<table_or_column>) in an outer evaluation pass of the mentioned
column
Returns a table that represents a subset of
FILTER(<table>,<filter>)
another table or expression.
RELATED(<column>) Returns a related value from another table
Follows an existing relationship, in either
RELATEDTABLE(<table>) direction, and returns a table that contains all
matching rows from the specified table.
Returns a one-column table that contains the
distinct values from the specified column. This
VALUES(<column>) function is similar to DISTINCT function, but
VALUES function can also return Unknown
member
Returns all the rows, except for blank rows, in a
ALLNONBLANKROW(?) table or column, and disregards any context filters
that might exist.
FIRSTNONBLANK Returns the first non-blank values in column,
(<column>,<expression>) filtered by expression.

LOGICAL FUNCTIONS
Function Description
Checks whether all arguments are TRUE, and returns
AND(<logical1>,<logical2>,…)
TRUE if all arguments are TRUE.
FALSE() Returns the logical value FALSE.
Checks if a condition provided as the first argument is
IF(logical_test>,<value_if_true>,
met. Returns one value if the condition is TRUE, and
value_if_false)
returns another value if the condition is FALSE.
Returns value_if_error if the first expression is an error
IFERROR(value, value_if_error)
and the value of the expression itself if otherwise.
NOT(<logical>) Changes FALSE to TRUE, or TRUE to FALSE.
TRUE() Returns the logical value TRUE.
Checks whether one of the arguments is TRUE to
OR(<logical1>,<logical2>,…) return TRUE. The function returns FALSE if all
arguments are FALSE

MATH AND TRIG FUNCTIONS


Function Description
ABS(<number>) Returns the absolute value of a number.
CEILING(<number>, Rounds a number up, to the nearest integer or to the
<significance>) nearest multiple of significance.
Returns e raised to the power of a given number. The
EXP(<number>) constant e equals 2.71828182845904, the base of the
natural logarithm.
Returns the factorial of a number, equal to the series
FACT(<number>)
1*2*3*...* , ending in the given number.
FLOOR(<number>, Rounds a number down, toward zero, to the nearest
<significance>) multiple of significance.
INT(<number>) Rounds a number down to the nearest integer.
Returns the natural logarithm of a number. Natural
LN(<number>) logarithms are based on the constant e
(2.71828182845904).
LOG(<number>,<base>) Returns the logarithm of a number to the base you specify.
LOG10(<number>) Returns the base-10 logarithm of a number.
Returns the remainder after a number is divided by a
MOD(<number>, <divisor>)
divisor. The result always has the same sign as the divisor.
MROUND(<number>,
Returns a number rounded to the desired multiple.
<multiple>)
Returns the value of Pi, 3.14159265358979, accurate to 15
PI()
digits.
POWER(<number>, <power>) Returns the result of a number raised to a power.
Performs division and returns only the integer portion of the
QUOTIENT(<numerator>,
division result. Use this function when you want to discard
<denominator>)
the remainder of division.
ROUND(<number>,
Rounds a number to the specified number of digits.
<num_digits>)
ROUNDDOWN(<number>,
Rounds a number down, toward zero.
<num_digits>)
ROUNDUP(<number>,
Rounds a number up, away from 0 (zero).
<num_digits>)
Determines the sign of a number, the result of a calculation,
or a value in a column. The function returns 1 if the number
SIGN(<number>)
is positive, 0 (zero) if the number is zero, or -1 if the
number is negative.
SQRT(<number>) Returns the square root of a number.
TRUNC Truncates a number to an integer by removing the decimal,
(<number>,<num_digits>) or fractional, part of the number.
Returns a random number greater than or equal to 0 and
less than 1, evenly distributed. The number that is returned
[vb] RAND()
changes each time the cell containing this function is
recalculated.
[vb] RANDBETWEEN
Returns a random number between the numbers you specify
(<bottom>,<top>)

STATISTICAL FUNCTIONS
Function Description
Returns the average (arithmetic mean) of all the numbers in a
AVERAGE(<column>)
column.
Returns the average (arithmetic mean) of the values in a column.
AVERAGEA(<column>)
Handles text and non-numeric values.
AVERAGEX(<table>, Calculates the average (arithmetic mean) of a set of expressions
<expression>) evaluated over a table
The COUNT function counts the number of cells in a column that
COUNT(<column>)
contain numbers.
The COUNTA function counts the number of cells in a column that
COUNTA(<column>)
are not empty.
COUNTAX(<table>, The COUNTAX function counts nonblank results when evaluating
<expression>) the result of an expression over a table.
COUNTBLANK
Counts the number of blank cells in a column.
(<column>)
The COUNTROWS function counts the number of rows in the
COUNTROWS(<table>)
specified table, or in a table defined by an expression.
Counts the number of rows that contain a number or an expression
COUNTX(<table>,
that evaluates to a number, when evaluating an expression over a
<expression>)
table.
MAX(<column>) Returns the largest numeric value in a column.
Returns the largest value in a column. Logical values and blanks
MAXA(<column>)
are counted.
MAXX(<table>, Evaluates an expression for each row of a table and returns the
<expression>) largest numeric value.
Returns the smallest numeric value in a column. Ignores logical
MIN(<column>)
values and text.
Returns the smallest value in a column, including any logical values
MINA(<column>)
and numbers represented as text.
MINX(<table>, < Returns the smallest numeric value that results from evaluating an
expression>) expression for each row of a table.
SUM(<column>) Adds all the numbers in a column.
SUMX(<table>,
Returns the sum of an expression evaluated for each row in a table.
<expression>)

TEXT FUNCTIONS
Function Description
Returns a numeric code for the first character in a text string,
CODE(<text>)
in the character set used by your computer.
The CONCATENATE function joins multiple text strings into one
text string. The joined items can be text, numbers or Boolean
CONCATENATE(<text1>,
values represented as text, or a combination of those items.
<text2>,…)
You can also use a column reference if the column contains
appropriate values.
Compares two text strings and returns TRUE if they are exactly
the same, FALSE otherwise. EXACT is case-sensitive but
EXACT(<text1>,<text2>)
ignores formatting differences. You can use EXACT to test text
being entered into a document.
FIND(<find_text, Returns the starting position of one text string within another
within_text, start_num) text string. FIND is case-sensitive.
FIXED(<number>, Rounds a number to the specified number of decimals and
<decimals>, returns the result as text. You can specify that the result be
<no_commas>) returned with or without commas.
LEFT(<text>, Returns the specified number of characters from the start of a
<num_chars>) text string.
LEN(<text>) Returns the number of characters in a text string.
LOWER(<text>) Converts all letters in a text string to lowercase.
MID(<text>, <start_num>, Returns a string of characters from the middle of a text string,
<num_chars>) given a starting position and length.
REPLACE(<old_text>,
<start_num>, REPLACE replaces part of a text string, based on the number of
<num_chars>, characters you specify, with a different text string.
<new_text>)
REPT(<text>, Repeats text a given number of times. Use REPT to fill a cell
<num_times>) with a number of instances of a text string
RIGHT(<text>, RIGHT returns the last character or characters in a text string,
<num_chars>) based on the number of characters you specify.
SEARCH(<search_text>, Returns the number of the character at which a specific
<within_text>, character or text string is first found, reading left to right.
[start_num]) Search is case-sensitive.
SUBSTITUTE(<text>,
<old_text>, <new_text>, Replaces existing text with new text in a text string.
<instance_num>)
Removes all spaces from text except for single spaces between
TRIM(<text>)
words.
UPPER (<text>) Converts a text string to all uppercase letters
VALUE(<text>) Converts a text string that represents a number to a number.
FORMAT(<value>,
Converts a value to text according to the specified format.
<format_string>)

TIME INTELLIGENCE FUNCTIONS


Function Description
Evaluates the
specified expression
at the calendar end of
the given month. The
given month is
CLOSINGBALANCEMONTH(<expression>,<dates>,<filter>)
calculated as the
month of the latest
date in the dates
argument, after
applying all filters.
Evaluates the
specified expression
at the calendar end of
the given quarter.
The given quarter is
CLOSINGBALANCEQUARTER(<expression>,<dates>,<filter>)
calculated as the
quarter of the latest
date in the dates
argument, after
applying all filters.
Evaluates the
specified expression
at the calendar end of
the given year. The
given year is
CLOSINGBALANCEYEAR(<expression>,<dates>,<filter>)
calculated as the year
of the latest date in
the dates argument,
after applying all
filters.
Returns a table of
dates that can be
found in the specified
date column
DATESINPERIOD
beginning with the
(<date_column>,<start_date>,<number_of_intervals>,<intervals>)
start date and
continuing for the
specified number of
intervals.
Returns a table of
dates that can be
found in the specified
DATESBETWEEN(<column>,<start_date>,<end_date> date column
beginning with the
start date and ending
with the end date.
Returns a table that
contains a column of
dates, shifted either
DATEADD(<date_column>,<number_of_intervals>,<interval>) forward in time or
back in time from the
dates in the specified
date column.
Returns the first date
in the current context
FIRSTDATE (<datecolumn>)
for the specified
Date_Column.
2007-2015 VidasSoft Systems Inc.

You might also like