Solved

How to compare column totals in an ssrs matrix?

Posted on 2008-06-19
9
2,249 Views
Last Modified: 2012-06-21
I have a matrix report that looks like this:

Product        Month1     Month2    Month3
xxx               123.45     234.56    345.67
yyy               987.65     876.54   765.43

Column group is month (there can be more than 3), row group is product (many rows)

I need a column after months 2 and 3 (etc..) with the differences:

Product        Month1     Month2   Diff 1-2  Month3  Diff-2-3
xxx               123.45     234.56    111.11  345.67    111.11
yyy               987.65     765.43    222.22  654.32    111.11

How do I set up the column with the differences in it to be hidden the 1st time, and subsequent times have the difference between the current and previous iteration?

Thanks

0
Comment
Question by:phoobar
  • 4
  • 3
9 Comments
 
LVL 14

Expert Comment

by:rob_farley
Comment Utility
Try setting the Hidden property to be based on an expression which comes out as True if the value of the first column isn't the minimum one (based on the outer scope).

I should point out that this isn't something I've tried before...

Rob
0
 

Author Comment

by:phoobar
Comment Utility
How do I know if it's the 1st column or it's subsequent columns?  What variable holds the column number?
0
 
LVL 14

Expert Comment

by:rob_farley
Comment Utility
You'd need to compare it to something you know is the minimum.
0
 

Author Comment

by:phoobar
Comment Utility
Perhaps I'm not asking the question in the right way.  

Specifically, how do I set up the column with the differences in it?  What is the expression that will give "diff between this amount and the previous amount"?

Can it be done with custom code?  How is the custom code executed?
0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 

Author Comment

by:phoobar
Comment Utility
Can anyone describe how custom code might be written to save the previous column's data and use it to compare to the current column?
0
 
LVL 14

Expert Comment

by:rob_farley
Comment Utility
Reporting Services has a function called Previous which may do it for you - have a play and see.

Rob
0
 

Accepted Solution

by:
phoobar earned 0 total points
Comment Utility
I figured out how to use code to acomplish my task.  I was using the 7 day free trial, and since I did not get answers to either of the questions I posed, I opted to cancel.  I didn't realize that I could still post a reponse, which would have been the polite thing to do.  I apologize for letting the question linger into abandonement.
0
 

Expert Comment

by:bnaict
Comment Utility
Phoobar,
I have a similar problem. What is the solution?
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

763 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now