Home » Microsoft » DA-100 v.2 » Which DAX expression should you use?
You need to create a calculated column to display the month based on the reporting requirements.
Which DAX expression should you use?
A. FORMAT(‘Date’Saturday 20th of April 2024, “MMM YYYY”)
B. FORMAT(‘Date’ Saturday 20th of April 2024, “M YY”)
C. FORMAT(‘Date'[date_id], “MMM”) & – & FORMAT(‘Date’2024, “#”)
D. FORMAT(‘Date’ [date_id], “MMM YYYY”)
Correct Answer: A
Explanation/Reference:
Explanation:
Scenario: In the Date table, the date_id column has a format of yyyymmdd. Users must be able to see the month in reports as shown in the following example: Feb 2020.
Incorrect Answers:
B: The output format should be “MMM YYYY” not “M YY”
C, D: The data_id is an integer and not a Date datatype.
Reference:
https://docs.microsoft.com/en-us/dax/format-function-dax
https://dax.guide/format/