I have tested a filter by condition but is not working. I do [COLUMN] > 10000
I have column with transformed to numbers but I always get errors.
"Condition must evaluate to either TRUE or FALSE. However in row #768501 it’s: #Incomparable values for ‘>’. "
I have also tried to exclude the empty cells but it is not working.
When I look at the metadata it says “Number with two decimals”. How can I remove the second decimal ?
I am not seeing the second decimal.
What am I doing wrong ?
This error occurs when one of the compared values is an error, or empty (null), or a boolean.
Can you please attach a screenshot of the value of [COLUMN] in row #768501. Preferably with the metadata window visible.
Below you can find the cell on that row.
It has an empty value.
I must say that the data origininally comes from an excel file. I have transformed it to a CSV and then loaded it in easymorph. The data was “dirty” in the sense that sometimes there were currency symbols (€) en sometilmes there was a thousand separator (komma). The decimal separator was always a point.
To remedy this, I have replaced the currence symbols using the table wide replace. I also replace the kommas using a table wide replace. When I look at the data after it was just imported It was already considered a number with 2 decimals. I have also added picture with a non empty cells so that you can see the data type.
The column was also transformed from text to number after I cleaned the data.
Empty values (nulls) can’t be used in comparisons because there is no value. If you still need to do the filtering on a column with non-numbers (e.g. empty values) you need to instruct EasyMorph explicitly if it should keep or remove rows with non-comparable values, so that the filtering expression always evaluates to only either TRUE or FALSE, not matter what. For instance, the filtering expression can be as follows:
if( isnumber([TEST]), [TEST] > 1000, false())
In this case, filtering will be defined by a result of
[TEST] > 1000 for numbers, while for not numbers it will always be FALSE which means that not numbers will be always removed as a result of filtering.
Expressions that must only evaluate to either TRUE or FALSE are called conditions and are used in several actions in EasyMorph:
- Filter by condition
- Halt on condition
- Trim by condition
Thanks, I shall give it a try !