I have just started work with UIPath and have some issues.
can you please help me to understand how to develop the follow code in UI Path for DataTable:
select client_number, Currency, Start_Date, End_Date, sum(Amount) as sum_amount, sum(Commision) as commision
group by client_number, Currency, Start_Date, End_Date
The excel example is attached.
Thank you very much in advance!
DimaUntitled.xlsx (10.8 KB)
It may help you.
Thank you very much. It works. Sorry for late reply
How can you sum the values of a column without using balareva.datatable.activities ?
Try below code
Amount is the name of the column that i am searching values to sum?
Yes “Amount” is column name from the datatable which you want to sum
DataTableName is as System.Data.Datatable
sum = DataTableName.Compute(“Sum(Amount)”, string.Empty) where sum is defined as int32
sum= Convert.ToInt32(DataTableName. Compute("SUM(Amount)", string.Empty))
Returns this error: Assign : Invalid usage of aggregate function Sum() and Type: Object.
Ok try below code
How do you have declared the variable that is storing the code? Since I’m not getting AsEnumerable
hi fellow, it seems this activity only can group and sum of on colunms, is it works while group multiple columns?
could you please help in grouping by column and sum values in a column
How do i get the total number of leaves for each leave type for each employee name ?
Can you please post based on which column we have to do group by, and how should be the output.
Hi @MAHESH1, thank you for your reply.
I need to get the output in terms of ‘total numberofDays’ for each employee Name for each ‘Leave type’
ex: xxx- casual leave - 2 (if there are multiple rows for casual leave for xxx, i should sum number of days)
Thanks in advance
It is a late reply. But it helps others. The below thread will help to solve it.
I’ve tried the same in ‘Native Group Aggregation’ but facing below error.Kindly assist me on this.
Check this link along with video.