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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
samuel_brierley
Creator
Creator

Bar background colour Issue

Dropbox - MTV plot just signals.qvw

Hi all,

this is driving me insane and is turning out to be far more complicated than i first thought.

if you look at my qvw you will see a small sample of my data, quite simply I use the field 'switch on' to determine the offset (i.e the time the device switches on) and minutes to determine the duration it was on. this works fine, for each signal setting I am gettin a new bar that is the correct size and starts at the same time.

I must point out here the actual structure of my chart cant change as this is a small part in a much larger chart that all works fine.

all i want to do is colour those bars according to the 'Equipment setting' Dimension.

40R = Red

50R= yellow

60R = green

anyting else is blue.

if([Equipment setting]= '40R',rgb(255,0,0),
if([Equipment setting]= '50R',rgb(200,200,14),
if([Equipment setting]= '60R',rgb(0,255,0),rgb(0,0,255 )))

that is the formula i use(might not have enough brackets as ive copied across!)

I would appreciate anyone who gets a second to have a quick look as im sure a fresh set of eyes will quickly sort it.

FYI im a personal user so a quick explanation would be great.

thanks for your time!

1 Solution

Accepted Solutions
jerem1234
Specialist II
Specialist II

Looking at it further, I can see the problem. Not sure how you want to address it though. It is because you have multiple records with the same time (i.e. you have two records with time 12:59 and a few others). When you say [Equiment settings] = '40R', it doesn't know which records to choose from for the records that have the same time (There are 2 equipment settings to choose from).

Hope this helps!

View solution in original post

4 Replies
jerem1234
Specialist II
Specialist II

Hello,

     I am using the formula provided, and im not sure what error you are seeing?

=if([Equipment setting]= '40R',rgb(255,0,0),

if([Equipment setting]= '50R',rgb(200,200,14),

if([Equipment setting]= '60R',rgb(0,255,0),rgb(0,0,255 ))))

I did add a ')' to the end.

Can you describe your error in more detail and the results you expect?

Hope this helps!

samuel_brierley
Creator
Creator
Author

Hi thanks for the reply, if you look in the data there is many more occurences of the settings. the chart doesnt show any occurences of 40R what so ever.

WHat I wanted to see was a kind of timeline that would show what settings where showing and for how long.

I realise ive tried to do this unconventially, hopfully how ive done it this way wont be too confusing.

jerem1234
Specialist II
Specialist II

Looking at it further, I can see the problem. Not sure how you want to address it though. It is because you have multiple records with the same time (i.e. you have two records with time 12:59 and a few others). When you say [Equiment settings] = '40R', it doesn't know which records to choose from for the records that have the same time (There are 2 equipment settings to choose from).

Hope this helps!

samuel_brierley
Creator
Creator
Author

sorry for the late reply ive been working away,

Thank you for the help you where correct and this has led me to make small changes in the data that means everything is now working.

I really appreciate your time.

Sir you should be knighted!