nerdexam
Microsoft

DP-500 · Question #65

You are building a Power BI dataset with a Calendar table and a calculated column pfFlag = IF ('Calendar'[Date] < TODAY(), "Past", "Future"). You need a measure for fiscal prior year-to-date for…

The correct answer is E. DATESYTD. To calculate a fiscal prior year-to-date measure for sales amount with a specific fiscal year end, the DATESYTD DAX function is the appropriate choice.

Implement and manage data models

Question

You are building a Power BI dataset with a Calendar table and a calculated column pfFlag = IF ('Calendar'[Date] < TODAY(), "Past", "Future"). You need a measure for fiscal prior year-to-date for [sales Amount], with a fiscal year end of June 30, producing no result for future dates. How should you complete the DAX expression, specifically the function for year-to-date calculation with fiscal year end '6/30/2022' from the provided options?

Options

  • ADATEADD
  • BFIRSTDATE
  • CPARALLELPERIOD
  • DSAMELASTPERIODLASTYEAR
  • EDATESYTD

How the community answered

(60 responses)
  • A
    5% (3)
  • C
    3% (2)
  • D
    2% (1)
  • E
    90% (54)

Why each option

To calculate a fiscal prior year-to-date measure for sales amount with a specific fiscal year end, the DATESYTD DAX function is the appropriate choice.

ADATEADD

DATEADD shifts a set of dates by a specified interval and is not designed for year-to-date calculations.

BFIRSTDATE

FIRSTDATE returns the first date in the current filter context and is not used for aggregating year-to-date values.

CPARALLELPERIOD

PARALLELPERIOD returns a set of dates in a parallel period to the given set of dates, suitable for comparisons but not for year-to-date aggregation.

DSAMELASTPERIODLASTYEAR

SAMELASTPERIODLASTYEAR returns a set of dates in the previous year of the same period, but it does not support custom fiscal year ends for YTD calculations.

EDATESYTDCorrect

DATESYTD (Dates, [YearEndDate]) calculates the year-to-date over the given set of dates, allowing for a specified fiscal year end, which directly matches the requirement for 'fiscal prior year-to-date' with a June 30 fiscal year end.

Concept tested: DAX DATESYTD fiscal year-to-date calculation

Source: https://learn.microsoft.com/en-us/dax/datesytd-function-dax

Topics

#DAX#Time Intelligence#Fiscal Year#Measures

Community Discussion

No community discussion yet for this question.

Full DP-500 Practice