Hello!
I am trying to replicate an excel formula to determine the number of times a caller calls within 4 days, 3 days, 2 days, and 1 day. I would like to create a field for each of these time windows. If someone calls 6 times within 4 days, I would like the 6th call to have the number 5 in it in the "4 day window" flag.
The excel formula I am trying to replicate says this:
=COUNTIFS($D$1:D10,$D10,$A$1:A10,"<="&A10,$A$1:A10,">"&INT(A10)-4)
where D is the ANI and A is the date. The -4 at the end is for the 4 day time window field, and that number changes for each time window field. I selected row 10 as an example. In each row, the formula is selecting the current row and the rows above it.
This will be determined by the field 'ANI' (essentially phone number), and 'Date', to determine the date range. Each row signifies one phone call. I do also have timestamp as a field as well. I have tried to achieve this in Magic ETL by utilizing rank and window, MySQL (the version Domo uses does not support 'Partition' and 'Over'), and beastmode, to no avail. Any ideas on how to achieve this?