Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
QLIKWORLD LIVE! MAY 16 - 19TH, EARLY BIRD DISCOUNTS! REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
has3240
Contributor II
Contributor II

Use a different value for Null Statement

Hello Everyone,

In my script, I am using the following if Statment, and it works fine. What I am struggling is with when there is a null value.

if(Category = 'Maintenance', "Description of Damage") No issue at all.

However, if Category = 'Maintenance' has a null value I want to use "Describe the incident" as a then statement. 

This is the function I tried to used and it not working

if(IsNull(Category = 'Maintenance'), "Describe the incident",  "Description of Damage"))

Please let me know what I am doing wrong.

Thanks in advance. 

 

4 Replies
brunobertels
Specialist II
Specialist II

may be this :

 

if(IsNull(Category), "Describe the incident",  if(Category = 'Maintenance', "Description of Damage"))

has3240
Contributor II
Contributor II
Author

Hey Bruno,

Thanks for your prompt reply. I tried and it's not working. 

brunobertels
Specialist II
Specialist II

Hi 

when you write " Category = 'Maintenance' has a null value" do you mean the cell is blank ? 

 

may be 

if(len(trim(Category))=0,'Describe the incident', if(Category = 'Maintenance','Description of Damage'))

regards 

has3240
Contributor II
Contributor II
Author

when you write " Category = 'Maintenance' has a null value" do you mean the cell is blank?. No just some of the value is blank. In all the blank values thats where I want to use "Describe the incident"