To find the sum of the “Amt” column for the “Id” number 180 in UiPath, you can use the following steps:
Read the input data: Use a Read Range activity to read the data from your data source (e.g., an Excel file or a DataTable). Store the data in a DataTable variable, let’s call it “dtInputData”.
Filter the data: Use a Filter Data Table activity to filter the rows based on the “Id” column. Set the filter condition to "Id" = "180". This will create a new DataTable, let’s call it “dtFilteredData”, that contains only the rows with “Id” equal to 180.
Calculate the sum: Use a For Each Row activity to iterate over each row in “dtFilteredData”. Within the loop, perform the following steps: a. Use an Assign activity to convert the “Amt” value to a numeric format. You can use the following expression:
Output the sum: Once the loop is complete, you will have the total sum of the “Amt” column for the “Id” number 180 stored in the “totalAmt” variable. You can use a Write Line activity or assign the value to a variable for further processing or display.