Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

On Demand Webinar: See Why Thousands of QlikView Users Have Switched to Qlik Sense. REGISTER
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Shading every other row in Pivot table

Hi all,

I'm trying to shade every other row in a pivot table simply based on being the odd or even row number. In other words rows 1,3,5,6,9,etc. would be a color and 2,4,6,8,10,etc. would be another color.

I've tried to write code on the background color of the field using rowno() and count() but no success.

Any suggestions would be extremely helpful.

12 Replies
Not applicable

In a straight table it is a setting, but that doesn't work for a pivot table. However, you can set the background color on dimensions and expressions.

Dimension: click on the plus-sign in front of the dimension and double-click on the Background Color option.

Expression: click on the plus-sign in front of the dimension and click on the Background Color option. There is a Definition window on the right now.

Add the following expression to all the Background Color fields (dimensions and expressions):


If you don't like the color, you can use a lot of other standard colors (search 'color' in the help) or use RGB(230,230,230) for lighter grey for instance.

Not applicable

Gud example is given by Mark. There is also a feature called 'ColorMix', see help. It is used to set colors for text, or background. More detail is available in manual on ColorMix.

Not applicable

Cool ... thanks for the tip sunil18vns Smile

Not applicable

Thanks for your help.

Where can find the manual on ColorMix?

Not applicable

It can be found in the Help. Just search for 'colormix'. I can post the text if you like Smile

Not applicable

Oops, double post ...

Not applicable

In my case, it works when I have one dimension. But when I put multiple dimensions, the same formula does not work. Can anyone please check and let me know the reason.

Not applicable

To be able to do that, you need an identifier for field product.

That way you can replace the 'even(RowNo())' part with something that identifies each product.

Have you tried the Color Mix Wizard?

Not applicable

Hi Mark,

I searched for colormix in Help. I'm still not sure how to start/access the colormix wizard from the instructions below:

With the Colormix Wizard, opened from the File menu in the Edit Expression dialog, it is possible to create a colormix expression, i.e. an expression that calculates a dynamic color from a given measure.

Can you give me more specific instructions to access the colormix wizard?