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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Luisanabria
Creator
Creator

IF for color condition

Hi All,

Hope someone can help me please:

I have  in my script this but in my table is not working as l want:

LOAD

"Sector (cp)"                   as [Sector CP Contacto]

if((Len("Sector (cp)"))>=5,1,0)             as [Flag Sector CP DIR Contacto]

and.. in one table i want to put this colors if the field is null (red) if not (green)

if([Flag Sector CP DIR Contacto]=0,rgb(235,0,0),rgb(231,239,220))

 

l have same conditional for "TIPO CONTACTO" and "ORIGEN CONTACTO" but for "Sector CP" is not working ok

fdoflogtz1_0-1658185137178.png

if in my table l put the "[Flag Sector CP DIR Contacto]" works ok, the condition but when use my field Sector CP with same condition no

fdoflogtz1_1-1658185316187.png

 

Hope someone can help me thanks

Labels (4)
1 Reply
Kayleigh_Milewski
Contributor III
Contributor III

I don't believe you can change the color of a null field unfortunately. What you could do is change the field to something like if(isNull(x), 0, x). That would replace all of the null values with 0 (or whatever value makes the most sense in your case). The background color would then be able to be changed.