How to Add all amount in data table

hello uipath comunity

here I want to add all the data in the data table how to do that
image
hear I want to add all amount And want to write it in front of the total amount how to do that can anyone help me to solve this I hope I will get a replay

Thanks
Chethan

Hello @copy_writes
try this

dt.Compute("SUM(Amount)", "").ToString

1 Like

sorry i didn’t get this would you please explain I want to add all the amount what u saw in the screenshot

i get this error when am using i try in different way but i am not get the solution

you need to pass the column name in that expression…
like in your case it would be like
InvoiceOP.Compute("SUM(Amount)","").ToString

1 Like

i get this error when i use that condition

I use this bellow i get the output

InvoiceOP.AsEnumerable.Sum(Function(x) Convert.ToDouble(x(“Amount”).ToString.Trim) ).ToString

2 Likes

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