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

IF Statement and Subfield function

Hi everyone, I have an issue and i m trying to solve it. Here we go:

I have a field called CUSTOMERS, which can be a person or a company.

If it is a person the name is in the format: First Name Last Name Middle Name (eg JOHN TAYLOR ANDREW)

If it is a company it just shows the name of the company (eg XEROX SA)

The way to distinguish them is by another field called STATUS. So if it is a person then Status is Person. If it is a company it could be either Ltd, SA etc.

What I want to do is to keep the name of the customer as is if it is a company, and create two fields LAST NAME and FIRST NAME(or 3 if i want to keep middle name as well).

Any ideas???   Thanks much

1 Solution

Accepted Solutions
danieloberbilli
Specialist II
Specialist II

instead of the inline load you can just use your load from...

like

Load *,

...

;

Load

STATUS,

CUSTOMERS,

...

from xyz.xls

View solution in original post

6 Replies
danieloberbilli
Specialist II
Specialist II

Maybe something like this. Please find qvw attached:

Capture67_2.PNG.png

Capture67.PNG.png

danieloberbilli
Specialist II
Specialist II

But it needs some finetuning in case there is more than 1 middle name. In this case you could use the mid() und subfieldfunctions to identify the start position of the middle words.

Not applicable
Author

Thanks for the answer. The table on top is exactly what i am looking for.

However, I don't want to use INLINE. I have extracted all the customers in an Excel file

and I m using this. There are about 3K customers.

Any suggestions?

danieloberbilli
Specialist II
Specialist II

instead of the inline load you can just use your load from...

like

Load *,

...

;

Load

STATUS,

CUSTOMERS,

...

from xyz.xls

Not applicable
Author

Thanks man. Very helpful!!!

Not applicable
Author

hi

I was looking for same solution. i got it from your answer. Just in Time!!!!!!!

thanks