Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

joeybird
Contributor II

Colour a null

Hiya

unfortunately I have departments that are Null.

I need to fill in this as white, as a space to allocate

I have this colour expression in Qlik Sense

if(  Trainers =  '1' , Green() ,

IF(ISNULL(Department),rgb(128,128,128)

))

no joy

I have tried to change it to

If(Len(Trim(Department)) = 0 , rgb(128,128,128)

no joy

please help

2 Replies
darkhorse
Valued Contributor

Re: Colour a null

Hello Joanna,

Maybe you can try giving them a name at back end.

Like;

LOAD

*,

If(isnull(Department),'XX',Department as Department1,

FROM DATASOURCE;

If you want a more classy way to color departments, add a department color table to your model.

Like;

LOAD

Department,

Red_Dept,

Green_Dept,

Blue_Dept

FROM DATASOURCE;

Then on front end, you can colorcode them without using IF.

Like;

=RGB(Red_Dept,Green_Dept,Blue_Dept)

Should be joy, joy, joy then

BR

Serhan

joeybird
Contributor II

Re: Colour a null

Hiya

Thanks for your help, but used a different method.

,if(IsNUll([Department]), 'NotStated', [Department]) as [Department Main]

Kind Regards

Community Browser