8 Replies Latest reply: Mar 2, 2017 3:07 AM by Luca Ganugi

# Plotting aggr() in a chart with set expression

Hi all.

After some work i've been able to formulate an expression with some dynamic variables, and that work very well in a chart using ITEMID as dimension.

I want also to plot this measure over the time (for example over WEEK), but the number that i get are not correct.

This is the expression (i've semplified it):

i've tried to wrap tha entire measure with an aggr() using WEEK, but it's doesn't work.

Any ideas?

• ###### Re: Plotting aggr() in a chart

Add the week dimension to your table along with =\$(TotalItems) as an expression. You can make sure it is what you expect in each point this way.

• ###### Re: Plotting aggr() in a chart

i've managed to simplified the source file in order to post it.

basically i'm comparating the perfomance of some ItemID between the actual date and some days before (180).

I can display the difference of actual and old very well in the first chart, with dimension ItemId or Item_Group.

I can display it also in a Text box.

But when i'm gonna to display the same expression over the Week, it doesn't work. (bottom chart) !

How can i achieve that?

Ps: if i select a week the value is correct, but i want to show how the gap in going over the weeks...

• ###### Re: Plotting aggr() in a chart

Any hint?

• ###### Re: Plotting aggr() in a chart with set expression

any help????

• ###### Re: Plotting aggr() in a chart with set expression

With the level of complexity in your expression, I would suggest you to use The As-Of Table to simplify your expression. This will also help you make it more efficient performance wise.

• ###### Re: Plotting aggr() in a chart with set expression

Hi Sunny.

I've tried to implement The AsOfTable but i'm getting the same result.

My expression work perfectly when is in a Text box or in a bar chart with ItemID.

When i put it in a chart over Week it doesn't work anymore. Moreover, if i select the Week with a filter pane the value in the chart is displayed correctly.

What is the reason of this behaviour?