Group by and sum last column

Dear RPA Developer,
i’m young beginner RPA.
I have the question how to create report
Currently i use
Excel application scope
Read range
Filter data table
Write range

but i need to know how to group by and sum last column and expected as pic below.

Could you please help to advise or sample to the right way.

Original >>>>>Expected

Thank you so much.

@pjaiphak - pls chk this link for reference & sample solution file…

1 Like

@pjaiphak please check the below link for solution:

If it doesn’t work, let me know.

1 Like

Hi @monsieurrahul
Thank you for advise. but i’m not sure it’s correct.
The compile error. i was struck at

"Then create one list of strings ListA

Then use this query
ListA=(From p In dta.Select()
Group p By ID=p.Item(“ID”).ToString Into GroupA=Group
Select Convert.ToString(GroupA.Sum(Function(x) Convert.ToDouble(x.Item(“Amount”).ToString)))).ToList()"

could you please help me or advise.

Thank you so much.
ZZ_SumActivities.xaml (11.3 KB)
DNBook1.xlsx (33.4 KB)
image

@pjaiphak
Find some starter help here
pjaiphak.xaml (7.8 KB)

1 Like

Hi @ppr
It’s working and result correct with expected.

Thank you again. :pray:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.