Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
innashna
Contributor II
Contributor II

Substrings in Array

Hello,

I have the array which looks like:

[2,4,5],[33,55,66].

Sometimes it looks like :

[545,345345,345435]

Meaning of values is:

value

[TYPE1, SERVICEID1, SOLUTIONID1], [TYPE2, SERVICEID2, SolutionID2]

I need to diverse this array to  6 different fields in both cases when I have either 6 fields or only 3:

Type1

ServiceID1

SolutionID1

Type2

ServiceID2

SolutionID2

 

Thanks,Inna

Labels (2)
1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

SubField(purgechar(myfield,'[]'), ',', 1) as Type1,
SubField(purgechar(myfield,'[]'), ',', 2) as ServiceID1,
// and so on

When the second group doesn't exist (Subfield indexes 4,5,&6) those fields will just be null in your table.

-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com

View solution in original post

1 Reply
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

SubField(purgechar(myfield,'[]'), ',', 1) as Type1,
SubField(purgechar(myfield,'[]'), ',', 2) as ServiceID1,
// and so on

When the second group doesn't exist (Subfield indexes 4,5,&6) those fields will just be null in your table.

-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com