Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
Start Free Trial

Alteryx Designer Desktop Discussions

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

How to pick all the data between two rows

amsrivastava
6 - Meteoroid

Hi Folks,

 

I have a data as shown below:

 

Col ACol BFlag
ABCAS 
XCVS1
SDFASA 
2323 
r41

 

Note :

1. Here number of columns can be any, i,e. Col A, Col B , Col C etc.; number of columns are dynamic.

2. Flag column is fixed.

3. Flag will have value as 1 in any 2 rows always. 

 

I need to pick all the rows where FLAG=1 , i.e in above e.g. all the rows where text highlighted as RED.

 

So, basically, wherever there are two occurrences of Flag=1 in the data, I need to pick all the rows between those rows.

 

Thanks

Amit

 

 

2 REPLIES 2
BRRLL99
11 - Bolide

this is your expected output ??

 

XCVS1
SDFASA 
2323 
r41

 

you need to Fill down the flag column

 

use multi row formula and then add filter = 1

 

IF IsNull([flag]) or ISEMPTY[[flag])
THEN [Row-1:flag]
ELSE [flag]
ENDIF

Qiu
21 - Polaris
21 - Polaris

@amsrivastava 
I was trying the multi-row formula but it did not work for me. 
So I assign the record ID to each row then find the Row numbers for the flag rows.
Then filter out the rows in between.

0527-amsrivastava.png

Labels
Top Solution Authors