Skip to main content
Announcements
Get Ready. A New Qlik Learning Experience is Coming February 17! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Qlik_User007
Contributor
Contributor

Using Colours for a Dimension - colours not working correctly

Hi,

I have a table where I want to highlight the fields that are NOT empty in green, and the fields that ARE empty in red.  See field on the left below;

Qlik_User007_0-1615275150901.png

 

However I've used a few different formula's and the colours aren't working correctly. I tried using IsNull() but there must be some sort of data in the field as this didn't work.  Then I tried where LEN>0 but this didn't work either, and when I created a =len(lh_typec) which is the right hand field, it shows that even the empty boxes must have character spaces.  However using =if(Len(lh_typec=30),red(),green()) didn't work, nor does when Len<30.  This field may anywhere from 1 to 30 characters so I have to allow for that. There must be something strange in my data field, does anyone have any  ideas?  

Labels (1)
1 Solution

Accepted Solutions
Qlik_User007
Contributor
Contributor
Author

Thank you for your reply, however I managed to solve it by using if(len(trim(lh_typec)),green(),red()) which has worked correctly.

View solution in original post

2 Replies
NitinK7
Specialist
Specialist

can you attach here your qvf file?

Qlik_User007
Contributor
Contributor
Author

Thank you for your reply, however I managed to solve it by using if(len(trim(lh_typec)),green(),red()) which has worked correctly.