Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
tmumaw
Specialist II
Specialist II

Nulls or Space or ??

I have a field that I have tried

if(Len(Trim(ZZCANCEL_STATUS]  > 0),1,0) as Can_SW

If(IsNull([ZZCANCEL_STATUS]) ,0,1) as Can_SW

Neither one works any ideas?

Thanks

1 Solution

Accepted Solutions
avinashelite

try like this

if( Len(Trim (ZZCANCEL_STATUS ) ) > 0,1,0) as Can_SW

View solution in original post

5 Replies
avinashelite

try like this

if( Len(Trim (ZZCANCEL_STATUS ) ) > 0,1,0) as Can_SW

Anil_Babu_Samineni

First one should be this? And second one okay to me

if(Len(Trim([ZZCANCEL_STATUS]))  > 0,1,0) as Can_SW

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
its_anandrjs

This way try

if( Len( Trim(ZZCANCEL_STATUS])  > 0,1,0) as Can_SW

Or

If( IsNull ( [ZZCANCEL_STATUS]) = -1 ,1,0) as Can_SW

sunny_talwar

May be this

If(Len(Trim(PurgeChar(ZZCANCEL_STATUS, chr(32) & chr(160)))) > 0, 1, 0) as Can_SW

chr(32) + chr(160) as spaces in string. How to eliminate in one step?

tmumaw
Specialist II
Specialist II
Author

Thanks worked perfectly