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

Iterative Macro with Random Sampling

analyticon
7 - Meteor

Hello All... Not new to Alteryx but just learning marcos. I would appreciate your help on this problem. Its kind of like a Monte Carlo simulation but much more simple. I have a table with dimensions (length,width,height) and weight. I want to take a random sample of this table until I reach a dimensional threshold (l+w+h) to be determined. I would like to add the weights of each row in the sample and then repeat until the table is empty. Any dimensions that are already over threshold are filtered out already. The outputs will be number of items in groups and total weight. Input table looks like this:

 

ItemHEIGHTLENGTHWIDTHWEIGHT
a1114.2511.2529.37
b726169.22
c7261631.83
d1021.51745.92
e15211830.78
f12201411.49
g1220143.7
h15211824.29
i1324.2516.258.33
j1114.2511.254.34
k1021.51713.1
l12201444.16
m5.3124.886.184.1
n8.515.9810.5111.07
o15211825.38
p726165.56
q15211815.56
r726164.63
s14.2115.214.6112.63
t1114.2511.2511.11
u15211821.61
v9.3720.5515.5913.75
w4.0921.619.023.64
x4.921.2516.251.9
y15211845.35
z621153.17

 

I have been looking at the tutorials and other workflows but can't seem to get exactly what I want. Your help is greatly appreciated!

 

Thanks!

J

10 REPLIES 10
analyticon
7 - Meteor

Works great! I was so close! Thanks for your help!

Labels