Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

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

12 Replies
Anonymous
Not applicable
Author

Hello Hasvine,

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

jonas_rezende
Specialist
Specialist

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.

Expression_Back.JPG

Hope this helps.

Not applicable
Author

Hi Rudolf,

Below is the screenshot.

CE.png

Many thanks for your help.

KR,

Hasvine

Not applicable
Author

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

Anonymous
Not applicable
Author

Hi Hasvine

I defined the Color under Expression. Yours also?

Not applicable
Author

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

qlikviewwizard
Master II
Master II

‌hi,

please check this link:

Colors based on salaries

Anonymous
Not applicable
Author

can you post small sample? only your Chart?

jonas_rezende
Specialist
Specialist

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.