YTD Sales (Fiscal Calendar)

Maybe your requirement is slightly more complex, and you need to see the year-to-date sales based on your fiscal year end rather than the calendar year end date. The TOTALYTD function has an optional parameter that allows you to change the default year end date from "12/31" to a different date. Create a new calculated measure on your Internet Sales table using the following DAX formula:

Fiscal YTD Sales = TOTALYTD([Total Sales], 'Date (Order)'[Date], "03/31")

Now, let's take a look at both of these new measures in a table in Power BI:

Figure 17-Both the new measure in a table

The newly created measures YTD Sales ...

Get Microsoft Power BI Quick Start Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.