Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Background color

I have a table that looks like this

ProjectNo

Gate

PlannedWeek

Delay

Status

1001

Gate1

2009/48

0

1

1001

Gate2

2009/50

3

0

1001

Gate3

2010/02

2

0

1002

Gate1

2009/42

1

1

1002

Gate2

2009/48

0

1

1002

Gate3

2009/51

0

0

1003

Gate1

2009/43

2

1

1003

Gate2

2009/47

3

1

1003

Gate3

2009/49

2

0

Delay and Status are input fields and I have a straight table where these values can be changed.

I have another table with all the weeks, and this table is not connected to any other table. I use this to select what week my time axis starts with. In my time axis I then plot all the gates with their planned week (within parenthesis) and week after delay. Like this:

Project

2009/43

2009/44

2009/45

2009/46

2009/47

2009/48

2009/49

2009/50

2009/51

1001

Gate1

(Gate2)

1002

Gate1

Gate2

Gate3

1003

(Gate1)

Gate1

(Gate2)

(Gate3)

Gate2

Gate3

So when delay is changed for a gate within a project, this gate moves on my time axis.

Each column is an expression which evaluates if the planned week or the week after delay is equal to the week selected (the second column is compared to the selected week plus one week). I tried first to do this with a pivot table but then I couldn't get it to work with the changes in the input fields.

But my problem now is this: How do I get the background color for the fields with gates without parenthesis to change based on if the status of the gate is 1 or 0. I can't get this to work.

I tried this

if(PlannedWeek+(Delay*7)=Week and Status =1, green(), if PlannedWeek +(Delay*7)=Week and Status=0, red(), white())

This did not work

Any ideas?

/Maja

2 Replies
Not applicable
Author

Any ideas?

Miguel_Angel_Baeyens

Check that expression syntax (a cpuple of parantheses are needed, I think) and put it on the "background color" settings under your Chart / Properties / Expressions. It should work.