Joe Grosskopf
asked on
12 Month running total with SSRS
My manager wishes to see a 12 month running total on a ssrs chart. I see the running average on the data series option but do not see a running total (or 12 month running total for that matter). Can this be added? We use SQL 2012 with SQl Server Data Tools 2013.
Also, the data exist in a sharepoint list so if there is a way to add a calculated column on the list that shows 12 month rolling sum, then that would work as well
Thanks
Also, the data exist in a sharepoint list so if there is a way to add a calculated column on the list that shows 12 month rolling sum, then that would work as well
Thanks
I haven't tested it but I think you can do this by using the RunningValue function:
http://technet.microsoft.com/en-us/library/ms159136(v=sql.100).aspx
Use this in the values expression of your chart.
http://technet.microsoft.com/en-us/library/ms159136(v=sql.100).aspx
Use this in the values expression of your chart.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Decided not to use it
This goes in your code tab area..
Public Dim OldNum As String = Nothing
Public Function RunningTotal(ByVal BatchNum As Integer,ByVal BatchPdAmt As Decimal) As Object
Static BatchTotal As Decimal
If BatchNum <> OldNum Then
BatchTotal += BatchPdAmt
End If
OldNum = BatchNum
Return BatchTotal
End Function
This goes into total textbox area...
=Code.RunningTotal(Fields!
This sample I use for batch groups, So you will needt to change it to Months groups and amounts.