Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Getting SSRS line chart series to represent cumulative values by time

Posted on 2010-09-08
6
Medium Priority
?
3,390 Views
Last Modified: 2012-05-10
Hi,

I have a line chart in my SSRS report that shows commission over time. The series group consists of two years, 2010 and 2009 so there are two lines running across my chart to represent each year. By default the chart is representing the sum of January followed by the sum of February, etc. What I need is for it to represent the series values cumulatively so you can see the sum of January followed by the sum of January and February, etc.

How is this best done in SSRS?

Many thanks in advance.
0
Comment
Question by:irb56
[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
  • 3
  • 2
6 Comments
 
LVL 14

Expert Comment

by:Emes
ID: 33631513
I would change the sql to return the sum values that you wish for the chart other wise you can use a formula for the series values.

=iif(month<2,sum(amt),0)  something like this not sure unless we get more detail.

0
 

Author Comment

by:irb56
ID: 33634214
Thanks for the reply. I've pasted a simplified version of my dataset below. Note that I am using effective_month as category in my line chart, effective_year as the series and Sum(commission_transacted) as the data. What I want to see is a line chart representing cumulative commission for the first 6 months of 2010 compared to the first 6 months of 2009. There are two lines on the chart, one representing 2009 and the the other one representing 2010. I want both lines to represent a continuous upward trend with June representing the total commission for 6 months, 2009 versus 2010. Are you able to illustrate how this would be achieved either via an expression in the chart or a modification of the dataset?

SELECT
      LEFT(DATENAME(month,cover_start_date),3) AS effective_month,
      DATEPART(month,cover_start_date) AS effective_month_no,
      DATEPART(year,cover_start_date) AS effective_year,
      SUM(ISNULL(commission_transacted,0)) AS commission_transacted
FROM Policies
WHERE DATEPART(year,cover_start_date) BETWEEN 2009 AND 2010
      AND DATEPART(month,cover_start_date) BETWEEN 1 AND 6
GROUP BY
      DATEPART(month,cover_start_date),
      DATEPART(year,cover_start_date)
ORDER BY effective_month_no;
0
 
LVL 10

Expert Comment

by:itcouple
ID: 33641753
Hi

I usually avoid cummulitive data on graphs but in your case that might work quite well as it is for comparison....

Anyway you might find this blog usefull (not necessarily this particular article) http://www.perceptualedge.com/blog/?p=790

Regards
Emil
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:irb56
ID: 33646320
Thanks for the Blog link. I couldn't find anything here to help me produce the cumulative line chart I wanted, just a tale about a situation where a bar chart displayed with cumulative totals has been used to mislead its audience. I appreciate that the use of cumulative totals is not a good idea in some circumstances but I think it's valid enough in my scenario. I developed a similar chart in Qlikview, which supports the display of cumulative totals with a single mouse click within the chart's properties and I am puzzled as to why this appears to be difficult to achieve in SSRS.

I have an idea about how this might be achieved which I'll work on and if it solves the problem, I'll post an update later today.
0
 
LVL 10

Accepted Solution

by:
itcouple earned 2000 total points
ID: 33646458
Hi

I had no intention to resolve your issue with this link. Stephen Few is information guru so I thought I will share his website with you.

Try this http://blog.stevienova.com/2007/07/02/ssrs-runningvalue-to-get-cumulative-totals/

Regards
Emil
0
 

Author Closing Comment

by:irb56
ID: 33647462
Thanks very much, that's perfect. From reading this article I was quickly able to resolve the issue. This involved changing the expression of the data field in my SSRS line chart from...
=Sum(Fields!commission_transacted.Value)

...to...

=RunningValue(Fields!commission_transacted.Value,Sum,Nothing)
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

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 …
Introduction Earlier I wrote an article about the new lookup functions (http://www.experts-exchange.com/A_3433.html) that ship with SQL Server 2008 R2.  In this article I’m going to show you another new feature of SSRS 2008 R2, this time in the vis…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

636 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