How to get total value of specific column in datatable

I need to sum the cost column. And Same it will check whether all data in same currency type or not. If its same. It process sum and get the total value, If Its different, It simply show error like cannot sum the value. Because it contains different currency types.


Create a Global variable of Double Type

For each(int row in Dt)

I used the below code to get total of the column. But it sum even if the currency is different. That is my problem
CDT.AsEnumerable.Sum(Function(x) Convert.ToDouble(x(“Cost”).ToString.Trim) ).ToString

1 Like

How many currency formats you have in that column

Go there

Three type. For this scenario i don’t want to sum the value. It simply need show error like “Could not sum the value, Because value of currency is different”.

If there are more than one Currency format then you dont want to sum the values right


Hi, how can i get row items from data table based on unique column value.

I use the below condition
ClientDT.Select("[Client\Partner ID]=’"+ClientID_Dist+"’")
But it gives result like

Hi i have problem to return AD(sam account name) value from powershell Script using uipath. I used invoke powershell activity. But it return a empty value. While running the Same command in powershell it was return the value.But using uipath it won’t.

How to check if one column in a datatable with multiple rows has same value or not using query