Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
ben_skerrett
Contributor III
Contributor III

Concat rows in Load Script

Hi,

I am relatively new to QlikSense and I have read many posts on Concatenating in Load Scripts but I still can not find a solution.

I have a list of Orders and each order can have Multiple Statuses i.e.

Order                       Status

123                             A

123                             B

456                             A

456                             B

456                             C

 

I would like to see a result of:

Order                       Status

123                             A,B

456                             A,B,C

 

I am loading data from an excel document i.e. 

 

LOAD

Order,
Status


FROM [lib://50.Operations_SourceFiles/Productivity-MasterX.xlsm]
(ooxml, embedded labels, table is PlannedVActual);

 

From what I have read, I need to concat the data and group  but what script do I need to add to the above please?

Thanks

Labels (1)
1 Solution

Accepted Solutions
Kushal_Chawda

You can try concat on resident load like below

Data:
load Plnt,
....
Order
FROM Source

left join (Data)
load Order,
concat(distinct Stat,',') as Status
resident Data
group by Order;

View solution in original post

6 Replies
Kushal_Chawda

LOAD

Order,
concat( distinct Status,',') as Status

FROM [lib://50.Operations_SourceFiles/Productivity-MasterX.xlsm]
(ooxml, embedded labels, table is PlannedVActual)

group by Order;

ben_skerrett
Contributor III
Contributor III
Author

Kush,
Thank you for the reply, unfortunately I get an ' Invalid Expression' Error
I have taken a screen shot of the full script. Thanks in Advance. Ben

 

 

Untitled picture.png

Kushal_Chawda

screenshot is missing

ben_skerrett
Contributor III
Contributor III
Author

Is it visible now? Thanks

Kushal_Chawda

You can try concat on resident load like below

Data:
load Plnt,
....
Order
FROM Source

left join (Data)
load Order,
concat(distinct Stat,',') as Status
resident Data
group by Order;

ben_skerrett
Contributor III
Contributor III
Author

Kush,

That worked great.

Thank you for the help

Ben