Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

How to create a running total for multiple samples

joesparty
8 - Asteroid

Hello!

 

I'm working on a project that requires me to calculate a running total for multiple tests. I'm not sure how to use the Multi-Row Formula tool to update the running total without exceeding 5% of the total population. I have attached a table that shows what I want to achieve.  Note Test 6 results of 10% would exceed the remaining records to sample from.

 

Do I need to use Control Containers to make sure the running total is updated correctly? Any guidance or suggestions would be appreciated.

 

Cheers!

5 REPLIES 5
CoG
14 - Magnetar

Do you need help calculating the "Updated Total"? Is the image you shared your desired output? What information do you start with and what do you need to calculate. It does sound like the Multi-Row Formula Tool is going to be what you need to use. A little more information will go a long way toward making sure that you receive the appropriate assistance!

joesparty
8 - Asteroid

@CoGyes I would need help with the updated total.  The image is the desired output, I start with a file of about 127k records and I don't want the total number of records sampled to be over 5%, so a max of 6,350. 

 

Each test uses the total population file.  Each time I run a test I want to sample a percentage and then update the running total.  For the last test in the list the sample can't be more that the running total.

 

I'm not even sure how to start, so I don't have a sample workflow yet.  Please let me know if there is additional information that would be helpful.

CoG
14 - Magnetar

Where do the Test 1/2/... results come from and how do you determine what the sample % is for a test case (i.e. sometimes 10%; others 20%)? It looks like this is all connected, but it's not clear to me how/why.

joesparty
8 - Asteroid

@CoGI've created an example workflow.  The issue is how to pass the formula value to the random sample tool.

joesparty
8 - Asteroid

@CoGthanks for the suggestions, I was able to find this post which is more aligned to my desired output; https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Pass-a-value-to-a-Random-Sampl...

Labels