Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi there,
i am using the same expression in multiple charts and want to store the expression simply in a variable and then just reference the variable in the expression of the chart. is that feasible ? I tried vVarName, = vVarName and = $(vVarName), but nothing brought up the result.
Any idea how this could work ?
Thanks in advance.
K
Use
if(Unit = '%', num(Actual, '# ##0%'), if (Unit = '#', num(Actual, '#0'), num(Actual, '## ##0.00') ))
in your variable (without "=") and use
=$(vVariable)
in chart expression
try with sinply vVarName where vVarName is declared as: =Sum(Value)
It seems to work if i have only one record in my chart selected. But having nothing selected the expression returns NULL....
OK, let me get my crystal globe and guess your structure, data and what you want to achieve...
you dont need a chrystal globe - its simple:
a) you have a table
| Initiative | Actual | Country | Unit |
|---|---|---|---|
| Initiative A | 100.000 | US | $ |
| Initiative B | 50.000 | CAN | $ |
| Initiative C | 125.000 | EUR | $ |
| Initiative D | 24 | EUR | % |
| Initiative E | 2 | EUR | # |
b) you have a pivot chart with Initiative & Country as Dimensions
c1) you have as Expression (in the pivot table):
= if(Unit = '%', num(Actual, '# ##0%'), if (Unit = '#', num(Actual, '#0'), num(Actual, '## ##0.00') ))
--> works fine
c2) you have the expression above in variable and the variable in the chart expression, then it only works when you have one record of the chart selected.
chrystal clear ?
Use
if(Unit = '%', num(Actual, '# ##0%'), if (Unit = '#', num(Actual, '#0'), num(Actual, '## ##0.00') ))
in your variable (without "=") and use
=$(vVariable)
in chart expression
Merci!