Get a row group and column group value in an SSRS Matrix detail cell

混江龙づ霸主 提交于 2019-12-11 13:13:36

问题


I have a matrix in an SSRS report, where the column group and the row group are based on the same dataset. So the same values appear in the column and row headers. The dataset includes a percentage value and I want to show the difference between the row and column percentage values in the detail cells. How do I get the percentage values for the column and row group to calculate the difference?

For example, If the data looks like this:
Group 1, 30%
Group 2, 5%
Group 3, 10%

Then here is what I want to turn it into. I want to show the difference between the percentage of the column and row values in the detail cell.

               Group 1 (30%)         Group 2 (5%)          Group 3 (10%)
Group 1
(30%)             n/a                          25%                              20%
Group 2
(5%)             25%                          n/a                               5%
Group 3
(10%)             20%                        5%                              n/a


回答1:


I was able to get this to work within the SSRS report by creating a cell in both the row and column headers for the percentage associated with each group value. I set the Name property for these two cells to RowPercentage and ColumnPercentage. In the detail cell expression I calculated the value this way:

=Abs(ReportItems!ColumnPercentage.Value - ReportItems!ColumnPercentage.Value)


来源:https://stackoverflow.com/questions/21212117/get-a-row-group-and-column-group-value-in-an-ssrs-matrix-detail-cell

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!