I have an excel list with 3 columns, one contains the customers, the second the information whether they receive a newsletter or not and the third the sales that the customer has generated in the last month.
I want to evaluate the total sales of customers who receive a newsletter. (Here the answer should be 50)
I would like this value to be output in a variable so that I can continue to work with it later.
Can someone help me?
I understand the logic but I don’t know exactly how to do it in UiPath.
I created a DataTable, then I selected the function “for each row” and specified my DataTable.
In the “for each row” activity I selected an If function, but what exactly do I have to write in it?
giv a try on yourDataTableVar.AsEnumerable.Where(Function (row) row(“Newsletter”).toString.Trim.Equals(“yes”)).Sum(function (x) CInt(x(“Sales”).toString))