Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi there, is there a way to interpret the content of a field as a formula and execute it? I have a table whose third field contains formula expressions and I want to execute instead of simply showing them.
Look at the picture below.
I tried with $ expansion and fieldvalue but it does not work.
I found the solution (it's pretty similar to the one suggested in the post mentioned by Piet Hein van del Stigchel.
First of all, formulas must not start with "=" symbol; then, the pivot table expression can be set like this:
pick([RTA_FORMULE.RTA measure index],
$(=fieldvalue('RTA_FORMULE.RTA measure formula 2',1)),
$(=fieldvalue('RTA_FORMULE.RTA measure formula 2',2)),
$(=fieldvalue('RTA_FORMULE.RTA measure formula 2',3)),
$(=fieldvalue('RTA_FORMULE.RTA measure formula 2',4)),
$(=fieldvalue('RTA_FORMULE.RTA measure formula 2',5)),
...
)
Thanks
$ expansion in an expression is only evaluated once for the whole chart, so this will only work when there is 1 valid formula. Take a look at the following thread, maybe it can help you.
I found the solution (it's pretty similar to the one suggested in the post mentioned by Piet Hein van del Stigchel.
First of all, formulas must not start with "=" symbol; then, the pivot table expression can be set like this:
pick([RTA_FORMULE.RTA measure index],
$(=fieldvalue('RTA_FORMULE.RTA measure formula 2',1)),
$(=fieldvalue('RTA_FORMULE.RTA measure formula 2',2)),
$(=fieldvalue('RTA_FORMULE.RTA measure formula 2',3)),
$(=fieldvalue('RTA_FORMULE.RTA measure formula 2',4)),
$(=fieldvalue('RTA_FORMULE.RTA measure formula 2',5)),
...
)
Thanks
$ expansion in an expression is only evaluated once for the whole chart, so this will only work when there is 1 valid formula.
Hi Alberto, Could you please explain your solution in details, I have just tested it and seems I can not make it working!
I have similar fields in my db as your [RTA_FORMULE.RTA measure index] and [RTA_FORMULE.RTA measure formula 2] where:
[RTA_FORMULE.RTA measure index] is the row no
[RTA_FORMULE.RTA measure formula 2] is the formula
Thanks in advance! If possible could you upload a simple example! Tnx
Ivan, did you ever find an example file using this? Thanks in advance.