community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
SOLVED

Check if sum in rolling 24 hour period exceeds value

Highlighted
Meteoroid

Hi community,

 

I have the purchase details for a number of accounts in the following format:

 

AccountIDPurchaseDateTimePurchaseAmount
123456782018-10-01 08:10:1560
123456782018-10-01 18:52:3440
123456782018-10-02 14:45:0115
123456782018-10-03 01:31:0620
123456782018-10-03 05:25:5515
123456782018-10-03 13:06:1560

 

I need to check if any of the accounts exceeded more than a certain amount, eg. £100 in purchases in any rolling 24 hour period.

 

I've looked around at related posts here in the community and tried approaches involving Tile, Multi Row Formulas and the Moving Summarize tool from AdamR but haven't managed to get my head around it so far. 

 

Would be very grateful if anyone could point me in the right direction with this!

 

Thanks in advance

Quasar

Hi @paul_f

 

Here is an initial solution for you. To solve this one, I think that a macro will be best. It can go transaction by transaction to compare it to all other data and determine what transactions occurred 24h before.

 

Let me know what you think.

 

Cheers

Kat

Fiddly.

2018-10-31_15-45-29.png

 

My solution is to create a running total

Then use an iterative macro to join to start of window point (first point after 24 hours ago)

Then you can compute the difference between totals at start and end (avoiding removing first point).

 

Sample attached to look at.

 

Meteoroid

A very big thanks to both of you for your time

Labels