Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
djaykumar
Contributor
Contributor

Concatenate more rows to one row

Hi All,

I am struggling with the concatenation of rows into single row.

please find sample Data and required Output.

Please help me in this.

Thanks

Jay

Labels (1)
1 Solution

Accepted Solutions
StarinieriG
Partner - Specialist
Partner - Specialist

Seems that Batch is not inside the group by.

Trying to load this script, it works well. 

Load

Material,

Storage,

Batch,

Max(Unrestricted) as Unrestricted,

Max(Blocked) as Blocked,

Max([In Qual. Insp]) as [In Qual. Insp],

Max([Restricted-Use]) as [Restricted-Use],

Max(Returns) as Returns
Group by

Material,

Storage,

Batch
;
load * inline
[Material,Storage,Batch,Unrestricted,Blocked,In Qual. Insp,Restricted-Use,Returns
Bolt,SPSL,342,0,2,0,0,0
Bolt,SPSL,520,3,0,0,0,0
];

View solution in original post

5 Replies
StarinieriG
Partner - Specialist
Partner - Specialist

Hi,

probably you need group by

Load

Material,

storage,

batch,

Max(Unrestricted) as Unrestricted,

Max(Blocked) as Blocked,

Max([In Qual. Insp]) as [In Qual. Insp],

Max([Restricted-Use]) as Restricted-Use,

Max(Returns) as Returns

From table

Group by

Material,

storage,

batch

;

djaykumar
Contributor
Contributor
Author

Hi StarinieriG,

Thank you for quick reply

I am getting correctly for the below required scenario in sheet2.

But I am not getting existing data which I am getting correctly in sheet1.

Please find attachment that now I am not getting scenario in sheet1 

I need both the scenarios to be met.

Thanks,

Jay 

 

djaykumar
Contributor
Contributor
Author

Attachment

StarinieriG
Partner - Specialist
Partner - Specialist

Seems that Batch is not inside the group by.

Trying to load this script, it works well. 

Load

Material,

Storage,

Batch,

Max(Unrestricted) as Unrestricted,

Max(Blocked) as Blocked,

Max([In Qual. Insp]) as [In Qual. Insp],

Max([Restricted-Use]) as [Restricted-Use],

Max(Returns) as Returns
Group by

Material,

Storage,

Batch
;
load * inline
[Material,Storage,Batch,Unrestricted,Blocked,In Qual. Insp,Restricted-Use,Returns
Bolt,SPSL,342,0,2,0,0,0
Bolt,SPSL,520,3,0,0,0,0
];

djaykumar
Contributor
Contributor
Author

Thanks StarinieriG

Now its working perfectly

Jay