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: 
Dayna
Creator II
Creator II

How to select first word in a statement

Hello,

Only a small one, but we have multiple customers that belong to the same account, but the names differ, i.e.

Bubble Ltd
Bubble International
Bubble PLC
Health R US
Health Ltd
Health and Simple
Etc...

I want to provide the user with a list of just "Health" and "Bubble", only selecting the first word in each of these statements, as some customers could have 20+

Could you please advise as to the best method to do this?

Kind Regards,
Dayna

1 Solution

Accepted Solutions
Not applicable

subfield(Customer,' ',1)

View solution in original post

6 Replies
Not applicable

Hi,

You can create groups while loading data from qvd/database.

use the following code:-

if(Customer like 'Bubble*','Bubble', if(Customer like 'Health*','Health','Others')) as CustomerGroup

Now you will have groups :-

Bubble:- All the customers starting with Bubble.

Health:- All the remaining customers.

Now you can use CustomerGroup for selection.

Or the second idea is to provide a list box and ask the user to type the first word then all the possible values will be highlighted then press enter key. all the highlighted values will get selected.

If you have only 2-3 groups better create them using first idea, but if you have multiple groups then try the second one.

Hope this will help you.

Thanks & Best Regards,

Kuldeep Tak

Dayna
Creator II
Creator II
Author

Hello,

Thank you for your quick response! Unfortunately, we have over 100 customers in the system, which changes all the time so I cant specifiy each group. Preferably, I need something that would automatically group them together depending on the first word (as this will always be the how to group the customer).

Kind Regards,

Dayna

Not applicable

Then you can use the second idea.

Thanks & Best Regards,

Kuldeep Tak

Not applicable

subfield(Customer,' ',1)
Dayna
Creator II
Creator II
Author

Hello,

That is what they are currently doing, as the list box displays all the results. Unfortunately they would like to see the results as them grouped as the first word.

Kind Regards,

Dayna

Dayna
Creator II
Creator II
Author

Perfect!

Thanks Richy!