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: 
krishna20
Specialist II
Specialist II

Background color should ignore to Null Values

Hi Folks,

I am writing a background color expression and it's working fine. But, the color is allocating to Null values also, It's taking else condition's RGB().Expression should ignore when value is Null ( -) .

How can I achieve it, please look into the below expression and screenshot for the same and advise me.

Expression:

if($(vACD_Ag_RNA)<='5.0',RGB(255,255,125),

if( $(vACD_Ag_RNA)>'10.0' and $(vACD_Ag_RNA)<='15.0'  ,RGB(255,255,102),

If($(vACD_Ag_RNA)>'15.0' and $(vACD_Ag_RNA)<='40.0', RGB(255,255,0),

if($(vACD_Ag_RNA)>'40.0' and $(vACD_Ag_RNA)<='60.0' ,RGB(204,255,153),

if($(vACD_Ag_RNA)>'60.0' and $(vACD_Ag_RNA)<='85.0' ,RGB(153,255,51),

if($(vACD_Ag_RNA)>'85.0' and $(vACD_Ag_RNA)<='100.0',RGB(0,255,0), RGB(97,193,0)))))))

Image :

Nulls_Screenshot.PNG

Thanks

Krishna

1 Solution

Accepted Solutions
Anil_Babu_Samineni

We have one option like, But usually It won't effect for null values

If(IsNull($(vACD_Ag_RNA)), White(),

if($(vACD_Ag_RNA)<='5.0',RGB(255,255,125),

if( $(vACD_Ag_RNA)>'10.0' and $(vACD_Ag_RNA)<='15.0'  ,RGB(255,255,102),

If($(vACD_Ag_RNA)>'15.0' and $(vACD_Ag_RNA)<='40.0', RGB(255,255,0),

if($(vACD_Ag_RNA)>'40.0' and $(vACD_Ag_RNA)<='60.0' ,RGB(204,255,153),

if($(vACD_Ag_RNA)>'60.0' and $(vACD_Ag_RNA)<='85.0' ,RGB(153,255,51),

if($(vACD_Ag_RNA)>'85.0' and $(vACD_Ag_RNA)<='100.0',RGB(0,255,0), RGB(97,193,0))))))))


OR


if($(vACD_Ag_RNA) >= '0.0' and $(vACD_Ag_RNA)<='5.0',RGB(255,255,125),

if( $(vACD_Ag_RNA)>'10.0' and $(vACD_Ag_RNA)<='15.0'  ,RGB(255,255,102),

If($(vACD_Ag_RNA)>'15.0' and $(vACD_Ag_RNA)<='40.0', RGB(255,255,0),

if($(vACD_Ag_RNA)>'40.0' and $(vACD_Ag_RNA)<='60.0' ,RGB(204,255,153),

if($(vACD_Ag_RNA)>'60.0' and $(vACD_Ag_RNA)<='85.0' ,RGB(153,255,51),

if($(vACD_Ag_RNA)>'85.0' and $(vACD_Ag_RNA)<='100.0',RGB(0,255,0), RGB(97,193,0)))))))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful

View solution in original post

3 Replies
Anonymous
Not applicable

One way, write another nested if condition to track out null values and assign the color white or grey to it

Clever_Anjos
Employee
Employee

Maybe

IF(isnull($(vACD_Ag_RNA)),white(),

if($(vACD_Ag_RNA)<='5.0',RGB(255,255,125),

if( $(vACD_Ag_RNA)>'10.0' and $(vACD_Ag_RNA)<='15.0'  ,RGB(255,255,102),

If($(vACD_Ag_RNA)>'15.0' and $(vACD_Ag_RNA)<='40.0', RGB(255,255,0),

if($(vACD_Ag_RNA)>'40.0' and $(vACD_Ag_RNA)<='60.0' ,RGB(204,255,153),

if($(vACD_Ag_RNA)>'60.0' and $(vACD_Ag_RNA)<='85.0' ,RGB(153,255,51),

if($(vACD_Ag_RNA)>'85.0' and $(vACD_Ag_RNA)<='100.0',RGB(0,255,0), RGB(97,193,0))))))))

Anil_Babu_Samineni

We have one option like, But usually It won't effect for null values

If(IsNull($(vACD_Ag_RNA)), White(),

if($(vACD_Ag_RNA)<='5.0',RGB(255,255,125),

if( $(vACD_Ag_RNA)>'10.0' and $(vACD_Ag_RNA)<='15.0'  ,RGB(255,255,102),

If($(vACD_Ag_RNA)>'15.0' and $(vACD_Ag_RNA)<='40.0', RGB(255,255,0),

if($(vACD_Ag_RNA)>'40.0' and $(vACD_Ag_RNA)<='60.0' ,RGB(204,255,153),

if($(vACD_Ag_RNA)>'60.0' and $(vACD_Ag_RNA)<='85.0' ,RGB(153,255,51),

if($(vACD_Ag_RNA)>'85.0' and $(vACD_Ag_RNA)<='100.0',RGB(0,255,0), RGB(97,193,0))))))))


OR


if($(vACD_Ag_RNA) >= '0.0' and $(vACD_Ag_RNA)<='5.0',RGB(255,255,125),

if( $(vACD_Ag_RNA)>'10.0' and $(vACD_Ag_RNA)<='15.0'  ,RGB(255,255,102),

If($(vACD_Ag_RNA)>'15.0' and $(vACD_Ag_RNA)<='40.0', RGB(255,255,0),

if($(vACD_Ag_RNA)>'40.0' and $(vACD_Ag_RNA)<='60.0' ,RGB(204,255,153),

if($(vACD_Ag_RNA)>'60.0' and $(vACD_Ag_RNA)<='85.0' ,RGB(153,255,51),

if($(vACD_Ag_RNA)>'85.0' and $(vACD_Ag_RNA)<='100.0',RGB(0,255,0), RGB(97,193,0)))))))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful