Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
FFBB1983
Contributor III
Contributor III

Apply background color expression to Null value

Hi,

 

I am applying RGB(248,203,173) to the last column in my table. However, the color didn't apply to the cell without value.

By far, I have tried the following scripts. Can you please let me know the right way to write?

if(IsNull(Max(TranDate)),rgb(248,203,173),rgb(248,203,173))

if(Max(TranDate)='',rgb(248,203,173), rgb(248,203,173))

if(isnull(Max(TranDate)), rgb(248,203,173))

 

 
 
 
 
 

1.JPG

8 Replies
Anil_Babu_Samineni

What is the original expression?

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
FFBB1983
Contributor III
Contributor III
Author

Original expression is Max(TranDate)

 

I added rgb(248,203,173) to the background color expression. This only put the color for the cells with value and leave the null cell gray. I would like to apply the same color to the null cell and make it looks consistent.

FFBB1983
Contributor III
Contributor III
Author

Can anyone help with this question?

Anil_Babu_Samineni

Check this?

if(IsNull(Max(TranDate)) or Len(Max(TranDate))=0,rgb(248,203,173))

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
FFBB1983
Contributor III
Contributor III
Author

Still not working.

 

It gives me this,

Capture.JPG

 
 
 
naveen_qlik
Contributor
Contributor

any update on this?

Ken_T
Specialist
Specialist

https://community.qlik.com/t5/New-to-Qlik-Sense/Qliksense-normal-table-background-colour-when-null-v...    this thread implies that the background color expression wont work unless there is a value in the cell.   It would be good if qlik support or a qlik employee could confirm this...

gomeri
Partner - Creator
Partner - Creator

Hello,

 you can't color null values in the cell from condition in Qlik Sense measure.

 

I suggest you to rename null cells in script editor by inserting this row:

 

 

 

IF(LEN(TRIM(TranDate))>0, TranDate, '-') AS TranDateNorm

 

 

 


And then apply condition for background of measure: 

 

 

 

IF((TranDate='-'), rgb(248,203,173), rgb(248,203,173))

 

 

 


Thanks

Giovanni O. D.