Can anyone tell me why this filter is not working and how to fix it? I used a select tool to format the Invoice Date column as DateTime and I also tried it formatted as just Date
The invoice date column comes in formatted like this
2019-01-31
DateTimeYear([Invoice Date]) = 2019
AND
DateTimeMonth([Invoice Date]) = 01
or
DateTimeYear([Invoice Date]) = 2019
AND
DateTimeMonth([Invoice Date]) = 02
or
DateTimeYear([Invoice Date]) = 2019
AND
DateTimeMonth([Invoice Date]) = 03
Solved! Go to Solution.
Hi @barb_mooney
Here's a better version of your condition:
DateTimeYear([Invoice Date]) = 2019 AND DateTimeMonth([Invoice Date]) IN (1,2,3)
Or you could do this:
DateTimeYear([Invoice Date]) = 2019 AND DateTimeMonth([Invoice Date]) <= 3
Cheers,
Thanks! I used this option and it worked great
DateTimeYear([Invoice Date]) = 2019 AND DateTimeMonth([Invoice Date]) IN (1,2,3)
Your original code would have worked if you used more parenthesis
(DateTimeYear([Invoice Date]) = 2019
AND
DateTimeMonth([Invoice Date]) = 1)
or
(DateTimeYear([Invoice Date]) = 2019
AND
DateTimeMonth([Invoice Date]) = 2)
or
(DateTimeYear([Invoice Date]) = 2019
AND
DateTimeMonth([Invoice Date]) = 3)
But @Thableaus code is more concise.