Alteryx Designer Desktop Discussions

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

I need to filter out the data with conditional statement

Bansi08
7 - Meteor

Hi All --- I have below sample table which i need to transform such a way so i can eliminate unwanted data. 

So using filter block and putting conditional statement i want to filter out only those rows which contain "My Name is 1", "Income", "Outcome" and "Total Pending" from column1 and also rows contains "Gross Income" , "Net Income" and "Tax" from column3, Column4 and Column5. Please advise me the solution. 

 

Column1Column2Column3Column4Column5
AllNullNullNullNull
NullNullNullNullNull
NullNullNullNullNull
NullNullNullNullNull
2023-03-31NullNullNullNull
NullNullNullNullNull
NullNullNullNullNull
NullNullNullNullNull
My Name is 1NullNullNullNull
NullNullNullNullNull
NullNullGross IncomeNet IncomeNull
NullNullNullNullTax
Income2023-01-3110000001000000Null
NullNullNullNullNull
NullNullNullNullNull
NullNullNullNullNull
OutcomeNullNullNullNull
NullNullNullNullNull
NullNullNullNullNull
Total PendingNull10000001000000Null
6 REPLIES 6
MilindG
12 - Quasar
Felipe_Ribeir0
16 - Nebula

-

Bansi08
7 - Meteor

Hi Thanks for solution. but would it be possible to use conditional statement here or any other way for filtration of the data as per requirement. Since my requirement is "i want to filter out only those rows which contain "My Name is 1", "Income", "Outcome" and "Total Pending" from column1 and also rows contains "Gross Income" , "Net Income" and "Tax" from column3, Column4 and Column5" from above table.

I am trying to avoid too many filter blocks for data filtration.

 

Bansi08
7 - Meteor

I am trying use this formula using actual column names but unable to filter out data as expected.

 
 
 

Contains([Column1], "My Name is 1") AND
Contains([Column1], "Income") AND
Contains([Column1], "Outcome") AND
Contains([Column1], "Total Pending") AND
Contains([Column3], "Gross Income") AND
Contains([Column4], "Net Income") AND
Contains([Column5], "Tax")

FinnCharlton
13 - Pulsar

Hi @Bansi08 , you are using AND operators in this statement. That means that data will only be filtered out if ALL of those statements are true, i.e. Column 1 contains 'My Name is 1','Income','Outcome' and 'Total Pending'.

 

I think you want to replace the AND operators with OR. This will filter out rows where ANY of these statements are true.

 

Hope this helps!

Bansi08
7 - Meteor

Thanks replacing AND with OR worked for me.

Labels