Basic Monte Carlo Simulations in Tableau

This came through my Twitter feed this morning:

And I looked at the article, and thought, “I can do that in Tableau.” About 20 minutes later, out came a pi estimator:

There’s a circle mark for every iteration, you can crank it up to 1,000,000 marks (on Tableau Desktop I can go to 2,500,000 marks, the Tableau Public Server is a little more limiting). However, the data source only uses two rows, it pads them out using the data scaffolding technique pioneered by Joe Mako where we use Tableau’s domain padding to generate the additional rows. To publish to Tableau Public I needed to use a data extract which does not currently support a random number function, so I used Joshua Milligan’s Random Number Generation post from the Tableau Calculation Reference Library.

7 thoughts on “Basic Monte Carlo Simulations in Tableau

Please add your thoughts and perspectives