Solved

How to compare column totals in an ssrs matrix?

Posted on 2008-06-19
9
2,327 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 15

Expert Comment

by:rob_farley
ID: 21829525
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
ID: 21831925
How do I know if it's the 1st column or it's subsequent columns?  What variable holds the column number?
0
 
LVL 15

Expert Comment

by:rob_farley
ID: 21837111
You'd need to compare it to something you know is the minimum.
0
The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

 

Author Comment

by:phoobar
ID: 21847628
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
 

Author Comment

by:phoobar
ID: 21857575
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 15

Expert Comment

by:rob_farley
ID: 21862463
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
ID: 22047350
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
ID: 22326958
Phoobar,
I have a similar problem. What is the solution?
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

808 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