We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Group based on contains text in one column field

robert_derubeis
7 - Meteor

Hi,

I have one column (field_1) that I need to be able to group based on a row containing "started running" and ends with containing "finished".

I need to group all the rows- from "start" to "finished" and all rows in between together as one assigned group- (based on the highlighted colors below). I tried using the "Generate Rows" tool, but couldn't get it to work on a string field and a Contains("started running").

Below is an example of the data format, where "text" is just a lot of additional text in my file that is all different.

 

****************************start******************
field_1
started running.... some additional text text
text, text, text
text text
text
text
text
text
text
text
text
text
text
text
text
Finished in.... added text text
started running.... more text text
text
text
text
text
text
text
text
Finished in.... more text text
started running.... add text text
text
text
text
text
text
Finished in.... some more text text
started running.... text text
text
text
text
text
text
text
Finished in.... text text
****************************end******************

Thanks,
Bob

3 REPLIES 3
binuacs
21 - Polaris

@robert_derubeis one way of doing this with the multi-row tool

image.png

abe_ibanez
9 - Comet

Hello, 

Instead of using the generate rows tool, I would recommend using the multi-row tool. 

if Contains([Field1], 'started running') then [Row-1:Group] + 1
else [Row-1:Group] endif

Screenshot 2025-04-30 145635.png

 

robert_derubeis
7 - Meteor

That's perfect, exactly what I was looking for!  Thank you!

Labels
Top Solution Authors