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

Filter based on count of rows and pattern

shivraj_r
7 - Meteor

Hi All,

 

Below is a sample of my data set - 

What I'm trying to do is filter only those entries for within the B count where number of (attach) = Number (detach) and occurring consecutively - so for every attach there has to be a detach as the next event.I also want to keep the grouping by B count in the output. I'm struggling a little bit in terms of what function to use - I was thinking if there is function that would count the number of rows that would contain attach and detach and I could use a Mod function to output based on even number of events? I was also trying some form of logic with the mutli row formula but no luck so far! Thanks in advance!

 

 

Input 

IDEvent

B Count

1Attach1
1Detach1
1Attach1
1Detach1
2Attach4
2Attach5
2Attach5
2Detach5
2Detach5
3Attach100
3Detach100
3Attach101
3Detach101

 

 Expected output

IDEvent

B Count

1Attach1
1Detach1
1Attach1
1Detach1
3Attach100
3Detach100
3Attach101
3Detach101
1 REPLY 1
ponraj
13 - Pulsar

Here is the solution for your case. Hope it helps. 

 

WorkflowWorkflowResultsResults

 

Labels
Top Solution Authors