6 Replies Latest reply: Aug 21, 2012 5:39 AM by Sunil Chauhan

# Alternating coloured stripes to represent groups of repeating numbers

Hello i'm trying to visually identify groups of repeating numbers in a flat table by alternating the colour each time a number changes like so:-

10001111

10001111

10001111

12345555

24681111

24681111

10002222

ive tried to use this script under 'change background colour' in dimension tab:-

=if(mod(BP,2),rgb(135,206,255),rgb(84,255,159) this doesnt quite work, seems to have a mind of its own, I would like to achieve this each time a number changes.

Thanks,

Paul.

• ###### Re: Alternating coloured stripes to represent groups of repeating numbers

Maybe you want to try something similar Matt has demonstrated here:

http://community.qlik.com/message/190188#190188

• ###### Re: Alternating coloured stripes to represent groups of repeating numbers

u can try below code

Click on + sign before expression

text color of expression

if(BP=below(BP) or BP=above(BP),rgb(135,206,255),rgb(84,255,159))

BPmay be columnname or expression whatever you are taking

hope this helps

• ###### Re: Alternating coloured stripes to represent groups of repeating numbers

This does look good, however its spitting out loads of nulls now for field BP as this field is a calculated expression which loads relative to date in another table as such:-

if([Created On BW]>[Created On Date CMP],BP)

How do I fix this? im not quite understanding why your field above is causing nulls

• ###### Re: Alternating coloured stripes to represent groups of repeating numbers

use Expression label in place of BP In []

if(BP=below(BP) or BP=above(BP),rgb(135,206,255),rgb(84,255,159))

hope this helps

• ###### Re: Alternating coloured stripes to represent groups of repeating numbers

I'm sorry, you've lost me there... How is this different to your previous post?

Thanks,

Paul.

• ###### Re: Alternating coloured stripes to represent groups of repeating numbers

example

for expression if([Created On BW]>[Created On Date CMP],BP)  you have Expression Label  Name is BP

then You can use like below

if([BP]=below([BP]) or [BP]=above( [BP]),rgb(135,206,255),rgb(84,255,159))

hope this helps