ppr
(Peter Preuss)
March 3, 2022, 6:10pm
4
This HowTo introduces on the different options for grouping data from a datatable in order to process the grouped data.
Introduction
Grouping data and processing the grouped data is a common scenario e.g. when the grouped data is to aggregate like summing up, find maximum, get the average or concatening items.
Lets have a look on following data:
[grafik]
A possible scenario could be:
Create a report containing following information:
the region code
the sum of CaseCount per RegionCode
t…
Maybe Following Lookup Dictionary will help you
Assign Activity
LHS(left field) dictLK | DataType: Dictionary(Of String, Int32)
RHS:
(From d in YourDataTableVar.AsEnumerable
Group d by k=d("invoice").toString.Trim into grp=Group
Select t = Tuple.Create(k, grp.Count)).toDictionary(Function (x) x.Item1, Function (x) x.Item2)
dictLK(“2384305”) will return 2 as an Int32 Value
1 Like