Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

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

Basic filter tool does not work for certain values

msoysal
7 - 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

 

3 REPLIES 3
tom_montpool
12 - Quasar

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)
msoysal
7 - 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!

Steve314
6 - Meteoroid

I just changed data type from double to fixed decimal, which solved the problem with the filter tool.

Labels
Top Solution Authors