Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

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
MVP
MVP

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

SunilChauhan
Esteemed Contributor

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

Not applicable

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

SunilChauhan
Esteemed Contributor

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

Not applicable

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.

SunilChauhan
Esteemed Contributor

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