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.
SOLVED

Filtering out adjacent rows with values

45179902
8 - Asteroid

Question 1:

Use multi-row formula to fill down just one row.

 

Question 2:

I have a table looks something like this in my workflow:

Record ID12345
1B2321321321321    
223472343241234234213432423432411234324
3     
4B1234324324234    
5     
6B13324234234324    
71231432423412343243213423423132432423234324234
8     
9B12432421342342    

 

I'm trying to get the adjacent rows with values. For example, records 1 and 2 are adjacent and both have values; similarly, records 6 and 7 are adjacent and have values in both. I want to extract all the rows like these.

5 REPLIES 5
AngelosPachis
16 - Nebula

Hi @45179902 ,

 

Maybe this workflow answers your question? Not sure what you wanted to achieve in Q1, which row you wanted to fill down. Is it Record 4?

 

AngelosPachis_0-1641980066270.png

 

Christina_H
14 - Magnetar

When you talk about adjacent values are you just looking at column 1?  So you would want to include the rows even if the rest of the columns were blank?  If so, this will do it:

Christina_H_0-1641980309619.png

 

45179902
8 - Asteroid

I have actually solved the problem myself! First reverse order the rows, then fill down column 2 to fill the B######## rows, then use Filter to filter out the rows with non-empty column 2.

45179902
8 - Asteroid

@Christina_H Hi Christina, I'm talking about adjacent rows, not values. In the example, rows 1 and 2 are "adjacent" because there's no empty row between them, and both of them have values in side. They're not empty rows either.

Christina_H
14 - Magnetar

@45179902 From your description I had come up with 3 different ways to answer your question depending on what exactly you meant.  The version I went for filtered out adjacent rows with values in column 1 regardless of the other columns.  The others were looking for adjacent values in column 1 and a value for at least one of them in column 2 and returning the rows as they appear in the input, and looking for the same rows but copying the values into the blank row of each pair.

 

If you've found your own solution though, that will definitely do what you want it to!

Labels