Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Pivot table calculations

Hello,

I want to change the color of cells in the pivot table below (example) if the value exceeds the value of the previous year.

I tried the use of aggr, above, column etc, but I can not find the right formula.

Can anybody help with this?

Year2009200920102010
CategoryColorLabelexclinclexclincl
bikeblue 12151316
bikeorange 14171417
bikered 13161316
carblue 45505055
carorange 30353235
carred 50555055

regards, Meike

1 Solution

Accepted Solutions
CELAMBARASAN
Partner - Champion
Partner - Champion

Try with this expression(as Background color expression)

=If(Before(TOTAL Sum(Costs), 2) < Sum(Costs),RGB(255,0,0))

Hope it helps

View solution in original post

9 Replies
MayilVahanan

Hi,

     In expression, Click '+' sign , in background color use like this

     =if(Column(1) - Column(3) > 0, blue(), Green())

     or

       =if(Column(1) - Column(2) > 0, blue(), Green())

     i'm not sure of that column number, how many expression you're using. and what are the dimension?

     Can you say in detail, or sample post?

     Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Not applicable
Author

Thanks for your reply.

Herby I added the example.

I dont think formula will work.

CELAMBARASAN
Partner - Champion
Partner - Champion

Try with this expression(as Background color expression)

=If(Before(TOTAL Sum(Costs), 2) < Sum(Costs),RGB(255,0,0))

Hope it helps

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

If the Year is a pivoted dimension, then

=If(Before(Column(1)) > Column(1), red(), green())

Its possible that Column(1) wont work, then use

=If(Before(expr) > expr, red(), green())

Where expr is the chart expression

Hope that helps

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Thanks it work!

Not applicable
Author

Hello,

can someone tell me if a PivotTable is possible make calculations per row?

eg:

row 1: sum(F1)

row 2: max(F1)

row 3: avg(F1)

row 4: Sum(row 1 + row 2)

CELAMBARASAN
Partner - Champion
Partner - Champion

Ya you can do it

with RowNo() function

Pick(RowNo(), Sum(F1),Max(F1),Avg(F1),RangeSum(Sum(F1),Max(F1)))

Hope it helps

Celambarasan

Not applicable
Author

But if I select a row in the pivot table it shows me always the first row value.

tt.png

ttt.png

Not applicable
Author

Thanks for the help.

Have you found a way to do this.

example: Pick (RowNumber, Sum (Sales), Avg (Sales), Max (Sales), Min (Sales), sum (Sales)-Min (Sales))