6 Replies Latest reply: Aug 24, 2012 6:05 AM by Florian Pennetzdorfer

# Set analysis on chart level

Hey,

Is there a way to define set analysis on chart level?

I've got a straight table containing several expressions, which should be calculated irrespective of the selection in listbox "Country". e.g.

`sum({ < Country = > } Sales)`

It would be handy to define set analysis once (e.g. in General tab) rather than putting it into each expression separately.

• ###### Re: Set analysis on chart level

Hello Florian,

Why don't you create a variable with the 'set analysis' condition text.

Then you need to place your variable (e.g. \$(vSetCondition)) inside of each chart's expression.

For example:

Sum({< \$(vSetCondition) >} SalesAmount)

Kind regards,

Janusz

• ###### Re: Set analysis on chart level

Thanks Janusz, but according to your suggestion I still have to adapt each expression separately.

My idea was to have expressions without any set analysis and "source it out" to the chart level instead.

That would be the most efficient way in my opinion.

• ###### Re: Set analysis on chart level

Hi Florian,

You can still achieve that by creating a variable for each expression seperately.

1. Define variable

vExpression1 - sum(SalesAmount)

2. Make a call for the variable's value as a chart's expression

=\$(vExpression1)

Give it a try and let me know if this is what you had in mind.

Kind regards,

Janusz

• ###### Re: Set analysis on chart level

Thanks Janusz,

unfortunately that's not really what I've in mind.

I would like to have expressions without set analysis and without variables. They should just contain some basic aggregation formulas (sum, count etc).

Having that "default chart" I would like to use it in different cases. If there was a possibility to define set analysis on chart level that would be the most convenient way. I would just make a copy of the chart and change the set analysis to my requirements (thus, no need to change variables in expressions ...)

• ###### Re: Set analysis on chart level

You would like to essentially make a dynamic expression on the fly, you would need to do this with a large micture of variables and using functions getfieldselection etc.  It is possible but takes a while to put together, it is however not overly efficient in terms of calculation time as the server has to constantly calculate and it makes caching difficult.  I would suggest avoiding it if possible if it is not possible I will try to put together an exaple when I get a chance.

• ###### Re: Set analysis on chart level

Felim,

my goal was to simplify things. So, as there obviously is no "simple" solution to this, it won't make sense to go for a complex workaround

Thanks for you help though!