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

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
Anonymous
Not applicable

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
Creator III
Creator III
Author

Hiya

Thanks for your help, but used a different method.

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

Kind Regards