DAX Function Guide
TOTALYTD
Sam McKay
CEO & Founder
How does the TOTALYTD work?
TOTALYTD Formula Syntax
TOTALYTD(
<expression>,<dates>[,<filter>][,<year_end_date>]
)
How do you use the TOTALYTD?
This function calculates the cumulative subtotals in a year, also allows us to apply filters and specify a year end date.
Related Blog Posts
Loading
Considerations when using the TOTALYTD?
The dates argument can be any of the following:
- A reference to a date/time column.
- A table expression that returns a single column of date/time values.
- A Boolean expression that defines a single-column table of date/time values.
The year_end_date parameter is a string literal of a date, in the same locale as the locale of the client where the workbook was created. The year portion of the date is not required and is ignored
Related Video Tutorials
Loading
Formula examples using the TOTALYTD
=TOTALYTD(SUM(InternetSales_USD[SalesAmount_USD]),DateTime[DateKey], ALL(‘DateTime’), “6/30”)
= TOTALYTD ( [SalesAmount], ‘Date'[Date], 2008 )
= TOTALYTD ( [SalesAmount], ‘Date'[Date], CROSSJOIN ( TREATAS ( { “Red” }, Product[Color] ), TREATAS ( { “United States” }, Customer[CountryRegion] ) ) )
Related Courses
Loading