Solved

12 Month running total with SSRS

Posted on 2014-03-31
4
1,337 Views
Last Modified: 2014-04-07
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
0
Comment
Question by:jsgrosskopf
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 27

Expert Comment

by:planocz
ID: 39969302
If you are grouping by months you could try this in the Code tab of your report.

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!BatchNum.value, Fields!BatchPdAmt.value)

This  sample I use for batch groups, So you will needt to change it to Months groups and amounts.
0
 
LVL 22

Expert Comment

by:Nico Bontenbal
ID: 39971446
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.
0
 

Accepted Solution

by:
jsgrosskopf earned 0 total points
ID: 39973051
Couldn't get it to work. Thankfully, my manager decided to use the moving average that was built in so there is no need for it now. Thanks
0
 

Author Closing Comment

by:jsgrosskopf
ID: 39982578
Decided not to use it
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Note:  There are two main ways to deploy InfoPath forms:  Server-side and directly through the SharePoint site.  Deploying a server-side InfoPath form means the form is approved by the Administrator, thus allowing greater functionality in the form. …
Hi All, I am here to write a simple article to move SSRS (SQL Server Reporting Services) reports from one server to another. When I have faced the same issue to move reports those were developed by developer on development server and now need to …
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question