Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

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.

6 Replies
swuehl
MVP
MVP

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

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

SunilChauhan
Champion II
Champion II

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

Sunil Chauhan
Not applicable
Author

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

SunilChauhan
Champion II
Champion II

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

Sunil Chauhan
Not applicable
Author

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

Thanks,

Paul.

SunilChauhan
Champion II
Champion II

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

Sunil Chauhan