2 Replies Latest reply: Feb 20, 2012 2:04 AM by Stijn Brughmans

# Subtract relative data of two years

I created a graphic which showes the relative time (compared two the whole working time) was used during a year.

As a final result, I'd like to see as a graphic the delta between these two years, so relative result of a product in 2011 - same product for 2010. Or to say it very easy, the result of the subtraction of corresponding colours.

1) the values to which they are related (total time per year is not a constant !) but a given value in a table

2) the sum of the times used for the different products does not equal the total working time over the corresponding year.

Can this be done in the graphic itself, or should a virtual table be created to solve this issue.

Thanks in advance for the solutions

• ###### Subtract relative data of two years

Hi Brugst

Do you just mean you want something like eg sum of sales for 2011 - sum of sales 2010? You can use set analysis in the expression to just select a year. EG

=sum({<Year={"2011"}>} Sales) - sum({<Year={"2010"}>} Sales)

will subtract the sales for a product, as a dimension  in 2010 from the exact same product in 2011.

Is this what you need?

Erica

• ###### Subtract relative data of two years

Hi Erica,

It works. I tried something similar before, but forgot to use the curved brackets around {<year>}.

Thanks a lot for the information !