Qlik Community

Ask a Question

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Our next Qlik Insider session will cover new key capabilities. Join us August 11th REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
h_prakash
Creator
Creator

Concatenate Two Values of a Field in the Load Edit Script

Hi All,

I have a two fields, Project Number and Path, For One project number there may be one to many Path's. I have a requirement in Qlik Sense where I have to create a table in which All the path's should be concatenated  by ' , ' specific to Project Number.

Now it is

Project Number      Path

1                         Path 1

1                         Path 2

2                         Path 1

2                         Path 2

2                         Path 3

According to the requirement

Project Number            Path

1                                 Path 1, Path 2

2                                 Path 1, Path 2, Path 3

I have tried Concat Function in the front end and I am able to achieve the above requirement. But there are many fields that I need to concat

and it is taking  2-3 min for the table to appear.

So I am thinking of concatenating the values in the load edit script.

I have tried using Concat function in edit script along with group by clause but it throwing error.

Please help.

4 Replies
rittermd
Master
Master

Can you provide the code you are using in the script and what the error is?

h_prakash
Creator
Creator
Author

Hi Mark,

Thank you for the response. Concat with Group by is working. Initially I have applied group by to only one field. Now I have applied to other fields and it is now working.

Thanks

Hari

rahulpawarb
Specialist III
Specialist III

Hello Hari,

Trust that you are doing well!

Please use below given script for your reference:

TmpPath:

LOAD * INLINE [

Project Number, Path

1, Path 1

1, Path 2

2, Path 1

2, Path 2

2, Path 3

];

Path:

LOAD [Project Number],

     Concat(Path, ',') AS NewPath

Resident TmpPath

Group By [Project Number];

Drop Table TmpPath;

Also refer the sample application file attached herewith.

Hope this will be helpful.

Regards!

Rahul

h_prakash
Creator
Creator
Author

Thanks Rahul..!!