Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
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


Labels (1)
1 Solution

Accepted Solutions
Clever_Anjos
Support
Support

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

try with

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


Marc.

Clever_Anjos
Support
Support

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

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

JonnyPoole
Former Employee
Former 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

Anonymous
Not applicable
Author

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