So I have a dataset where I need to sum the lookupset and I achieved this by using the below code, however i now need to average another column from the same dataset (by lookupset) and I cannot seem to replicate a function like below. Any guidance would greatly appreciated.
Function SumLookup(ByVal items As Object()) As Decimal If items Is Nothing Then Return Nothing End If Dim suma As Decimal = New Decimal() suma = 0 For Each item As Object In items suma += Convert.ToDecimal(item) Next Return suma End Function