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

Monte Carlo Simulation - Applying Different Probabilities Across Future Years

wkenny
5 - Atom

Hello,

 

I am trying to build a Monte Carlo Simulation that tracks product penetration over time. Each year, I expect the product penetration to grow (i.e. <5% in year 1, between 5-10% in year 2, 15-25% in year 3, etc.) and would like to run 100 simulations to account for these varying probabilities across each respective year. 

 

When I run my workflow, it spits out 100 different simulations - but does not seem to properly account for different probabilities in each respective year. Can someone help me with this problem?

2 REPLIES 2
danilang
19 - Altair
19 - Altair

Hi @wkenny 

 

Very good attempt.  You had 2 issues.

 

1. Your initial configuration of the action tools in the macro looked like this

original.png

The highlight is on the @name parameter so the replace action applies on the name param.  the selected row should the line above, like this

new.png

 

2.  In your Replace a specific string box, you originally had "0" for the action tool replacing the minimum value.  The way the action tool works is that it replaces all values in the target string that it finds, so to would have replaced all the 0s in the highlighted string above(there's about 20 of them), most likely resulting in errors.  The way to work around this is to change the configuration of the Simulation Sampling tool so that each of the values that your trying to replace only occurs once in the definition (-999, 888, 777 below)

Sim.png You then use these values in the corresponding action tools resulting in

 

result.png

 

Dan

wkenny
5 - Atom

Thanks @danilang. Works great now.


One final question - do you know if it is possible to run simulations by applying a bimodal distribution to variables?

Labels