Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
Is it possible to use a chartname in a expression?
I would like to use a variable that could fetch the name of the chart so that the expression would be something like "Expression" $Variablle+"chartname".
Can that be done?
Hi Per,
you can define a variable and use it in your charts.
Rainer
Yes, but can I use the name of the chart to be the name of variable I want to call, say for instance that I have a variables named "Cars" and "Trucks" , then I have two charts named the same, can I then use a the same expressions on both charts, but in the chart "Cars" i want it to pick the variable "Cars" and in the chart "Trucks" I want to pick the variable "Trucks"
Per,
please create a short example and describe the business need.
Otherwise I have the feeling I didn´t understood you right.
Rainer
I'll try to explain it better.
I have this expression:
if(Nivå=32,if(Left(Rubrik,1)=' ' or isnull(Rubrik),'',((sum($(FilterSAN) if(År=IndexÅr and BokfPeriod<=AktuellMånad,(BokförtBelopp),0))
-sum($(FilterSAN) if(År=JämförelseÅr and BokfPeriod<=AktuellMånad,(BokförtBelopp),0)))
/sum($(FilterSAN) if(År=JämförelseÅr and BokfPeriod<=AktuellMånad,(BokförtBelopp),0)))),
(sum($(FilterSAN) if(År=IndexÅr and BokfPeriod<=AktuellMånad,(BokförtBelopp),0))
-sum($(FilterSAN) if(År=JämförelseÅr and BokfPeriod<=AktuellMånad,(BokförtBelopp),0)))
/sum($(FilterSAN) if(År=JämförelseÅr and BokfPeriod<=AktuellMånad,(BokförtBelopp),0)))
This I use in a chart, and I have 9 more that are similiar but the have another variable.
My plan was to take the whole expression and place it a variable, but since I have a unique variable in every expression I was thinking maybe it was possible to use the name of the chart to call the right variable, so that it in this case would be something like $(Filter +'Chartname') or something?
Per,
sorry no cool idea at the moment.
Rainer
Hi,
do you just need to see 'Truck' somewhere in the header of the graphic?
Then you should have a look into the functions GETCURRENTFIELD (for groups) or GETFIELDSELECTIONS (for fields)
HTH
Peter