Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Vince_CH
Creator III
Creator III

Color empty cell in list box

Hi Community,

as attached excel illustrated similarly,  I want to color the empty cell (absolutely empty cell here!)  in yellow in Qlik sense.

firstly I have created an master measure with expression as below:

If(IsNUll([MatDoc_Posting_Date]),'0',Date([MatDoc_Posting_Date]))

 then pull this measure into list box, and set background color with expression as:

=If([MatDoc_Posting_Date]=0,yellow())

but it doen't work out. anyone can help here? thanks

 

 

 

6 Replies
Ivan_Bozov
Luminary
Luminary

Hi!

First,  you cannot assign color to a value in a list box (filter pane). You can do this in a table.

Second, I would suggest you do something like this in the script:

IF(LEN(TRIM(YourField))>0, YourField, 'Missing') AS YourField

And then color it using background color expression in the front end:

IF(YourField='Missing', YELLOW())

 

 

vizmind.eu
OmarBenSalem

As Ivan said, you can't color empty (null) cells in Qlik Sense; to be able to do so, u'll have to assign values to them to be able to color them.

Thus, Ivan's answer is the correct answer, u should accept it as a solution

 

Vince_CH
Creator III
Creator III
Author

Hello Gents, thanks for reply. My intial intention is to assign '0' as the value to replace empty cell, but failed.

I just tried your way too, as screenshot illustrated below, but it didn't return yellow background too in the table.

11.jpg

Vince_CH
Creator III
Creator III
Author

Hello All,

I did the following in master measure and  in color background expression. now the "missing" can be showed up in the table, but cannot be colored in background. however if to use a different expression in background color, we can see the color change only on value with date, instead of filed with "missing", i don't know why?

the strange thing was, I did some time ago with assigning "0" to empty cell and color background successfully, I don't know the failure reason behind here? can someone advise?

 

11.jpg

Ivan_Bozov
Luminary
Luminary

I tried it myself to confirm that it works. Below the test script, color expression and resulting table.

Color.png

vizmind.eu
Vince_CH
Creator III
Creator III
Author

Hello Ivan, but you saw my previous post yesterday in the same way as you did, with the source data from qvd file, it didn't return the desired color. so because of system surrounding context different? or what could be the reason?