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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to exclude null values from data uploaded from a text file

Hello,

I've uploaded data from a text file containing several fields with missing values and I've tried in vain to discard the null values. When I try to do a pie chart, it doesn't exclude the missing fields.

I've tried SET NullInterpret= ' ';

I've also tried a null count but it doesn't work.

Thanks & regards,

Marie Joelle

9 Replies
jjfabian
Partner - Creator III
Partner - Creator III

Have tried using the "Supress when value is null" checkbox in the dimension tab of your chart?

Anonymous
Not applicable
Author

Marie,

A relaible way to check nulls and blanks is

len(trim(FieldName))=0

Regards,

Michael

nilesh_gangurde
Partner - Specialist
Partner - Specialist

Hi Mijouana,

Add the new field at the load time.

your script will be as follows:

if(Isnull(FieldName),'Null', FieldName) as New_FieldName,

this will give you the text "Null" where values are null.

Regards,

Nilesh Gangurde

nagaiank
Specialist III
Specialist III

A general discussion on null value handling in Qlikview is here.

A sample data of your application will be helpful to suggest solutions.

Not applicable
Author

I've tried but it doesn't work. I think it might be because I've loaded 2 different types of files, an excel one and a text file and have merged them, using two common fields as key fields. So, all the blank values associated to those two fields cannot be discarded.

Thanks anyway for your reply.

MJ

Not applicable
Author

I've tried that one too but it doesn't work. Maybe because the missing values are associated to two key fields(I've merged two different files using same columns as key fields) ?

Thanks anyway for your reply.

MJ

Not applicable
Author

The null count returns a 0 value. I think that either this must be because the missing values are associated to two key fields(I've merged two different files using same columns as key fields), or there might be something wrong with my data.

Anyway, thanks for your help.

MJ

Not applicable
Author

Thank you for the link,

Regards,

MJ

MayilVahanan

HI,

     While loading itself, you can use like this,

     Load *, if(Len(Trim(fieldName)) > 0, filedName) from filename.xls;

     So, you can remove the null value in it..

(or)

if u want to set null value , use like this,

     Load *, if(Len(Trim(fieldName)) > 0, filedName,'Null') from filename.xls;

 

               (or)

     NullAsValue *;

     Set NullValue = '<NULL>';

Hope it helps...

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