cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic formulas WEBI

Former Member
0 Kudos

Hi,

Can I create and execute dynamic formulas in WEBI. For example I have such variable :

= "[Total count] / " + [Dynamic Variable]

[Dynamic Variable] returns a Measure name for example "[Damaged count]". So my variable would look like this "[Total count]/[Damaged count]". However this is just a text. How do I execute it or tell WEBI that treat it as formula and display the results?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi

You can´t convert a text  to a formula.

You can do like this 


[Variable Measure] = If ([Condition1]=1; [Measure1];If ([Condition1] = 2;[Measure2];If([Condition3] = 3; [Measure3];...))...)

[Variable2] =AVG([Variable Measure])

I hope this help you

Former Member
0 Kudos

This will not work. Because [Variable Measure] will return the number itself. And you will end up with such formula:

[Variable2]=AVG(5123.60)

Which doesn't make sense...

Former Member
0 Kudos

Hi,

try creating a variable that test for which dimension you want,

like [Dynamic Variable] = If ([test] = 1 ; [dim 1];If ([test] = 2;[dim 2];If([test] = 3; [dim 3];...))...)

Cheers,

Rogerio

Former Member
0 Kudos

Hi,

     I know this method. However its not convenient. The whole point here is that I want to avoid such checks as they can be indefinite...I don't know the full list of such [dims] and they can change within time.

Former Member
0 Kudos

So how do you know which dimension to use ?

Former Member
0 Kudos

Why would I need to know? [Variable1] provides a measure name to [Variable2] and then it calculates according to formula on that measure that is provided by [Variable1].

Example:

[Variable1] = "Measure1" (The value for this variable changes on certain conditions)

[Variable2] = "=AVG("+[Variable1]+")"

The [Variable2] will return "=AVG(Measure1)". So my question how to tell WEBI that its a formula and not a string?

Former Member
0 Kudos

Now I understood , I don´t think you can do this out of the box, but you can do this, through the Raylight API if you´re viewing the document through the HTML client.Cheers,

Rogerio