2 Replies Latest reply: Jul 1, 2011 1:38 PM by Razor Ramon

Relative Problem in a stacked bar chart

Hi guys,

I have a bar that has 2 dimensions. One for the month of the year and the other dimension to show a location.

My aim is to show values for each area relative to each other on a monthly basis.

Example:

I have one simple expression which is Sum(value)

Jun 2010 - I want a stacked bar chart that will show all the values relative to each other i.e 40%, 20%, 40%

Jul 2010 - I want another stacked bar showing values relative to each other i.e 35%, 30%, 30% and so on for other months.

I have the relative box ticked, but it calculating the value for every month reltaive to each other as opposed to calculating each individual month relatively.

Is there a way to get around doing this and getting the relative thing to work as expected?

Thank you

• Relative Problem in a stacked bar chart

I believe you want to the bars to sum 100% every month, right?

The relative box will present the share of the value in the whole chart. If you have multiple locations and multiple months, the sum of all of them will be 100%.

You should uncheck the relative box and write the following expression:

sum (value) / sum ( total <month> value)

// you need to replace month by the dimension you are using as your time reference.

Hope this helps,

Erich

• Relative Problem in a stacked bar chart

Fantastic Erich.

It worked perfectly. Thanks