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.
SOLVED

Check if sum in rolling 24 hour period exceeds value

paul_f
6 - 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

4 REPLIES 4
kat
12 - 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

jdunkerley79
ACE Emeritus
ACE Emeritus

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.

 

paul_f
6 - Meteoroid

A very big thanks to both of you for your time

SWilson10
5 - Atom

What is the macro you have used here? I am trying to replicate this flow for some customer data analysis on total spend over a 24 hour period 

Labels