Quantcast
Channel: SQL Server Reporting Services, Power View forum
Viewing all articles
Browse latest Browse all 10045

Average a LOOKUPSET with a code in SSRS

$
0
0

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


Viewing all articles
Browse latest Browse all 10045

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>