Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I’m implementing forward price calculation, which results in extremely long formula. To make a chart I can put it all into the extension. But this will be hard to modify and maintain it the further. Do you know if some elegant way exists to break this expression? How such formula can be split into components, but still be used dynamically?
Thanks a lot in advance!
/Stanislav
You need to use SET here. LET will evaluate the expression which is not what you want in the script. So SET c = a+b;
You could put parts of the expression in variables and then use the variables in your expression. A simple example:
variable vPart1: sum(Sales)
variable vPart2: sum(total Sales)
expression: $(vPart1) / $(vPart2)
Hallo,
you can put the formula into one variable or split the formula and create several of variables.
Marcus
Hi,
You can store your expresion in a variable(s).
When you create the expression don't type the "=".
After, you can call this variable like $(VariableName) in the chart expressions.
Ej:
($(A) + $(B)) / $(C)
Regards,
Ricardo
Gysbert, Marcus, Ricardo, thanks a lot for your the responses! But I have problem’s figuring out how it can be defined (sorry for newbies/dummy questions).
Let say I loaded a table with two number columns: 'a' and 'b'. Now I want to create formula as: c = a+b.
I guess I need to define in the script
LET c = a+b;
and then use an expression $(c) in the chart. But it doesn't work that way...
You need to use SET here. LET will evaluate the expression which is not what you want in the script. So SET c = a+b;