Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Empty Strings - How to filter them out

I have a char field that either has a 10 digit number in it i.e. (0000658978) or it is empty.  After loading the table and then when I try and do a resindent load on this field where it's not equal to an empty string it does not weed out the lines where this field is empty.  Can anyone assist on the script to deal with this situation?  Thanks, Sean

1 Solution

Accepted Solutions
Not applicable
Author

Try:

WHERE len(trim(F1)) > 0

Regards,

Gordon

View solution in original post

9 Replies
Not applicable
Author

When you load this field into a list box does this empty string appear as a selection option?

ToniKautto
Employee
Employee

Sounds like you should get either blank strings or null values in your data. If this is the case you can filter on either or both conditions, for example by the principle below.

LOAD

F1

RESIDENT TableName

WHERE not IsNull(F1) AND Len(F1) > 0;

Not applicable
Author

In a list box it does not, but in a table I can select it and it will filter the table to show all lines where this field is empty.

Not applicable
Author

Try:

WHERE len(trim(F1)) > 0

Regards,

Gordon

Not applicable
Author

Hi,

While uploading the data go to "Enable Transformation Step" and in the Garbage Tab apply "Conditional Delete"

there you can delete as per you condition,

Not applicable
Author

This did not work.  I received the same results.  I also tried a couple of iterations and that did not work as well.the script is:

INNER

JOIN (BillingLine)
Load Distinct
%KEY_VBRP,
[Sales deal_KNUMA_AG]

Resident BillingLine where not IsNull([Sales deal_KNUMA_AG]) and Len([Sales deal_KNUMA_AG]) >0;

Not applicable
Author

Can you provide a sample?

Not applicable
Author

Ah, that did the trick, thanks much.

Not applicable
Author

just check the attached excel file and the table