In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests after December 31, 2025. Set up your security questions now so you can recover your account anytime, just log out and back in to get started. Learn more 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