Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
jpjust
Specialist
Specialist

Background Color Expression Issue

Hi,

I have an background color expression as below for a field (Field A  is made up of an expression)

=if([User Access Last  Used APAC] = 'Never', RGB(255,150,150),
if(Today() - [User Access Last Used APAC] OR Today() - [LastUsedASIA] < 14 , RGB(150,255,150),
if(Today() - [User Access Last Used APAC] < 30 , RGB(255,255,000),
if(Today() - [User Access Last Used APAC] < 60 , RGB(255,180,000), RGB(255,150,150) ))))

The issue is that the second IF condition is not working. (especially this one - Today() - [LastUsedASIA] )

Can anyone please suggest me what is wrong?

Thanks

3 Replies
GaryGiles
Specialist
Specialist

You need to specify < 14 for both sides of the OR operator, like this:

=if([User Access Last  Used APAC] = 'Never', RGB(255,150,150),
if(Today() - [User Access Last Used APAC] < 14 OR Today() - [LastUsedASIA] < 14 , RGB(150,255,150),
if(Today() - [User Access Last Used APAC] < 30 , RGB(255,255,000),
if(Today() - [User Access Last Used APAC] < 60 , RGB(255,180,000), RGB(255,150,150) ))))

jpjust
Specialist
Specialist
Author

Thanks Gary for the response.

I wish it would work but it is still not working.

For eg.,  [User Access Last Used APAC] is empty and [LastUsedASIA] is 2 , so I think the OR condition should take care of this and should highlight with the color RGB(150,255,150) but it is the taking the first IF condition and highlighting as RGB(255,150,150)

 

GaryGiles
Specialist
Specialist

LastUsedASIA would need to be a date field for Today() - [LastUsedASIA] < 14 to make sense.