

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
if statement for colour expression
Hiya
in qlik sense, I am using a Pivot table.
I am trying to write a if statement for different conditions to, change either the background colour or
I need to able able to define two conditions or 3 conditions are matched
e.g
IF(Library = '1' and Cafe = '0', rgb(153,102,0),
issue I have is using the same line but in different context
IF(Library = '1' and QSRoom = '0', rgb(153,102,0),.... I want this to go the same colour but it does not change
also having issues when defining 3 conditions
IF(Library = '1' and Cafe = '0' and QSRoom = '0', rgb(153,102,0),
please help
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Missed the nesting:
IF(Library = '1' and QSRoom = '0', rgb(0,0,0),
If((MeetingCancelled = '1' and MeetingReallocated = '1'), Green(),
if( MeetingCancelled = '1', Yellow(),
if( MeetingReallocated = '1', Green(),
if( Library = '1' , Red ()
)))))

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you post a Qlik Sense app that illustrates the problem? Because your description doesn't give enough information to even make a wild guess as to what could be a solution.
talk is cheap, supply exceeds demand


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hiya
cant sorry but ..
I trying to write something like this
IF(Library = '1' and QSRoom = '0', rgb(0,0,0),
if( MeetingCancelled = '1', Yellow(),
if( MeetingReallocated = '1', Green(), *
if( Library = '1' , Red () ,
If((MeetingCancelled = '1' and MeetingReallocated = '1'), Green(), ***
)))))
issue 1 I am having is using to lines to get the same colour * works and *** does not work
issue 2 is
IF(Library = '1' and Cafe = '0' and QSRoom = '0', rgb(153,102,0),
when I have 3 conditions, I get no colour
please help

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
you look to be doing a nested IF statement, but i am not sure what the * are meant to do?
If you remove them, does it work?
IF(Library = '1' and QSRoom = '0', rgb(0,0,0),
if( MeetingCancelled = '1', Yellow(),
if( MeetingReallocated = '1', Green(),
if( Library = '1' , Red () ,
If((MeetingCancelled = '1' and MeetingReallocated = '1'), Green())
))))


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hiya
the * were just to show where I think the error is this statement.
my statement already reads
as
IF(Library = '1' and QSRoom = '0', rgb(0,0,0),
if( MeetingCancelled = '1', Yellow(),
if( MeetingReallocated = '1', Green(),
if( Library = '1' , Red () ,
If((MeetingCancelled = '1' and MeetingReallocated = '1'), Green())
))))
but I cant get the two areas to go green()
please help

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ahhhh!
the order of your IF statements is the problem
IF(Library = '1' and QSRoom = '0', rgb(0,0,0),
If((MeetingCancelled = '1' and MeetingReallocated = '1'), Green())
if( MeetingCancelled = '1', Yellow(),
if( MeetingReallocated = '1', Green(),
if( Library = '1' , Red () ,
))))


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hiya
no sorry problem still remains.
just tried this on its own
If((MeetingCancelled = '1' and MeetingReallocated = '1'), Green())
and it don't work
please help

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Missed the nesting:
IF(Library = '1' and QSRoom = '0', rgb(0,0,0),
If((MeetingCancelled = '1' and MeetingReallocated = '1'), Green(),
if( MeetingCancelled = '1', Yellow(),
if( MeetingReallocated = '1', Green(),
if( Library = '1' , Red ()
)))))


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hiya
thank you x it worked
