Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Qlik Analytics Tour 2020 Online. Begins August 10th. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor III
Contributor III

Use String Seperated by Commas in Set Analysis

I want to something like this: Sum({$<policy={'one, two, three'}>} Value). Is there a way without doing anything in the script editor? And I want it to work if the string length is different too, let's say if it goes 'one, two, three, four, five, six, seven'.

1 Solution

Accepted Solutions
Highlighted
Contributor III
Contributor III

Re: Use String Seperated by Commas in Set Analysis

axk6666_0-1594403110663.png

use subfield function on the field which your getting delimited comma field in script.

View solution in original post

3 Replies
Highlighted
MVP
MVP

Re: Use String Seperated by Commas in Set Analysis

Can you please elaborate?

Highlighted
Contributor III
Contributor III

Re: Use String Seperated by Commas in Set Analysis

Let's say policy has the string values 'one', 'two', and 'three'. I am getting the policy values as a comma delimited string: 'one, two, three'. I need set analysis to work where policy is matched to the values of this string. So with the set analysis of Sum({$<policy={'one, two'}>} value), I would get the sum of values grouped by where policy is equal to 'one' and 'two' but not 'three'. I want to be able to set analyses like Sum({$<policy={'one, three}>} value) and Sum({$<policy={three, two'}>} value), and Sum({$<policy={' two'}>} value) too. So I was thinking, I just needed to split the string I get 'one, two, three' into 'one', 'two', 'three' and feed it into the set analysis but I don't know how. And this can't be done in the load script because the string size changes.

Highlighted
Contributor III
Contributor III

Re: Use String Seperated by Commas in Set Analysis

axk6666_0-1594403110663.png

use subfield function on the field which your getting delimited comma field in script.

View solution in original post