Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
amien
Specialist
Specialist

color each row different, header is also colored

i use this to color my colors in the background expression:

=IF(MOD(ROWNO(TOTAL),2)=0,RGB(204,204,255),IF(MOD(ROWNO(TOTAL),2)=1,WHITE(),BLACK()))

works perfectly, except that the header is also colored, and not changed to black. Customer Format field doesn't help.

How can i fix this?

5 Replies
Jason_Michaelides
Luminary Alumni
Luminary Alumni

Try adding a Dimensionality() clause to the IF statement.  Doesn't always work but it might in your case:

=IF(Dimensionality()=0,Black(),IF(MOD(ROWNO(TOTAL),2)=0,RGB(204,204,255),IF(MOD(ROWNO(TOTAL),2)=1,WHITE(),BLACK())))

Hope this helps,

Jason

amien
Specialist
Specialist
Author

Nope , doesn't help.

i switched to a straight table instead of a pivot. It sufficient for now, but i would like the solution to this problem for the future.

Jason_Michaelides
Luminary Alumni
Luminary Alumni

Can you post your app?

swuehl
MVP
MVP

If I understand correctly, you are talking about this issue:

http://community.qlik.com/message/61747

I think this is still present in QV11.

amien
Specialist
Specialist
Author

it's still present in QV11 .. but there are bigger issues in QV11 than this

i dont see how i can use your link. It describes to use the visual cues.

But i need to color the row based on the rowno not on an expression.

if rowno is even then color1, else color2

i could make an expression for this and then put the visual cue on it. But it will give me an addiontal column, which i dont want.