hi, any linq i can use to sum values from Column C where Column A=X, and Column B=Y ?
e.g.
Date | Code | Amount
080924 | 1 | 100
080924 | 2 | 200
100924 | 1 | 100
to select date 080924, and code 1 & 2 , and sum up the amount = 300?
thanks
hi, any linq i can use to sum values from Column C where Column A=X, and Column B=Y ?
e.g.
Date | Code | Amount
080924 | 1 | 100
080924 | 2 | 200
100924 | 1 | 100
to select date 080924, and code 1 & 2 , and sum up the amount = 300?
thanks
From the request we can derive not all cleared details:
Maybe above sample only showcase Code 1,2 but we would question it if the second filter condition is needed. Otherwise we could also do:
Assign Activity:
mySum | Int32 =
(From d in dtData.asEnumerable
Where d("Date").toString.Trim.Equals("080924")
Where {"1","2"}.Contains(d("Code").toString.Trim)
Select a = CInt(d("Amount").toString.Trim)).Sum()
For further training have a look here:
[HowTo] LINQ (VB.Net) Learning Catalogue - Help / Something Else - UiPath Community Forum
Adressing again above:
Also have a look at grouping the data like: