Alert: There is a planned Community maintenance outage October 16th from approximately 10 - 11 PM PST. During this time the Alteryx Community will be inaccessible. Thank you for your understanding!

Alteryx Designer Desktop Discussions

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

IF/AND filtering statements

JoshuaElphee
8 - Asteroid

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.

4 REPLIES 4
Qiu
21 - Polaris
21 - Polaris

@JoshuaElphee 
I interpreted as the only cretiria to remove data is as below

If "Column C" has data, AND "Column G andand and  I have no data/show null - remove the row

0428-JoshuaElphee.PNG

JoshuaElphee
8 - Asteroid

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!

FinnCharlton
13 - Pulsar

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])

 

JoshuaElphee
8 - Asteroid

Thank you!  This worked perfectly.

 

I hope to pay the assistance forward as I learn more.

Labels