问题
I have the following ssrs matrix that I am building :
Month(Column)
Sales(Rows) SalesData (Data)
My data looks something like this :
Jan Feb March
Sales 10 3 9
What I would like to do now is to find the difference between each of the rows to show something like :
Jan Feb March
Sales 10 3 9
#change -7 6
In an ssrs table its a simple expression .
I do not know how I need to do it in a matrix since the Months Columns are generated dynamically
Please direct me..
Just wanted to add this to clarify :
This is how my matrix looks
Month(Column)
Sales(Rows) SalesData (Data)
回答1:
If you right click on the row group and put 'Add Total'
![](https://i0.wp.com/i.stack.imgur.com/Sblx4.png)
Then click on the area that they up the Total for you.
In the value section add an expression like: Fields!YourOtherFieldToCalculate.Value - Fields!YourFieldToCalculate.Value
If you are dealing with the same values you could add this
ReportItems!SomeTextBox.Value - ReportItems!SomeOtherTextBox.Value
(though I think you would have to add it into the footer)
With your new clarification I would go with Sam's use of Previous: though I would have used but his checks for nulls which is a good thing!
=Fields!Column.Value - Previous(Fields!Column.Value)
来源:https://stackoverflow.com/questions/20148560/find-the-difference-between-two-columns-in-an-ssrs-matrix