Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
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

Empty Strings - How to filter them out

Try:

WHERE len(trim(F1)) > 0

Regards,

Gordon

9 Replies
Not applicable

Empty Strings - How to filter them out

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

Employee
Employee

Empty Strings - How to filter them out

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

Empty Strings - How to filter them out

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

Empty Strings - How to filter them out

Try:

WHERE len(trim(F1)) > 0

Regards,

Gordon

Not applicable

Empty Strings - How to filter them out

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

Empty Strings - How to filter them out

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

Empty Strings - How to filter them out

Can you provide a sample?

Not applicable

Empty Strings - How to filter them out

Ah, that did the trick, thanks much.

Not applicable

Re: Empty Strings - How to filter them out

just check the attached excel file and the table

Community Browser