nerdexam
Microsoft

DP-500 · Question #66

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 A. "Future". To ensure the measure produces no result for future dates, the DAX expression should filter or check the pfFlag column to exclude or handle "Future" values from the calculation context.

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 value for the Calendar'[pfFlag] filter, to produce no result for future dates?

Options

  • A"Future"
  • BNOW()
  • C"Past"
  • DTODAY()

How the community answered

(39 responses)
  • A
    72% (28)
  • B
    5% (2)
  • C
    8% (3)
  • D
    15% (6)

Why each option

To ensure the measure produces no result for future dates, the DAX expression should filter or check the `pfFlag` column to exclude or handle "Future" values from the calculation context.

A"Future"Correct

The `pfFlag` column marks future dates as "Future"; therefore, to produce no result for future dates, the measure's logic must specifically handle the "Future" value, typically by returning BLANK() or filtering out dates where `pfFlag` is "Future".

BNOW()

NOW() returns the current date and time, which is not a valid filter value for the string `pfFlag` column.

C"Past"

"Past" is the value for dates before today; filtering by "Past" would include historical data, not exclude future data.

DTODAY()

TODAY() returns the current date, which is not a valid filter value for the string `pfFlag` column.

Concept tested: DAX filtering for date flags

Community Discussion

No community discussion yet for this question.

Full DP-500 Practice