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: 
Manuel1
Contributor
Contributor

Merge and sum value from rows with same ID

Hello,

I need help with the following question:

I have one table: Amount

with the following columns: ID and Amount

I now want to combine and sum within load script the amount for each ID.

Example: Table Amount

ID                     Amount

1                          10

2                           30

1                          40

2                          50

What i want in the end is one table with:

ID                     Amount

1                          50

2                          80

 

I need to do the calcultaion within the Script.

Thanks in advance.

Best regards

2 Replies
martinpohl
Partner - Master
Partner - Master

noconcatenate 

load

ID,

sum(Amount) as Amount

resident Yourdatas

group by ID;

drop table Yourdatas;

Regards

Manuel1
Contributor
Contributor
Author

Yeahaaa !!! Thank you so much! It worked like a charm.

Have a nice week!