Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
Start Free Trial

Alteryx Designer Desktop Discussions

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

Count occurences of unique id over 30 minutes and reset

svawser
5 - Atom

Hello,

 

I'm stuck on how to create a workflow where the counter resets after a certain time period.  I have the attached workflow and it does a decent job.  I use the second multi-row formula as my time limiter.  However, it doesn't seem to stop counting and restart after the limit. 

 

Ultimately what I'm trying to accomplish is to be able to look at the business cards that made a purchase at home depot and find which cards are used to make a certain number of purchases in a certain time frame.  For example, I'd like to know which card number made more than 3 purchases at homedepot.com in 20 minutes.  However, I may also want to know which made more than 3 in a 24 hour time frame.  I need the flexibility to modify both the count and the time frame I'm looking for.

 

Any help is much appreciated.


Steve

6 REPLIES 6
patrick_mcauliffe
14 - Magnetar
14 - Magnetar

Hey, I think I'm following what you need.  Some sort of flag/grouping indicator, right?

 

Take a look at the attached.

svawser
5 - Atom

Hi Patrick,

 

This looks close.  I do need to see the count of the activity in the timeframe in the output.  For example, I'd want to know that these 3 cards had >3 transactions in 20 minutes or 30 minutes and see the count of activity within the timeframe.  I also need the counter to reset within the specified time period so that if card number 1234 has 2 within 30 minutes and then 2 hours later made another 2 purchases back to back, it would show in the output results.

 

My existing workflow is pretty close to what I need, the trouble I'm having is how do I tell alteryx to stop counting after the specified time period and restart counting within the multi-row formula.

 

thanks,

 

Steve

Tyro_abc
11 - Bolide

I think I understand the problem now, let me try..

 

patrick_mcauliffe
14 - Magnetar
14 - Magnetar

I might be missing something then because I couldn't get the workflow to run with the xlsx source file.

It was missing all sorts of fields. 
What am I not seeing?

 

Tyro_abc
11 - Bolide

Sorry for being late and not sure if you already got a solution.  If not, please check attached workflow.  I changed few data points for easier testing, please check with your data and let me know if it helps. 

 

Basically what I did is, sorted all transactions by credit card and time of transaction and then put them into different group based on cumulative elapsed time from my starting point and then just counted how many group we have. You can filter the result based on count and also change the cumulative minutes i used in second and third multi-row tool ( I used 20 minutes). 

 

arundhuti726_0-1612401090353.png

 

Also attached modified version of the excel.

 

Regards

Arundhuti

 

svawser
5 - Atom

Thank you, that helps!

Labels
Top Solution Authors