How to do sum of specific product values by loop

Hello friends,

I have a data in excel and want to do sum of BPL product only.
For eg. BPL product total is=23. I want this output.

Thanks in advance.
image

Hi @Jeeru_venkat_Rao ,

Could you try with the below Expression :

DT.AsEnumerable.Where(Function(x)x("Product").ToString.Equals("BPL")).Sum(Function(x)CDbl(x("Values").ToString))

Here, DT is your Input Datatable which contains the data read using the Read Range Activity.

1 Like

@Jeeru_venkat_Rao : Here is the solution
image


For Assign Activity we use this expression
A=A+Cint(CurrentRow(“Values”))

Regards
Naman

Thank you @Naman_Jain for quick response.

Thank you @supermanPunch

1 Like

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