Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to deconstruct a field with multiple values

Hello, i am just starting with qlikview. I think the solution is excellent. I have a question that has to to with preparing data:

In a customers database there is a field called serviceday indicating on which day a customer is helped e.g.:

0 1 2 3 4 5 6 

this means that the customer uses the service on all days of the week.

Another example:

1 3 5

this means that the customer uses the service on monday, wednesday, friday.

question:

1. how do i count the days for each field so that qlikview understand there are 7 days in the first example, and 3 days in the second example?

2. where could i find more info / manuals about these kind of data conversion in qlikview? because i'm expecting a lot in the coming project.

thanks for your response,

hope to find a solution,

Manolito

1 Solution

Accepted Solutions
krishna_2644
Specialist III
Specialist III

See attached document.

output:

Capturex.PNG

View solution in original post

6 Replies
krishna_2644
Specialist III
Specialist III

could you pleasse provide some sample data so that we can play around with ?

maxgro
MVP
MVP

lenght of the string after removing speces

=len(replace('0 1 2 3 4 5 6 ', ' ', ''))

ramoncova06
Specialist III
Specialist III

here is another option

=substringcount(Field,' ')



Not applicable
Author

Hi, Sure, here is a query of 10 rows.

krishna_2644
Specialist III
Specialist III

See attached document.

output:

Capturex.PNG

Not applicable
Author

Excellent work, much appreciated. I Starred you, thanks for the favor.