Complete the code to create a year level in the date hierarchy.
DATETRUNC('[1]', [Order Date])
DATETRUNC with 'YEAR' truncates the date to the year level, which is the top level of the date hierarchy.
Complete the code to extract the quarter from the date.
DATEPART('[1]', [Order Date])
DATEPART with 'QUARTER' extracts the quarter number (1 to 4) from the date.
Fix the error in the code to get the month name from the date.
DATENAME('[1]', [Order Date])
DATENAME with 'MONTH' returns the full month name (e.g., January).
Fill both blanks to create a calculated field that checks if the day of the week is Monday.
DATENAME('[1]', [Order Date]) = '[2]'
DATENAME with 'WEEKDAY' returns the day name. Comparing it to 'Monday' checks if the date is a Monday.
Fill all three blanks to create a calculated field that checks if the date is in 2023 Q2.
YEAR([Order Date]) = [1] AND DATEPART('[2]', [Order Date]) = [3]
This expression checks if the order date is in year 2023 and in the 2nd quarter.