Skip to Content Former Member

### Dynamic formulas WEBI

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?

##### Add comment
10|10000 characters needed characters exceeded

### 2 Answers

• Former Member
Jan 08, 2015 at 04:37 PM

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

##### Add comment
10|10000 characters needed characters exceeded
• Former Member Former Member

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

• Former Member
Jan 08, 2015 at 10:35 PM

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

##### Add comment
10|10000 characters needed characters exceeded
• Former Member

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...