Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Remove Rows if no data after a specified column

facundovl
5 - Atom

Hi, 

 

I have a table where the first 4 Columns will always contain descriptive information, then columns will have numbers on different rows depending on the descriptive information. The amounts of columns will data, will vary every single time. I want to remove any row that doesn't contain any information AFTER the fourth column. 

Any thoughts on how to achieve this? see below example

 

LineCodeDescriptionLine_CodeData 1Data 2Data 3Data 4
1aasd1_a5 116
2cxyz2_c    
3fdef3_f4 10 
4gghi4_g 8 -9

 

I this case, row 2 would have to be removed. 

 

Thanks!

6 REPLIES 6
atcodedog05
22 - Nova
22 - Nova

Hi @facundovl 

 

Use this formula in filter

 

 

!IsEmpty([Data 1]) or 
!IsEmpty([Data 2]) or 
!IsEmpty([Data 3]) or 
!IsEmpty([Data 4])

 

Workflow:

atcodedog05_0-1604684975441.png

 

Use a data cleansing if you have spaces in the blank cells

 

Hope this helps 🙂


If this post helps you please mark it as solution. And give a like if you dont mind 😀👍

 

AngelosPachis
16 - Nebula

Hi @facundovl ,

 

This is the way that crossed my mine. Essentially you check if all the values in a row are null after transposing that row, and then you use the join tool as a filter

 

Screenshot 2020-11-06 175251.jpg

 

Hope that helps,

 

Regards,

 

Angelos

 

facundovl
5 - Atom

Hi @atcodedog05 Thank you so much for your response. 

 

I thought about this solution, but my problem is that my workflow will change the amounts of columns it has in different scenarios, and want to find a way to automatically check all the columns after the fourth one. If not any time a new column with data comes in, I will have to manually update the flow. 

 

Thanks

facundovl
5 - Atom

@AngelosPachis

 

Thanks for your response. I thought about this, but the problem is that I also need my columns on a specific order (coming with different sources and different names), but when I Cross Tab the result my columns get rearranged. 

 

Thanks. 

atcodedog05
22 - Nova
22 - Nova

Hi @facundovl 

 

Understandable

 

Here is a workflow for the task. It handles columns dynamically

Workflow:

atcodedog05_0-1604686055403.png

 

Hope this helps 🙂


If this post helps you please mark it as solution. And give a like if you dont mind 😀👍

atcodedog05
22 - Nova
22 - Nova

Hi @facundovl 

 

Here is a updated solution. It maintains order.

atcodedog05_0-1604686471889.png

 

I am taking reference from main data to maintain order

Labels