please help me to understand what is the reason of issue. I have very simple task - to read the text file with huge count of lines and cut it by condition of dates, in other words i want to select all lines from the file and keep only that is more than yesterday.
For this reason it was created the parametr {DATE} = format(today()-1,‘dd.MM.yyyy’). There is only 2 steps in the project:
read the file
filter by condition “[Sell-In End Date] > {DATE}”
In the result i have the error message Condition must evaluate to either TRUE or FALSE. However in row #1 it’s: #Incomparable values for ‘>’.
During the attempt to change the conditions the count of errors is change, that more strange for me. And fyi - it was working project before this issue.
the filtering doesn’t work because your expression compares two text values, instead of number dates. The > operator (“greater than”) can’t be applied to text values, only to numbers. Note that dates in EasyMorph are numbers, exactly as in Excel. See this tutorial article for more explanation on dates in EasyMorph: http://easymorph.com/learn/expressions.html
You can see that the values in columns [Sell-in Start Date] and [Sell-in End Date] are text because they are left aligned. By comparison columns [Serial No] and [Week ID] contain numbers, because values are aligned to the right.
Alternatively, you can also right-click a cell and view its type in the metadata window.
In order for the filtering expression to work correctly, text dates should be converted to number dates first. This can be done by either using the date() function, or Convert Data Types transformation (see the example below).
The expression for calculating the {DATE} parameter should be just
today()-1
without using format() because it converts the result to text and makes it incomparable with number dates.