Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Filter three consecutive days

luo
8 - Asteroid

Hi Everyone,

 

I would like to do a filter:

True: this id has more than 5 orders in any three consecutive days.

I can't think of how to check three consecutive days? Can anyone help me? Below is some example.

 

Order TimeOrder ID
2018-01-13 17:14:261
2018-01-14 18:52:471
2018-01-15 19:47:101
2018-01-15 22:18:011
2018-01-16 12:42:011
2018-01-17 15:48:381
2018-01-17 19:09:401
2018-01-13 17:14:262
2018-01-14 18:52:472
2018-01-15 19:47:102
2018-01-15 22:18:012
2018-01-15 12:42:012
2018-01-17 15:48:382
2018-01-17 19:09:402

 

Please notice that althogh Order ID 2 has 5 orders in 0115 and 0117, It will be false because no order in 0106. That is not three consecutive days. Acutally I already filtered the 0 order date. Just a reminder. 

So what I want for the output would be:

 

Order TimeOrder ID
2018-01-15 19:47:101
2018-01-15 22:18:011
2018-01-16 12:42:011
2018-01-17 15:48:381
2018-01-17 19:09:401
2018-01-13 17:14:262
2018-01-14 18:52:472
2018-01-15 19:47:102
2018-01-15 22:18:012
2018-01-15 12:42:012
3 REPLIES 3
Qiu
20 - Arcturus
20 - Arcturus

@luo 

For ID 1, we should take the newest 3 consecutive days, since it is consecutive from 0113 to 0117.

luo
8 - Asteroid

@Qiu Sorry for the misunderstanding. total amount of orders of 0113, 0114, 0115 is not equal or more than 5. So it will not be considered as true. 

CharlieS
17 - Castor
17 - Castor

I agree with @Qiu that there seems to be a bit of discrepancy between your described logic and provided output. 

 

To produce your output I interpreted your logic as: only take the LAST 3 sequential days of records. Following this I am able to produce your desired output and have attached the workflow.

 

Check it out and let me know if you have any questions on how this works. 

Labels