1. You are building a Power BI model for a financial services firm. You need to create a measure that calculates the running total of revenue from the start of the fiscal year to the current date. The fiscal year starts on April 1. Your Date table has a Date column and is marked as a date table. Which DAX approach is MOST appropriate?
- A. Use TOTALYTD with the year-end date argument set to '3/31': `Revenue YTD = TOTALYTD([Total Revenue], Date[Date], "3/31")`✓ Correct
- B. Use DATESYTD with a default calendar year: `Revenue YTD = CALCULATE([Total Revenue], DATESYTD(Date[Date]))`
- C. Use DATESBETWEEN from January 1 to the last date in context: `Revenue YTD = CALCULATE([Total Revenue], DATESBETWEEN(Date[Date], DATE(YEAR(TODAY()),1,1), LASTDATE(Date[Date])))`
- D. Use SAMEPERIODLASTYEAR to shift the date range back by one year: `Revenue YTD = CALCULATE([Total Revenue], SAMEPERIODLASTYEAR(Date[Date]))`
Explanation
TOTALYTD accepts an optional year-end date argument (as a string in MM/DD format). For a fiscal year ending March 31, specifying '3/31' correctly calculates the year-to-date total from April 1 through the current date in context. Option B is wrong — DATESYTD without the year-end argument defaults to December 31, which would produce a calendar YTD, not a fiscal YTD starting April 1. Option C is wrong — hardcoding January 1 calculates a calendar YTD and does not respect the fiscal year boundary. Option D is wrong — SAMEPERIODLASTYEAR shifts dates back one year and is used for year-over-year comparisons, not YTD calculations.