cancel
Showing results for 
Search instead for 
Did you mean: 

% Change in a Cross Tab Row

Former Member
0 Kudos

I need to create a % Change row in this cross tab report.

I'm not sure which is the best/most efficient way to do this.

Is there a formula that I can create or do I have to use the calculated member feature.

Help is greatly appreciated.

Accepted Solutions (1)

Accepted Solutions (1)

JWiseman
Active Contributor
0 Kudos

if you're not using the Total row at the bottom, then right click on one of the cells and choose Format Field > go to the Common tab > Display String formula and enter this:

numbervar l:= GridValueAt (currentrowindex - 2, currentcolumnindex, currentsummaryindex);

numbervar t:= GridValueAt (currentrowindex - 1, currentcolumnindex, currentsummaryindex);

if l <> 0 then numbervar c:= 100*(t-l)/l;

totext(c)

Former Member
0 Kudos

Is this how I would make it red if it were a negative number?

if c < 0 then crRed (totext (c))

else

Totext (c)

JWiseman
Active Contributor
0 Kudos

background colours are done in the Format Field > Border tab > Background formula.

if numbervar c < 0

then crred

else defaultattribute

same formula would be used if you wanted to format the Font Color (Format Field > Font tab > Color) attribute instead of the background colour.

Former Member
0 Kudos

Thanks

Answers (0)