I trying to find someway to calculate Erlang B(it`s formula to traffic capacity based on number of available lines and GOS).
I looked in google and find that formula is:
Function ErlangB (E as Double, m As Integer) As Double
Dim InvB As Double
Dim j As Integer
InvB = 1.0
For j = 1 To m
InvB = 1.0 + j / E * InvB
Next j
ErlangB = 1.0 / InvB
End Function
If someone familiar with that? How it could be implemented in webi report?
jprasanthram is correct, if you want an actual ‘function’ you need to use the database.
However, if all your data that fills the function is part of your dataset in the WEBI microcube, then you should be able to calculate it using extensive use of the FOR EACH and FOR ALL Functions within WEBI. Those help WEBI calculate things regardless of row position. WHERE might also come in handy.
Without knowing the specicifics of your dataset and what your variables are it’d be hard to give you an example formula to work with.
Yeah,
I already implement this formula as function in DB, but problem that “number of lines” that used in calculation is input from user in report…
And i can`t find anyway to put this value from report in my to_capacity() funciton in db
Create a new object (either dimension or measure - what makes sense) using the function that you created. Then in the function parameters, you can use @prompt() syntax to “ask” report user for the value of the function parameter.
The original ErlangB function in your first post has 2 parameters. The function in your last post has only one. Maybe I am missing something? Or the second function is a custom function?
Generally, an object in a universe that uses a function as well as a prompt, should be defined as follows (the pseudo-syntax is for Oracle, so replace parts where needed):
Yeah. You right about number of parameters for Erlang b. but in my system the second parameter is constant so i elimanate it.
So back to issue,
seems that i miss something.
I put the following in “select” of object that i create:
psa.to_capacityg(@Prompt(‘Enter number of connected lines’,‘N’,mono,free))
when i try to parse it i recieve the following error: “Parse failed: Exception: DBD, ORO-00903: Invalid table name. State: N/A”
but the following query: select psa.to_capacityg(N) from dual" execute properly…
“psa” its name of schema where function exist. and there is no package name... (its not allowed to put in sql select psa.capacityg(n) from psa.to_capacityg…
I`m lost…
That’s fine. The parsing error you got is because the object does not reference any table in the universe structure. However, when you use the object along with any other “normal” universe object, the query will execute just fine. Try it and let us know how it went.