Looking for a neat way to create a histogram in Anaplan
I am currently looking for a way to create a histogram out of a lot of simulated data I have created.
Basically the application runs a full Monte Carlo Simulation and I would like to present a histogram of the Results. I have those results in a module with the "Simulations" list (lets assume it is all in one line item).
What is the easiest way to get a histogram (ideally with a dynamic amount of buckets) of these 500.000 values? I was thinking of creating a list (dynamically) and then creating another module to count the occurrences. However this would be really tedious and could kill performance. Any other ideas?
I have replicated this, and have a solution that should not be overly tedious or poor for performance. Sounds like you are on the correct track in my mind.
Create Bucket List, and Bucket module to define the bounds of the buckets. I have also included a Filter line item to choose what Items within your bucket list you would like to display on your graph.
In your module that has the outputs from your simulation, you need to assign each line to a bucket. I broke this out into a couple of line items to help increase performance:
Bool line item for find what bucket each data point falls into.
Converting the Bool into the bucket item (Note there is a top-level on this list, the next line item would just pull in the value from the top-level)
Here is the whole module.
I used subsidiary views here to get it all into one view, but having a module to do the Bool and the bucket line would follow Planual best practices.
The last line item is just a formula of 1 so that we can do our count over the final bucket line.
This is just summing the count by the final bucket to get the data into our buckets.
From there you can create your graph and publish it to a dashboard.
NOTE: You will want to apply the filter to your module before publishing the graph. You will want to make sure to have all of the items in the buckets list are checked, and then once published can remove the ones that you don't want to display right now.
Then the control/dynamic piece is going to be done in the Bucket module where you can dynamically control what the bounds of the buckets are, and what buckets to display in your graph.
Or by Changing the bounds:
One other option here is to make your buckets list a numbered list and then make this have a display name to dynamically update to the range of data that you have. I.E. Above grid would then look like this: