6 Replies Latest reply: Aug 31, 2012 9:29 AM by Cesar Accardi

Help in accumulation formulas (Replacing above)

I have a straight table with the KPI values by Month and Year, I want to show in this same table some expressions:

1. The variation between the current Month and the Previous

2. The accumulated variations (1) along the current year

3. The variation between the current Month and the same Month on the last Year (12 Months variation)

I've already built all the expressions, however the last one makes the table show all the years I have in my table because is using 1 as the set identifier. How can I replace this and keep only the selected period with the correct accumulations?

Expression 3 disabled:

Expression 3 enabled:

Expression 3 formula:

```if(
if(
0,
((
/

-1)*100
)
)
)

```

• Re: Help in accumulation formulas (Replacing above)

Try using Monthname Functions with AddMonths(Date,-12) You could use this in SET to avoid using above

• Re: Help in accumulation formulas (Replacing above)

Hi,

thanks for the quick response...  Like this?

```sum({\$<[Descrição do Subindicador]={'CUB-PR'},Ano={"\$(=Year(AddMonths(Date#([Ano Mês],'YYYY/MMM'),-12)))"}>} Valor)
```

If put the modifier expression in a new the result appears to be correct (last year), however the expression "12 Meses" doesn't show any value:

• Re: Help in accumulation formulas (Replacing above)

Thanks.

I tried this.... but I need to calculate the variation with a year (2010) that is outside of my selection. Any ideas?

• Re: Help in accumulation formulas (Replacing above)

I think, you can always use Only() over your expression with corresponding set expression.

• Re: Help in accumulation formulas (Replacing above)

Hi,

The problem was solved.. I used the Only() in the expression with AddMonths like you said however for this to work I must have 1 select value for year, as my client agreed with this, so that's ok.