IF/AND filtering statements
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I have a large dataset which I need filtered in the following manner:
If "Column C" has data, AND "Column G, H, or I show any data in the same row - keep the data
If "Column C" has data, AND "Column G, H, or I have no data/show null - remove the row
If "Column C" has no data - no action - keep the data
My apologies, this is hour 10 into Alteryx (and I am hooked).
I have successfully filtered based on *specific* outputs; however the values in these fields is not known and may not align with each-other.
Solved! Go to Solution.
- Labels:
- Reporting
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@JoshuaElphee
I interpreted as the only cretiria to remove data is as below
If "Column C" has data, AND "Column G and H and and I have no data/show null - remove the row
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you Qiu, In reading the code provided, it appears as though this would simply keep all rows which have data in each column. I failed to clarify; if there is no data in column C, I must keep the row; however if there is data in column C, I need to keep the row if Column G OR Column H, OR Column I have data.
I believe I could accomplish this with an additional Isnull statement, a few parenthesis, and changing the second half to "OR" statements?
Thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @JoshuaElphee , think this should work. Put this in a filter tool and use the 'TRUE' anchor. Hope it helps!
(
!IsNull([C])
AND
(
!IsNull([G])
OR
!IsNull([H])
OR
!IsNull([I])
)
)
OR
IsNull([C])
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you! This worked perfectly.
I hope to pay the assistance forward as I learn more.
