Reporting services 计算ssrs报告中的百分比

Reporting services 计算ssrs报告中的百分比,reporting-services,ssrs-2008-r2,Reporting Services,Ssrs 2008 R2,我有一份ssrs报告,上面有一个矩阵表,如下所示 YEAR A1 B1 Total percentage 2012 23 11 34 2013 12 12 24 2014 32 43 75 在这里,我需要使用下面的公式在ssrs表达式中找到百分比 (Total of current year-Total of previous year)/(Total of previous year)*100 [对于ex take 2012-2012年

我有一份ssrs报告,上面有一个矩阵表,如下所示

 YEAR    A1  B1 Total percentage
 2012    23  11  34    
 2013    12  12  24
 2014    32  43  75
在这里,我需要使用下面的公式在ssrs表达式中找到百分比

(Total of current year-Total of previous year)/(Total of previous year)*100

[对于ex take 2012-2012年总计2011年总计/2011年总计*100

最简单的方法是向数据集中添加一列包含上一年总计的数据。然后右键单击百分比字段并创建一个类似于上面要计算的表达式


一种简单的方法是使用函数previous,在SSRS中,该函数返回前一行项目。然后计算百分比如下:

((Previous(Count(Fields!Day.Value))-ReportItems!Textbox22.Value) / ReportItems!Textbox22.Value )
注意:Textbox22。值将是以百分比形式比较的基本项目/计数