Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
May 18th 10AM ET, Live Chat, bring your QlikView questions. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

replacing blank value with string

hi QV,

how do we handle blank values in Qv,

I have a field like DEL_BLOCK,some of that fields records coming as blank from DB.so I want to assign a string for blank values.

looks below is the cond i have used,is it fine??

If(IsNull([DEL_BLOCK]=' '),'Free','Blocked') as Blocked


Thanks


1 Solution

Accepted Solutions
Clever_Anjos
Employee
Employee

Please use TRIM, since you could have spaces into your field

If(len(trim([DEL_BLOCK]))=0,'Free','Blocked') as Blocked

View solution in original post

4 Replies
marcarreras
Specialist
Specialist

try with

If(len([DEL_BLOCK])=0,'Free','Blocked') as Blocked


Marc.

Clever_Anjos
Employee
Employee

Please use TRIM, since you could have spaces into your field

If(len(trim([DEL_BLOCK]))=0,'Free','Blocked') as Blocked

View solution in original post

JonnyPoole
Employee
Employee

NULL is different to blank. Its a long story...

NULL:

If(IsNull([DEL_BLOCK]),'Free','Blocked') as Blocked


Blank:

If([DEL_BLOCK]='','Free','Blocked') as Blocked


or like clever said


If( trim([DEL_BLOCK])='','Free','Blocked') as Blocked


or like marc said


If(len([DEL_BLOCK])=0,'Free','Blocked') as Blocked

maverjannet
Specialist
Specialist

If(IsNull([DEL_BLOCK]),'Free','Blocked') as Blocked