Showing results for 
Search instead for 
Did you mean: 
Not applicable

Erlang C - Error in FACT () and POWER() DAX FUNCTIONS


Has anyone tried to figure out how to calculate Erlang C formula with DAX? I am trying to calculate the number of agents needed for a specific level of service for a call centre.

I have followed this tutorial "Creating a Call Center staffing tool in Power PIvot" by Josh Miller. It was very helpful but Power BI is showing computing limitations, specifically is given me these errors:

MdxScript(Model) (6,5) Calculation error in measure 'Table'[TA_INTERACTIONS]’: An argument of function FACT has the wrong data type or the result is too large or too small."


MdxScript(Model) (25, 75) Calculation error in measure 'Table'[TA_INTERACTIONS]’: An argument of function POWER has the wrong data type or the result is too large or too small."

Calculations are based on Poisson and Cumulative Poisson formula, which contains a POWER() and FACT() functions:

a) Poisson:


PoissonX =
    EXP ( - [IntensidadTraf] )
        * POWER ( [IntensidadTraf]; SUM ( AgentsX[AgentsX] ) );
    FACT ( SUM ( AgentsX[AgentsX] ) );


b) Cumulative Poisson


PoissonC_X =
    FILTER ( AgentsZ; AgentsZ[AgentsZ] < SUM ( AgentsX[AgentsX] ) );
    DIVIDE (
        EXP ( - [IntensidadTraf] ) * POWER ( [IntensidadTraf]; AgentsZ[AgentsZ] );
        FACT ( AgentsZ[AgentsZ] );


Where ‘AgentsX [AgentsX] ’ and ‘AgentsZ [AgentsZ] ’ are tables containing only one column with the total number of agents, increasing the value 1 by 1.


The model works for less than 150 agents but breaks at 151 agents or greater.


Any ideas on how to solve it?



Regular Visitor

Hello Judy,

Have you resolved the Erlang - C logic issues or found any alternative solution?

Unfortunately Not yet

Community Support
Community Support

Hi @Anonymous ,

Actually, it mean you are use too large number to do 'fact' calculation and the result number is over int type limit.(I test on my side and I it can calculate with numbers less than 171)

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Not applicable

Thanks @v-shex-msft !

Though i need a much higher number to figure out my calculations. I will keep on searching an alternative.





I am trying to calculate call volume using Erlang C and Power BI variables. I am getting an error similiar to what you had. Were you able to find a way to forecast call volume in Power BI using Erlang?

Helpful resources

PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Get Ready for Power BI Dev Camp

Microsoft named a Leader in The Forrester Wave

Microsoft received the highest score of any vendor in both the strategy and current offering categories.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.