Comprehensive DAX Time Intelligence
Functions Reference Table
Overview
Data Analysis Expressions (DAX) includes over 30 time intelligence functions that enable
business analysts and data professionals to manipulate data using time periods,
including days, months, quarters, and years. These functions are essential for creating
sophisticated time-based calculations such as year-to-date (YTD), month-to-date (MTD),
quarter-to-date (QTD), and comparative analysis across different time periods.
Before using any time intelligence functions, it is crucial to mark one of the tables
containing a date column as a Date Table in your Power BI data model. This ensures that
the functions work correctly and provide accurate results.
Complete DAX Time Intelligence Functions Table
Group DAX Function Explanation Example Usage
Evaluates
the
expression =CLOSINGBALANCEMONTH(SUM(Sal
Balance at the last Calendar[Date]) - Returns the rev
CLOSINGBALANCEMONTH
Functions date of the day of each month, useful for tracking
month in balances
the current
context
Evaluates
the
expression
=CLOSINGBALANCEQUARTER(SUM(I
Balance at the last
CLOSINGBALANCEQUARTER Calendar[Date]) - Returns the stoc
Functions date of the
each quarter, perfect for quarterly inv
quarter in
the current
context
Group DAX Function Explanation Example Usage
Evaluates
the
expression
=CLOSINGBALANCEYEAR(SUM(Asse
Balance at the last
CLOSINGBALANCEYEAR Calendar[Date]) - Returns the ass
Functions date of the
essential for annual financial stateme
year in the
current
context
Evaluates
the
expression
=OPENINGBALANCEMONTH(SUM(Cas
Balance at the first
OPENINGBALANCEMONTH Calendar[Date]) - Returns the cas
Functions date of the
beginning of each month for cash flow
month in
the current
context
Evaluates
the
expression
=OPENINGBALANCEQUARTER(SUM(B
Balance at the first
OPENINGBALANCEQUARTER Calendar[Date]) - Returns the bud
Functions date of the
start of each quarter for budget tracki
quarter in
the current
context
Evaluates
the
expression
=OPENINGBALANCEYEAR(SUM(Equi
Balance at the first
OPENINGBALANCEYEAR Calendar[Date]) - Returns the equ
Functions date of the
beginning of each year for annual com
year in the
current
context
Returns a
=CALCULATE(SUM(Sales[Amount]
Date table of
DATEADD DATEADD(Calendar[Date], -1, Y
Navigation dates
sales for the previous year by shifting
shifted
Group DAX Function Explanation Example Usage
forward or
backward
by specified
intervals
Returns a
table
containing
the next day =CALCULATE(SUM(Sales[Amount]
Date
NEXTDAY based on NEXTDAY(Calendar[Date])) - Calc
Navigation
the first date next day relative to the current date c
in the
current
context
Returns a
table
=CALCULATE(SUM(Sales[Amount]
Date containing
NEXTMONTH NEXTMONTH(Calendar[Date])) - C
Navigation all dates
the next month, useful for forecasting
from the
next month
Returns a
table
=CALCULATE(SUM(Revenue[Amoun
Date containing
NEXTQUARTER NEXTQUARTER(Calendar[Date]))
Navigation all dates
for the next quarter for forward-looki
from the
next quarter
Returns a
table
=CALCULATE(SUM(Sales[Amount]
Date containing
NEXTYEAR NEXTYEAR(Calendar[Date])) - Ca
Navigation all dates
next year for year-over-year projectio
from the
next year
Returns a
table =CALCULATE(SUM(Orders[Count]
Date
PREVIOUSDAY containing PREVIOUSDAY(Calendar[Date]))
Navigation
the previous count for the previous day for daily co
Group DAX Function Explanation Example Usage
day based
on the
current
context
Returns a
table
containing =CALCULATE(SUM(Sales[Amount]
Date
PREVIOUSMONTH all dates PREVIOUSMONTH(Calendar[Date])
Navigation
from the for the previous month for month-ove
previous
month
Returns a
table
containing =CALCULATE(SUM(Profit[Amount
Date
PREVIOUSQUARTER all dates PREVIOUSQUARTER(Calendar[Date
Navigation
from the profit for the previous quarter for qua
previous
quarter
Returns a
table
containing =CALCULATE(SUM(Sales[Amount]
Date
PREVIOUSYEAR all dates PREVIOUSYEAR(Calendar[Date]))
Navigation
from the for the previous year for year-over-yea
previous
year
Returns a
table of
dates =CALCULATE(SUM(Sales[Amount]
Date shifted one SAMEPERIODLASTYEAR(Calendar[D
SAMEPERIODLASTYEAR
Navigation year back sales for the same period last year, pe
from the calculations
current
context
Returns =CALCULATE(SUM(Sales[Amount]
Date
PARALLELPERIOD dates PARALLELPERIOD(Calendar[Date]
Navigation
Group DAX Function Explanation Example Usage
parallel to
the current
period, Calculates sales for 3 months ago, use
shifted by comparisons
specified
intervals
Returns a
table of
=CALCULATE(SUM(Sales[Amount]
Date dates
DATESBETWEEN(Calendar[Date],
Range DATESBETWEEN between
DATE(2023,12,31))) - Calculates s
Functions specified
date range, useful for custom period a
start and
end dates
Returns a
table of
dates for a
Date =CALCULATE(SUM(Sales[Amount]
specified
Range DATESINPERIOD DATESINPERIOD(Calendar[Date],
number of
Functions DAY)) - Calculates sales for the last 3
intervals
from a start
date
Returns a
table of
Date dates for =CALCULATE(SUM(Sales[Amount]
Range DATESMTD month-to- DATESMTD(Calendar[Date])) - Ca
Functions date in the date sales, resets at the beginning of
current
context
Returns a
table of
Date dates for =CALCULATE(SUM(Revenue[Amoun
Range DATESQTD quarter-to- DATESQTD(Calendar[Date])) - Ca
Functions date in the date revenue, resets at the beginning
current
context
Group DAX Function Explanation Example Usage
Returns a
table of
Date dates for =CALCULATE(SUM(Sales[Amount]
Range DATESYTD year-to-date DATESYTD(Calendar[Date])) - Ca
Functions in the sales, resets at the beginning of each
current
context
Returns the
last date of
Date =ENDOFMONTH(Calendar[Date]) -
the month
Boundary ENDOFMONTH of the month, useful for creating mon
for the
Functions and filters
specified
date column
Returns the
last date of
Date
the quarter =ENDOFQUARTER(Calendar[Date]
Boundary ENDOFQUARTER
for the day of the quarter, essential for quart
Functions
specified
date column
Returns the
last date of
Date =ENDOFYEAR(Calendar[Date]) - R
the year for
Boundary ENDOFYEAR the year, crucial for annual reporting
the
Functions calculations
specified
date column
Returns the
first date of
Date
the month =STARTOFMONTH(Calendar[Date]
Boundary STARTOFMONTH
for the day of the month, useful for month-b
Functions
specified
date column
Returns the
Date first date of =STARTOFQUARTER(Calendar[Dat
Boundary STARTOFQUARTER the quarter first day of the quarter, essential for q
Functions for the definitions
Group DAX Function Explanation Example Usage
specified
date column
Returns the
first date of
Date =STARTOFYEAR(Calendar[Date])
the year for
Boundary STARTOFYEAR day of the year, crucial for year-begin
the
Functions fiscal year starts
specified
date column
Returns the
first date in
Date the current =FIRSTDATE(Calendar[Date]) - R
Utility FIRSTDATE context for date in the current filter context, usef
Functions the range calculations
specified
date column
Returns the
last date in
Date the current =LASTDATE(Calendar[Date]) - Re
Utility LASTDATE context for in the current filter context, useful for
Functions the recent data point
specified
date column
Returns the
Date first date =FIRSTNONBLANKDATE(Calendar[
Utility FIRSTNONBLANKDATE where the Sales[Amount]) - Returns the first
Functions expression data, useful for finding data availabili
is not blank
Returns the
Date last date =LASTNONBLANKDATE(Calendar[D
Utility LASTNONBLANKDATE where the Sales[Amount]) - Returns the last d
Functions expression data, useful for finding the most recen
is not blank
Evaluates
Period
TOTALMTD the
Totals
expression
Group DAX Function Explanation Example Usage
for month-
=TOTALMTD(SUM(Sales[Amount])
to-date in
- Calculates cumulative month-to-dat
the current
automatically resets each month
context
Evaluates
the
expression =TOTALQTD(SUM(Revenue[Amount
Period
TOTALQTD for quarter- Calendar[Date]) - Calculates cum
Totals
to-date in date revenue, automatically resets ea
the current
context
Evaluates
the
expression =TOTALYTD(SUM(Sales[Amount])
Period
TOTALYTD for year-to- - Calculates cumulative year-to-date s
Totals
date in the resets each year
current
context
Function Groups Explained
Balance Functions
These functions are specifically designed for financial analysis where opening and
closing balances are crucial. They evaluate expressions at specific points in time
(beginning or end of periods) and are essential for balance sheet analysis, inventory
tracking, and cash flow management.
Date Navigation Functions
These functions allow you to move between different time periods relative to the current
context. They are fundamental for creating comparative analysis, such as comparing
current performance with previous periods or projecting future trends based on
historical data.
Date Range Functions
These functions return sets of dates that define specific time periods. They are the
building blocks for many time intelligence calculations and are commonly used with the
CALCULATE function to create custom time-based measures.
Date Boundary Functions
These utility functions help identify the start and end points of various time periods.
They are often used in combination with other functions to create precise date filters
and are essential for accurate period-based calculations.
Date Utility Functions
These functions provide helpful utilities for working with dates in various contexts. They
help identify the actual range of data availability and are useful for creating dynamic
calculations that adapt to the actual data present.
Period Totals
These functions provide convenient shortcuts for common cumulative calculations.
They automatically handle the complexity of creating running totals that reset at
appropriate period boundaries, making them ideal for dashboard and report creation.
Best Practices for Using Time Intelligence Functions
When working with DAX time intelligence functions, several best practices ensure
optimal performance and accuracy:
Date Table Requirements: Always ensure you have a proper date table marked as a
Date Table in your data model. This table should contain continuous dates without gaps
and should cover the entire range of dates in your fact tables.
Filter Context Understanding: Time intelligence functions work within the current filter
context. Understanding how filters interact with these functions is crucial for creating
accurate calculations.
Performance Considerations: Some time intelligence functions can be resource-
intensive, especially when working with large datasets. Consider using variables and
optimizing your DAX expressions for better performance.
Fiscal Year Handling: Many organizations operate on fiscal years that don't align with
calendar years. Several time intelligence functions support fiscal year parameters to
accommodate these requirements.
This comprehensive reference table provides a complete overview of all major DAX time
intelligence functions, their purposes, and practical examples to help you implement
sophisticated time-based analysis in your Power BI reports and dashboards.