Forum Discussion
kt3734
3 years agoFrequent Visitor
Year
Hi, I am trying to filter the date >=2021 , but the syntax below didn't work. Can you please help with this since I am new to DAX. FILTER ('Backlog','Backlog'(Year([Order Date])) >= 2021 Th...
djurecic
Super User
3 years agoHi kt3734 ,
Are you able to set your Order Date type to Date instead of text? That's what I would do.
Here is more information about the Year function.
https://learn.microsoft.com/en-us/dax/year-function-dax
When the date argument is a text representation of the date, the function uses the locale and date time settings of the client computer to understand the text value in order to perform the conversion. Errors may arise if the format of strings is incompatible with the current locale settings. For example, if your locale defines dates to be formatted as month/day/year, and the date is provided as day/month/year, then 25/1/2009 will not be interpreted as January 25th of 2009 but as an invalid date.