DAX: Data Analysis Expressions
Date & Time Functions:
DATE: Returns the specified date in datetime format.
DATE(<year>, <month>, <day>)
Date & Time Functions:
DATE: Returns the specified date in datetime format.
DATE(<year>, <month>, <day>)
DATEDIFF: Returns the count of interval boundaries crossed between two dates.
DATEDIFF(<start_date>, <end_date>, <interval>)
DATEVALUE DAX FUNCTION: Converts a date in text format to a date in datetime format.
DATEVALUE(date_text)
DAY DAX FUNCTION: Returns the day of the month, a number from 1 to 31.
DAY(<date>)
EDATE DAX FUNCTION : 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.
EDATE(<start_date>, <months>)
EOMONTH DAX FUNCTION : 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.
EOMONTH(<start_date>, <months>)
HOUR DAX FUNCTION : Returns the hour as a number from 0 (12:00 A.M.) to 23 (11:00 P.M.).
HOUR(<datetime>)
MINUTE DAX FUNCTION: Returns the minute as a number from 0 to 59, given a date and time value.
MINUTE(<datetime>
MONTH DAX FUNCTION: Returns the month as a number from 1 (January) to 12 (December).
MONTH(<datetime>)
NOW DAX FUNCTION: Returns the current date and time in datetime format.
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.
NOW()
QUARTER DAX FUNCTION: Returns the quarter as a number from 1 (January – March) to 4 (October – December).
QUARTER(<date>)
TIME DAX FUNCTION: Converts hours, minutes, and seconds given as numbers to a time in datetime format.
TIME(hour, minute, second)
TIMEVALUE DAX FUNCTION: Converts a time in text format to a time in datetime format.
TIMEVALUE(time_text)
TODAY DAX FUNCTION: Returns the current date.
TODAY()
WEEKDAY DAX FUNCTION: 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).
WEEKDAY(<date>, <return_type>)
WEEKNUM DAX FUNCTION: 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.
WEEKNUM(<date>, <return_type>)
YEAR DAX FUNCTION: Returns the year of a date as a four digit integer in the range 1900-9999.
YEAR(<date>)
TIME- INTELLEGENCE FUNCTIONS:
DATEADD DAX FUNCTION: 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.
DATEADD(<dates>,<number_of_intervals>,<interval>)
DATESBETWEEN DAX FUNCTION: Returns a table that contains a column of dates that begins with the start_date and continues until the end_date.
DATESBETWEEN(<dates>,<start_date>,<end_date>)
DATESINPERIOD DAX FUNCTION: Returns a table that contains a column of dates that begins with the start_date and continues for the specified number_of_intervals.
DATESINPERIOD(<dates>,<start_date>,<number_of_intervals>,<interval>)
DATESMTD DAX FUNCTION: Returns a table that contains a column of the dates for the month to date, in the current context.
DATESMTD(<dates>)
DATESQTD DAX FUNCTION: Returns a table that contains a column of the dates for the quarter to date, in the current context.
DATESQTD(<dates>)
DATESYTD DAX FUNCTION: Returns a table that contains a column of the dates for the year to date, in the current context.
DATESYTD(<dates> [,<year_end_date>])
ENDOFMONTH DAX FUNCTION: Returns the last date of the month in the current context for the specified column of dates.
ENDOFMONTH(<dates>)
ENDOFQUARTER DAX FUNCTION: Returns the last date of the quarter in the current context for the specified column of dates.
ENDOFQUARTER(<dates>)
ENDOFYEAR DAX FUNCTION: Returns the last date of the year in the current context for the specified column of dates.
ENDOFYEAR(<dates> [,<year_end_date>])
FIRSTDATE DAX FUNCTION: Returns the first date in the current context for the specified column of dates.
FIRSTDATE(<dates>)
FIRSTNONBLANK DAX FUNCTION: Returns the first value in the column, column, filtered by the current context, where the expression is not blank.
FIRSTNONBLANK(<column>,<expression>)
LASTDATE DAX FUNCTION: Returns the last date in the current context for the specified column of dates.
LASTDATE(<dates>)
LASTNONBLANK DAX FUNCTION: Returns the last value in the column, column, filtered by the current context, where the expression is not blank.
LASTNONBLANK(<column>,<expression>)
NEXTDAY DAX FUNCTION: 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.
NEXTDAY(<dates>)
NEXTMONTH DAX FUNCTION: Returns a table that contains a column of all dates from the next month, based on the first date in the dates column in the current context.
NEXTMONTH(<dates>)
NEXTQUARTER DAX FUNCTION: Returns a table that contains a column of all dates in the next quarter, based on the first date specified in the dates column, in the current context.
NEXTQUARTER(<dates>)
NEXTYEAR DAX FUNCTION: Returns a table that contains a column of all dates in the next year, based on the first date in the dates column, in the current context.
NEXTYEAR(<dates>[,<year_end_date>])
PARALLELPERIOD DAX FUNCTION: 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.
PARALLELPERIOD(<dates>,<number_of_intervals>,<interval>)
PREVIOUSDAY DAX FUNCTION: 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.
PREVIOUSDAY(<dates>)
PREVIOUSMONTH DAX FUNCTION: Returns a table that contains a column of all dates from the previous month, based on the first date in the dates column, in the current context.
PREVIOUSMONTH(<dates>)
PREVIOUSQUARTER DAX FUNCTION: Returns a table that contains a column of all dates from the previous quarter, based on the first date in the dates column, in the current context.
PREVIOUSQUARTER(<dates>)
PREVIOUSYEAR DAX FUNCTION: Returns a table that contains a column of all dates from the previous year, given the last date in the dates column, in the current context.
PREVIOUSYEAR(<dates>[,<year_end_date>])
SAMEPERIODLASTYEAR DAX FUNCTION: 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.
SAMEPERIODLASTYEAR(<dates>)
No comments:
Post a Comment