Complete the code to filter data for the year 2023.
IF YEAR([Order Date]) = [1] THEN 'Include' ELSE 'Exclude' END
The filter checks if the year of the Order Date is 2023 to include the data.
Complete the code to filter data for dates after January 1, 2023.
IF [Order Date] > DATE('[1]') THEN 'Include' ELSE 'Exclude' END
The filter includes dates strictly after January 1, 2023, so the date used is '2023-01-01'.
Fix the error in the code to filter data for the current month.
IF DATETRUNC('month', [Order Date]) = DATETRUNC('month', [1]) THEN 'Include' ELSE 'Exclude' END
TODAY() returns the current date without time, which works well with DATETRUNC for month comparison.
Fill both blanks to filter data between January 1, 2023 and December 31, 2023.
IF [Order Date] >= DATE('[1]') AND [Order Date] <= DATE('[2]') THEN 'Include' ELSE 'Exclude' END
The filter includes dates from January 1, 2023 to December 31, 2023 inclusive.
Fill all three blanks to filter data for the last 7 days including today.
IF [Order Date] >= DATEADD('day', -[1], [2]) AND [Order Date] <= [3] THEN 'Include' ELSE 'Exclude' END
The filter uses DATEADD to go back 7 days from today and includes dates up to today.