i hae an excel sheet with 32 rows i need to find the following
I am new to UipATH … and i am not good at writing expression. so i need some help in that.
1.|Total Sales|| i want to find the total sum of the column but the last row which is (32nd) should be excluded from calculating the sum.||
2.|Average Sale per day||the average for this should be calculated with total sales+no of sales day||
3.|No.Of sale day considered||the num of sale should be calculated with the date <= 30 days (if date has 31 days also only 30 days should be calculated)only should be calculated and also there are some empty cells in bet the rows which should not be taken in count||
|||||
Hi @Rerigri,
Welcome to the UiPath community. Please refer to the following:
-
Sum from Datatable to sum the total sales, and then divide by the number of rows
-
Unsure of the 3rd requirement, could you please elaborate?
hi .
i want expression to write in the assign activity. for sum … and my question is …i have 30 rows in a column but i want only sum of 29 rows and that value should be written in dynamic cell…and the values are dynamic the rows will get increased dynamically …
You can read the Excel using Read Range activity. Then you will get a DataTable( DT).
Use DT.Rows.Count to get the number of Rows. If you want to exclude the last row then substract 1 to the above equation.
To find the sum, use the equation (SUM(C2: C+(DT.Rows.Count-1)) …Here i considered C as the column
@Rerigri Can you share that excel with sample data
date | product 1 | product 2 | peoduct 3 |
---|---|---|---|
06-03-2022 | 3 | ||
07-03-2022 | 4 | ||
08-03-2022 | 5 | ||
09-03-2022 | 6 | ||
10-03-2022 | 7 | 6 | |
11-03-2022 | 8 | 5 | |
12-03-2022 | 9 | 0 | |
13-03-2022 | 8 | 4 | |
14-03-2022 | 7 | 5 | |
15-03-2022 | 6 | 2 | 2 |
16-03-2022 | 5 | 3 | 1 |
17-03-2022 | 3 | 4 | 0 |
31-03-2022 | 4 | 5 | 8 |
30-03-2022 | 5 | 6 | 9 |
yyyyyy | 0 | 1 | 2 |
Total Sales | 1. i want to find the total sum of the column but the last row which is (YYY) should be excluded from calculating the sum. | ||
Average Sale per day | the average for this should be calculated with total sales+no of sales day | ||
No.Of sale day considered | the num of sale should be calculated with the date <= 30 days only should be calculated and also by excluding the emply cell should be taken in count |