Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
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
Qrishna
Master
Master

See attached document.

output:

Capturex.PNG

View solution in original post

6 Replies
Qrishna
Master
Master

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
Partner - Specialist III
Partner - Specialist III

here is another option

=substringcount(Field,' ')



Not applicable
Author

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

Qrishna
Master
Master

See attached document.

output:

Capturex.PNG

Not applicable
Author

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