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 agokt3734
3 years agoFrequent Visitor
Thank your for your reponse. I got the error below, the reason is the column order date is text (2/3/2021 9:00:00 AM)
DAX comparison operations do not support comparing values of type Integer with values of type Text. Consider using the VALUE or FORMAT function to convert one of the values.
my order date from the table is this format: 2/3/2021 9:00:00 AM, I want to get
year(order date) = 2021
and date format: 2/3/2021
I try both below but didn't work. Can you show me how to get the correct syntax below?
FILTER ('Backlog',YEAR('Backlog'([Order Date])) >="2021"
FILTER ('Backlog',DATEVALUE('Backlog'([Order Date])) >="1/1/221"