Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
OmarBenSalem

Split one value (exp: A\B\C) into A B C (3 values) within a selection list in the front end(not the script)

Hi guy, stalwar1

Is it possible to split one value into different values based on a seperator?

Exp:

I have this field containing only one value :

Capture.PNG

The seperator is ','

I want to have in this field all the values seperated:

Trade

Delta

IR

CREDIT

etc

is it possible within QLIK SENSE? Is there a function to do so in the FRONT END.

1 Solution

Accepted Solutions
sunny_talwar

Something along these lines

Dimension

ValueLoop(1, SubStringCount(Alpha, ',')

Expression

=SubField(Alpha, ',',  ValueLoop(1, SubStringCount(Alpha, ',')))

View solution in original post

13 Replies
OmarBenSalem
Author

I've tried with

=subfield( vTest,',')

(the field is a variable)

but the result was as follow:

Capture.PNG

sunny_talwar

You might be able to use ValueLoop with subfield... but what exactly are you trying to do?

OmarBenSalem
Author

As I told you Sunny,

I have a filter called "ALPHA" that contains only one value: a,b,c,d,f,g,h (for exp)

I want to split this value into different ones, to have :

ALPHA:

a

b

c

d

f

g

h

as a filter..

vinieme12
Champion III
Champion III

Even if you do manage to split it in the Front End that will not change any associations that exists in your data model.

To be able to use it as a filter you will have to split it during the data load .

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
sunny_talwar

vinieme12‌ is right, even if you are able to split... selections won't be the way you would want.... what is your use case here?

OmarBenSalem
Author

Yes I know, it's just a way of viewing things that matters in this case

OmarBenSalem
Author

The subfield(myfield,'/') as myfield2 does the trick when It's performed in the script:

Capture.PNG

but I HAVE to do this directly in the front end.

sunny_talwar

Something along these lines

Dimension

ValueLoop(1, SubStringCount(Alpha, ',')

Expression

=SubField(Alpha, ',',  ValueLoop(1, SubStringCount(Alpha, ',')))

vinieme12
Champion III
Champion III

You can load a small island table then to use as a listbox

List:

Load Subfield(Alpha,',') as Alpha2

Resident XXX;

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.