[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2435
  • Last Modified:

How to compare column totals in an ssrs matrix?

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
phoobar
Asked:
phoobar
  • 4
  • 3
1 Solution
 
rob_farleyCommented:
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
 
phoobarAuthor Commented:
How do I know if it's the 1st column or it's subsequent columns?  What variable holds the column number?
0
 
rob_farleyCommented:
You'd need to compare it to something you know is the minimum.
0
Fill in the form and get your FREE NFR key NOW!

Veeam is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

 
phoobarAuthor Commented:
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
 
phoobarAuthor Commented:
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
 
rob_farleyCommented:
Reporting Services has a function called Previous which may do it for you - have a play and see.

Rob
0
 
phoobarAuthor Commented:
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
 
bnaictCommented:
Phoobar,
I have a similar problem. What is the solution?
0

Featured Post

Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now