#### HillDragon

##### New Member

- Joined
- Jun 9, 2014

- Messages
- 13

*very*limited and time consuming. So I have created a Tutorial for anyone else that may need to do something similar.

*note*: even if you are not working with the same sort of issues as described, the core of this tutorial is Ranking data on the fly, Summing the total of multiple iterations of one equation with variable data, and Using a complex equation to filter a table against it's own data.

The Task:

- Create a pivot table that will provide the number of agents needed for the number of calls expected.

The Problems:

- Our call volume is weighted to be more heavily influenced by the most recent data and is comprised of the last 4 "good" weeks. This means that we need a measure that can tell, of the 4 weeks selected, which is the most recent and calculate a weighted average appropriately.
- Erlang-C is calculated in Excel using the Poisson function. DAX does not have a Poisson function.
- Taking the same equation and solving for X..

The Solutions:

- Rank X on the dates to calculate weight.
- Create Poisson and Cumulative Poisson measures
- Using the Erlang-C equation as a table filter in a SumX.

The Tutorial contents:

With the images included it turned out to be about 30 pages so I've compiled it all into a Word file to save the length of this post.

- Erlang_Example.docx
- Erlang_Example.xlsx
- /Images. containing the full size images from the .docx.

The doc has smaller images that link to ~workingDirectory/images so I have made a .zip available if you want to grab them all at once.

And they can all be found here.

Please let me know if you have any question, comments, or critiques.