Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Filter the records based on condition

Ekta
8 - Asteroid

Hi All, 

 

Doesn't seems too tough but i am unable to get the correct formula, Any help will be highly appreciated,

 

Fieldvaluegroup
qqqqqqq1111
Apple2221
aaaa3332
ddddd4442

 

i would like to filter the records based on condition - 

if Field contains Apple then filter all the records ie group 1 and 2

but if Field does not contains Apple then only filter group = 1

 

output if Field contains apple                        

                                                 

Fieldvaluegroup
qqqqqqq1111
Apple2221
aaaa3332
ddddd4442

 and if Field does not contain apple the output is 

                              

FieldValuegroup
qqqqqqq1111
Apple2221

 

 

Regards

2 REPLIES 2
atcodedog05
22 - Nova
22 - Nova

Hi @Ekta 

 

Interesting scenario. Here is how you can do it.

 

Workflow:

atcodedog05_0-1625829940273.png

1. Using formula check if field contains apple and creating a flag.

2. Using summarize taking max of flag. If any row contains apple then flag 1.

3. Using append tool to add this column to data.

4. In filter tool checking either [contains apple]=1 or [group]=1

 

Please check the output. I have creates 2 scenarios with and without apples

 

Hope this helps 🙂

Ekta
8 - Asteroid

@atcodedog05 Thank you so much , this is perfect:)

Labels
Top Solution Authors