3 Replies Latest reply: Jan 22, 2016 10:50 AM by Florent Lelarge-Otiniano

# error variation by year

Hi,

I Have a problem when calculating variation between years.

I have 3 charts, Chart 1 and 2 the values are correct, but the chart 3 does not bring right values (value for chart 3 should be the same as chart 2.

Expression for Chart 2

(Sum(if(Year='2015' or Year = '2014' or '2016' ,Actual/1000))
- (
Above(Total ((Sum(if(Year='2015' or Year = '2014' or '2016' ,Actual/1000))
)),
Count(DISTINCT Total<Year> [Year]))))

This is teh expression I'm using: and the result is not right.

(Sum(if(Year='2015' or Year = '2014' or '2016' ,Actual/1000))
- (
Above(Total ((Sum(if(Year='2015' or Year = '2014' or '2016' ,Actual/1000))
)),
Count(DISTINCT Total<Year> [Company Code]))))

best regards,

• ###### Re: error variation by year

Bonjour Sylvia,

J'ai simplifié les expressions ; dis nous si c'est cela qui est attendu comme résultat...

Florent

• ###### Re: error variation by year

mercy Florent!

But still the value in chart 3, variation in chart 3 for year 2016 should be - 7366

do you know how to get to this value, having the company code as dimention?

• ###### Re: error variation by year

Je pense que le pb vient du fait que la "Compagny Code" 'Régional' n'existe qu'en 2014 et 2016 et que les autres n'existent qu'en 2015...

tu ne peux donc pas faire d'évolution par "Compagny Code'... !!:

Regional    2014=14874

2015=0

2016=14874

Co-xxx :      2014 =0

2015= 22240

2016 = 0

pour le script, je te propose de regarder le tableau "FLO"...