Home

TOTALYTD

TOTALYTD is a time-intelligence function used in DAX and the Excel data model to compute the year-to-date total of a numeric expression. It is commonly employed in measures for sales, revenue, or other cumulative metrics, using a date column from a date table.

The function evaluates the specified expression across dates up to the most recent date in the current

Syntax and arguments: TOTALYTD(expression, dates, [year_end_date], [filter]). expression is the numeric expression to aggregate (for example,

Examples: TOTALYTD(SUM(Sales[Amount]), 'Date'[Date]) returns the year-to-date total of Sales Amount using the calendar year. TOTALYTD(SUM(Sales[Amount]), 'Date'[Date],

Notes: Effective use of TOTALYTD requires a properly configured date table marked as a date table and

See also: DATESYTD, TOTALQTD, TOTALMTD.

filter
context,
or
up
to
an
explicitly
provided
end
date.
The
result
represents
the
sum
(or
other
aggregation)
from
the
start
of
the
year
to
that
date,
respecting
any
filters
applied
in
the
query.
SUM(Sales[Amount]));
dates
is
a
column
of
dates
from
a
date
table
that
covers
the
relevant
time
period.
year_end_date
is
an
optional
date
that
defines
the
end
of
the
fiscal
year
if
it
differs
from
the
calendar
year.
filter
is
an
optional
argument
to
apply
additional
filters
to
the
calculation.
DATE(2024,6,30))
computes
YTD
totals
assuming
a
fiscal
year
ending
on
June
30,
2024.
a
valid
relationship
to
the
fact
data.
It
is
available
in
Power
BI,
Excel
data
models,
and
SQL
Server
Analysis
Services.