Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
lain_
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
Akhil_Reddy
Contributor III
Contributor III

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
Kushal_Chawda

Can you please elaborate?

lain_
Contributor III
Contributor III
Author

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.

Akhil_Reddy
Contributor III
Contributor III

axk6666_0-1594403110663.png

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