0 Replies Latest reply: Jun 20, 2012 5:40 PM by Heli Swissa RSS

Help with Rows Quotient between years

Heli Swissa
Currently Being Moderated
GroupyearsJanFebMarAPrMayQuotient 
conditioner201022228
conditioner2011333312Quotient  (2011-2010) /2010
conditioner2012444416

Quotient (2012-2011) /2011

Shampoo201022228
Shampoo2011333312Quotient  (2011-2010) /2010
Shampoo2012444416

Quotient (2012-2011) /2011

Cream201022228
Cream2011333312Quotient  (2011-2010) / 2010
Cream2012444416

Quotient (2012-2011) / 2011

 

I can't find a way to do a Quotient in a new column, like the example above.

Can someone advice?

 

FYI

I found a way to do it by column but not by row.

 

if (GridValueAt(CurrentRowIndex, currentcolumnindex-2, CurrentSummaryIndex)=0) then 0

Else

(GridValueAt(CurrentRowIndex, currentcolumnindex-1, CurrentSummaryIndex)/GridValueAt(CurrentRowIndex, currentcolumnindex-2, CurrentSummaryIndex)-1)*100

 

if I do this

 

if (GridValueAt(CurrentRowIndex-1 (or +1), currentcolumnindex, CurrentSummaryIndex)=0) then 0

it gives me an error : "Argument #1 of 'GridValueAt' is out of range"

 

If you have a better I will love to hear it.

 

Thanks,

Heli