Hi
I'm quite new to Alteryx and recently I have identified a strange behavior using the Filter Tool:
It seems like filtering on two different fields with OR and using Does Not Equal operator aren't working. But it works when I just use the Equal operator. Is anyone able to give me an explanation to this case? Moreover is there an elegant way to solve this problem?
Kind regards
Jay
Solved! Go to Solution.
Hey @JayKim
What is the final output you are looking for?
Part time Tableau, Part Time Alteryx. Full Time Awesome
Hi @JayKim,
It seems the filter you have applied is completely fine..let me explain for the first one :
Department!="A" or Status!="on". in this query it first returned B&C and then for status!=on it returned as A(222) having "Off" status. After first criteria the data gets filter out then it applies the other criteria on the remaining .
Same is the case with equal to query. If you want to restrict the output basis on both the criteria then you should apply "AND" operator.
Thanks,
Vishwa
@LordNeilLordwrote:Hey @JayKim
What is the final output you are looking for?
Part time Tableau, Part Time Alteryx. Full Time Awesome
Actually I'm more interested in an explanation why the combination of the Filter Tool, OR, Does Not Equal is not working. I suppose to work with only the True-result set and not with the exluded result set.
So using [Department] != "A" OR [Status] != "on" I would expect only one data set like the following:
PersID: 4444 / Department: C / Status off
@vishwa_0308 is correct, the filter is working as expected. The OR statement allows records where either condition is met. In your example data, PersID 3333 and 4444 have departments that != "A", and PersID 2222 has a status that != "on", so all three records met at least one of the conditions and all three get through the filter. It sounds like you're looking to filter based on both criteria, which requires an AND statement. If you change the OR to an AND it will filter down to just the record you identified:
Seems like I had a dense moment. Thank you @danrh @vishwa_0308
User | Count |
---|---|
18 | |
14 | |
13 | |
9 | |
8 |