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
| ID | Event | B Count |
| 1 | Attach | 1 |
| 1 | Detach | 1 |
| 1 | Attach | 1 |
| 1 | Detach | 1 |
| 2 | Attach | 4 |
| 2 | Attach | 5 |
| 2 | Attach | 5 |
| 2 | Detach | 5 |
| 2 | Detach | 5 |
| 3 | Attach | 100 |
| 3 | Detach | 100 |
| 3 | Attach | 101 |
| 3 | Detach | 101 |
Expected output
| ID | Event | B Count |
| 1 | Attach | 1 |
| 1 | Detach | 1 |
| 1 | Attach | 1 |
| 1 | Detach | 1 |
| 3 | Attach | 100 |
| 3 | Detach | 100 |
| 3 | Attach | 101 |
| 3 | Detach | 101 |
Solved! Go to Solution.
