Hi All,
need help to get first n consecutive data . so far n=3 the query return 6,7,8 .
I have gone through similar kind of issue but not getting output.
https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Count-consecutive-days/m-p/81996
CustID | Status |
1 | Login Failed |
2 | Success |
3 | Txn Error |
4 | Login Failed |
5 | Login Failed |
6 | Txn Error |
7 | Txn Error |
8 | Txn Error |
9 | Login Failed |
10 | Login Failed |
11 | Login Failed |
12 | Login Failed |
13 | Txn Error |
14 | Success |
15 | Success |
Thanks
Sreeni
Solved! Go to Solution.
Hi @ysreenumba
Could you please detail this - "get first n consecutive data . so far n=3 the query return 6,7,8 ."
Cheers,
Hi @ysreenumba
I think this does what you're looking for
The first formula is where you specify N, in this case 3. Then add a Record ID. Reverse the list based on the record ID. Use a Multi-row tool to build up a list of sequences. Then filter on all the records where the sequence number = N. Get the Last one cause the list is reversed. Append this Found record ID to the original list. Restore the original order. Select the records from the Found record ID to Found+N.
The results are as follows
Dan