community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
SOLVED

Basic filter tool does not work for certain values

Meteor

Hello,

 

I have a table that consists of 10 records and 6 columns. I just noticed that a simple filter I apply does not work for some values. I am not sure what I am missing.

I simply want to filter out the records for containing values in the “Metric1_Ratio” column.  This column is a numeric field -“double” and the containing values are in 2 decimals.

The filter does not work for values of 0.47, 0.57 and , 0.69 but works for the rest. I am so curious to know the reason for that.

I have built some workflows with more complex filters before, but this is something I experience the first time.   

Thank you for your help.

 

Attached are the data, metadata and the workflow:

 

Data_Visual.png

 Metadata_Visual.png

 

ACE Emeritus
ACE Emeritus

I suspect that your problem is that the field you are filtering on is formatted as Double. This means that even though Alteryx is 'displaying' 0.47, this isn't the actual value in the table.

 

This is why you see the warning "Joins on Double or Float are not recommended due to rounding error." if you specify a Double field in a Join operation.

If you put this syntax in a Filter tool, I think it would do what you want:

 

CompareEpsilon(0.47, [Metric1_Ratio], 0.001)
Highlighted
Meteor

Wow, it worked beautifully. Thank you!

During my research following your solution, I also found out CompareDigits. It appears to be similar in nature...

 

If I rather change the datatype in the first place, would it be an easier solution? If so, what data type would you suggest?

 

Thank you!

Labels