12 Replies Latest reply: Sep 7, 2015 7:56 AM by Harshitha Harshu

# Different colour of lines in pivot tables

Hello All,

I usually use this expression to make 1 line white and 1 line grey in my normal table:

=if(mod(rowno(TOTAL), 2) = 1,  white(), rgb(212,212,212))

However, it is not working in a pivot table.

Any idea why I do not get the same result on my pivot table.

Many Thanks,

Hasvine

• ###### Re: Different colour of lines in pivot tables

Hello Hasvine,

can you post example. I have a Pivot table with your Expression and it works

• ###### Re: Different colour of lines in pivot tables

Hi Rudolf,

Below is the screenshot.

KR,

Hasvine

• ###### Re: Different colour of lines in pivot tables

Hi Hasvine

I defined the Color under Expression. Yours also?

• ###### Re: Different colour of lines in pivot tables

Yes i defined the colour in both the dimension and the expression but still no success.

• ###### Re: Different colour of lines in pivot tables

can you post small sample? only your Chart?

• ###### Re: Different colour of lines in pivot tables

Hi,Hasvine Dhurmea.

Make the following steps below:

Click-right and choice Properties...

In Dimension tab

1. Expand ( + ) Dimension , in Background Color put expression.

if(Dimensionality()> 0,

if(mod(rowno(TOTAL), 2) = 1,  white(), rgb(212,212,212))

)

2. Click Ok.

In Expression tab

1.Expand ( + )  Expression, in Background Color put expression.

if(Dimensionality()> 0,

if(mod(rowno(TOTAL), 2) = 1,  white(), rgb(212,212,212))

)

2. ClickOk.

Hope this helps.

• ###### Re: Different colour of lines in pivot tables

No luck,

It does not colour 1 line white and 1 grey.

The first 2 lines are white and the third lines become grey and 7 line become white and the last two lines become grey.

:-(

Kind Regards,

Hasvine

• ###### Re: Different colour of lines in pivot tables

Hasvine Dhurmea.

Remove Dimensionality() function of the expression, after appropriating their Pivot Table. Ex.:

if(mod(rowno(TOTAL), 2) = 1,  white(), rgb(212,212,212))

Regards,

Jonas Melo.

• ###### Re: Different colour of lines in pivot tables

hi,

Colors based on salaries

• ###### Re: Different colour of lines in pivot tables

hi,

How to show colors in report or chart

• ###### Re: Different colour of lines in pivot tables

Hi,

i  had a pivot like this

dimentions here

---------------------------------------------------------------------------------

expression1                    data                    data

epression 2                    data                    data

i had to place instead of RowNo -> ColumnNo in every expression to have these tow colors in chart:

if(Dimensionality()> 0,
if(mod(ColumnNo(TOTAL), 2) = 1,  white(), rgb(212,212,212))
)

• ###### Re: Different colour of lines in pivot tables

Hi,