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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Color Coding for alternate rows in a pivot table

Hi,

I have a requirement wherein the rows of the pivot table must be represented via two colors red and green alternatively i.e., 1st row must be in red, 2nd must be in green, 3rd in red,4th in green and so on. Can anyone please let me know how this could be accomplished

1 Solution

Accepted Solutions
jagan
Partner - Champion III
Partner - Champion III

Hi,

Try like

Chart Properties -> Expression -> Expand the + symbol for expression -> Click on Background and enter the following expression in Definition textbox

=If(Mod(RowNo(TOTAL), 2) = 0, RGB(255, 0 , 0),RGB(0, 255, 0))

Regards,

Jagan.

View solution in original post

3 Replies
eduardo_sommer
Partner - Specialist
Partner - Specialist

Use, in all dimensions and expressions of the pivot table, in the background property, the following expression

if (mod(rowno(total),2)=0,lightred(),lightgreen())

Eduardo

jagan
Partner - Champion III
Partner - Champion III

Hi,

Try like

Chart Properties -> Expression -> Expand the + symbol for expression -> Click on Background and enter the following expression in Definition textbox

=If(Mod(RowNo(TOTAL), 2) = 0, RGB(255, 0 , 0),RGB(0, 255, 0))

Regards,

Jagan.

Not applicable
Author

Write the below expression in Expression + symbol(background color):

=if(even(rowno()),Green(),Red())

Hope this will help you.