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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

unlogical issue

Hi All,

i have an excel sheet and i load the data from it in a qlikview document

there's some data fields in the excel sheet don't have values (blank fields)

like

NumberName
1
2x
3y

the first name is empty

in qlikview i want to use this expression

if ( Name = Null() , 0 , 1 ) in a straight table

but the result of the expression for all rows is 1

that's meaning this empty field isn't null

i tried also

if ( Name = ' ' , 0 , 1 )

but the same result

So, what's the value may be taken in this field???

3 Replies
MayilVahanan

hi,

     try this,

     if(len(trim(Name)) =0, 0, 1)

     Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

Not really unlogical. In SQL and in Qlikview, null (meaning unknown or undefined) is not the same an empty string, which has a defined state. For an empty string, you can use len() as in the previous post.

Or if you want to make the blanks genuinly null, use

Set NULLINTERPRET= ='';

Hope that helps

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
hic
Former Employee
Former Employee

Further, the expression Name = Null() will never work. NULL cannot be used in comparisons. See more on http://community.qlik.com/docs/DOC-3155.

HIC