I need logic for this excel activity, I need to add all debit values of 1-Sep then for 2-sep I need add all the debit value belong to this date,,,So on

Screenshot 2021-12-09 180738
for first 1-sep total debit value is 200+200+200+200=800 then for 2-sep total debit value is 200+200+200=600 for 3-sep 200+200+200=600 so i need three seperate total debit value for 3 days using if activity
1-Sep-2021= 200+200+200+200=800
3-sep-2021=200+200+200=600…for each each day It should have new added value…It shout not debit values of another date.

in general you can do it by a groupby

Build datatable activity, configure an empty datattable with 2 cols: ValueDate, Sum - dtResult

Assign activity
LHS: dtResult

(From d in YourDataTableVar.AsEnumerable
Group d by k=d("VALUE DATE").toString.Trim into grp=Group
let ds = grp.Sum(Function (x) CDbl(x("DEBITS").toString.Trim))
Let ra =new Object(){k,ds}
Select r=dtResult.Rows.Add(ra)).CopyToDataTable

it could be the case that we have to handle the grouping key differently. This depends on values present in the datatable after reading the excel (Could be the case that it will be 09/01/2021 00:00:00). You can check it while debuging e.g. in immediate panel.

Also have a look here:

Understanding the 6 Debugging Panels of UiPath in the easiest way possible! - News / Tutorials - UiPath Community Forum

1 Like

Can I able to apply this method for all the 30 days in a month, is it possible, from 1sep to 30th sep

It is grouping dynamicly for all records within the datatable
With a combined filtering it can be limited to a subset of records

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