Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Save the Date: QlikWorld Online, June 24-25, 2020. Free global virtual event for data integration and data analytic gurus. Register Today
Highlighted
Contributor II

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
Highlighted
Luminary
Luminary

Re: Color empty cell in list box

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())

 

 

Highlighted
Partner
Partner

Re: Color empty cell in list box

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

 

Highlighted
Contributor II

Re: Color empty cell in list box

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

Highlighted
Contributor II

Re: Color empty cell in list box

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

Highlighted
Luminary
Luminary

Re: Color empty cell in list box

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

Color.png

Highlighted
Contributor II

Re: Color empty cell in list box

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?