nerdexam
Microsoft

PL-300 · Question #83

You have a Power BI model for sales data. You create a measure to calculate the year-to-date sales. You need to compare the year-to-date sales with the previous year for the same time period. Which…

The correct answer is C. DATESYTD. DATESYTD returns a table of dates from the start of the year to the current date in context. To compare the current YTD with the prior year's equivalent period, you use CALCULATE with DATESYTD wrapped around DATEADD (e.g., CALCULATE([Sales], DATESYTD(DATEADD(Date[Date], -1…

Submitted by ricky.ec· Apr 18, 2026Model the data

Question

You have a Power BI model for sales data. You create a measure to calculate the year-to-date sales. You need to compare the year-to-date sales with the previous year for the same time period. Which DAX function should you use?

Options

  • ADATEADD
  • BTOTALYTD
  • CDATESYTD
  • DENDOFYEAR

How the community answered

(45 responses)
  • A
    7% (3)
  • B
    13% (6)
  • C
    76% (34)
  • D
    4% (2)

Explanation

DATESYTD returns a table of dates from the start of the year to the current date in context. To compare the current YTD with the prior year's equivalent period, you use CALCULATE with DATESYTD wrapped around DATEADD (e.g., CALCULATE([Sales], DATESYTD(DATEADD(Date[Date], -1, YEAR)))). TOTALYTD aggregates a value over YTD but does not shift the period. DATEADD alone shifts dates but doesn't constrain to YTD. ENDOFYEAR simply returns the last date of the year.

Topics

#DAX#Time Intelligence#Year-to-date (YTD)#Previous Year Comparison

Community Discussion

No community discussion yet for this question.

Full PL-300 Practice