I'm working on some DAX query relying on a date difference. My FILTER seems to be working in most cases except when the month of @StartDate is higher than the month of @EndDate.
Here is the query :
, FILTER
(
VALUES('Date'[Report Date]),
'Date'[Report Date] >= FORMAT(DATE("2021","09", "01"), "dd.mm.yyyy") //Start Date
&& 'Date'[Report Date] <= FORMAT(DATE("2022", "08", "01"), "dd.mm.yyyy") //End Date
)
I am not sure why this is designed to work like that. I would expect it to take every date between 09-2021 & 08-2022.
On the other hand, if I replace @Startdate with a month that is lower than @EndDate's month, it works as expected.
Should I not use >= / <= for this kind of operation ?
Thank you for your help