Hello,
i have 2 input files
TABLE1
| USED_DATE | PARENT_DEVICE_ID |
| 5/17/2018 13:09:48+00:00 | ID1 |
| 5/20/2018 15:09:48+00:00 | ID2 |
| 5/17/2018 11:09:48+00:00 | ID3 |
| 5/14/2018 19:09:48+00:00 | ID1 |
| 5/22/2018 18:09:48+00:00 | ID2 |
| 5/17/2018 14:09:48+00:00 | ID1 |
TABLE2
| CHILD_DEVICE_ID | PARENT_DEVICE_ID |
| ID1_1 | ID1 |
| ID1_2 | ID1 |
| ID1_3 | ID1 |
| ID1_4 | ID1 |
| ID2_1 | ID2 |
| ID2_2 | ID2 |
| ID3_1 | ID3 |
| ID3_2 | ID3 |
i would like to create loop which can check if each CHILD_DEVICE_ID from TABLE 2 is used more than once in TABLE 1 in the previous 7 days. Final results should look like this
| USED_DATE | PARENT_DEVICE_ID | prev_7_days_used_flag |
| 5/17/2018 13:09:48+00:00 | ID1 | 1 |
| 5/20/2018 15:09:48+00:00 | ID2 | 1 |
| 5/17/2018 11:09:48+00:00 | ID3 | 0 |
| 5/14/2018 19:09:48+00:00 | ID1 | 1 |
| 5/22/2018 18:09:48+00:00 | ID2 | 1 |
| 5/17/2018 14:09:48+00:00 | ID1 | 1 |
Is it possible to do something like this in alteryx? Thank you