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.

Removing rows where at least one field = 0

insomned
8 - Asteroid

Hello, 

 

I would like to remove rows, where at least one of the fields contains 0. 

 

How would it be possible to achieve this? 

 

Thanks a lot! 

3 REPLIES 3
Christina_H
14 - Magnetar

How many fields are you checking for zeros?  Two options in the attached, either a straight filter checking each individual field if there aren't too many, or a transpose to check all at once.  The browses contain the filtered rows without any zeros.

Christina_Hurrell_0-1632999516263.png

 

atcodedog05
22 - Nova
22 - Nova

Hi @insomned 

 

Here is how you can do it.

Workflow:

atcodedog05_1-1632999534303.png

 

1. Using record id tool to set row id.

2. Using transpose tool to convert columns to rows.

3. Filter row if its 0. This way it will give record id which has zero value.

4. Using join tool to join on record id. Unjoined record id gives the rows with no zero values.

 

Hope this helps : )

Nanoq
8 - Asteroid

I assume we talk of an infeasibly large number of rows to make a filter that goes "[1]=0 or [2] =0 or ....."

in that case it is a bit finickey, i have made an example workflow that you realy should check out, but the idea is that you make a logic for each field to check if it 0, and assigns it a different value than the rest if it is. then you can transpose, and sum the now-columns, filter those and then join back on the original data...

let me know if it doesnt do the right thing, or you have any questions

Capture.PNG

Labels
Top Solution Authors