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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to concat values?

this is the box i have:

Capture.PNG.png

however, this is the desired output:

Capture1.PNG.png

So, how to do it?

16 Replies
CELAMBARASAN
Partner - Champion
Partner - Champion

Use SubField(FieldName, ',')

Try it in Script, not as expression in chart

its_anandrjs
Champion III
Champion III

Add new field in the load like

SubField(YourFieldNameHere, ',') as NewField

sudeepkm
Specialist III
Specialist III

Do you just want to show the three categories ignoring others?

or

you want to merge the other categories to the major 3 categories?

its_anandrjs
Champion III
Champion III

Load your table like

Source:

LOAD * Inline

[

String

'a,b'

'c,d'

'p,q'

];

if you want after ' then use SubField(String,',',1) otherwise use SubField(String,',')

LOAD  SubField(String,',') as NewField1, SubField(String,',',1) as NewField2;

LOAD * Inline

[

String

'a,b'

'c,d'

'p,q'

];

Not applicable
Author

i want to merge the other categories to the major 3 categories, however, for example"user request, recovery" is combine together how to separate them and add in accordingly?

Not applicable
Author

PFA..

Hope this helps you

sudeepkm
Specialist III
Specialist III

Assume that you have a record with RecID = 11 which has "Request, Recovery" in the table:

RecID -  Purpose

11 -  Request,Recovery

then do you want two separate records to be created like below

RecID - Purpose

11 -  Request

11 - Recovery

blaise
Partner - Specialist
Partner - Specialist

I guess the numbers to the right are the frequency?

If you want to split "User Request, Recovery" with a freq. of 8, how many of those do you want for "user request" and how many for "Implementation"? Any other field in the datamodel that can answer that question?

If you do not care about the frequency i would suggest to create a new field in your datamodel using the subfield() function.

split:

load

     [Purpose_of_Request/fieldvalue],

     subfield([Purpose_of_Request/fieldvalue],',')     as splitField

resident

     tablename

;

subfield() without the "index" parameter is quite useful for cases like this.

Not applicable
Author

yes, after separate them then add in to the main category. but the number of request and recovery may not be the same it according to the data i have.