总计算SSRS

时间:2017-06-23 06:48:08

标签: reporting-services reporting ssrs-2012 ssrs-tablix reportbuilder3.0

在报告生成器(SSRS)中,我需要按品牌计算“混合ACT与BGT”的总和,作为SKU的“混合ACT与BGT”值的总和。 SKU是Brand集团的儿童组。 SKU公式的“混合ACT与BGT”看起来像:

[>     =iif((Sum(iif(Fields!PL_Natural.Value = "Volume", Fields!P_L_Budget.Value, 0)))=0, ((Sum(iif(Fields!PL_Natural.Value =
> "Volume", Fields!P_L_ACT.Value, 0))-Sum(iif(Fields!PL_Natural.Value =
> "Volume",  Fields!P_L_Budget.Value, 0)))*(
> iif((Sum(iif(Fields!PL_Natural.Value = "Gross Revenue", 
> Fields!P_L_ACT.Value, 0))/Sum(iif(Fields!PL_Natural.Value = "Volume",
> Fields!P_L_ACT.Value, 0)))=0, 0, (Sum(iif(Fields!PL_Natural.Value =
> "Gross Revenue", Fields!P_L_ACT.Value,
> 0))/Sum(iif(Fields!PL_Natural.Value = "Volume", Fields!P_L_ACT.Value,
> 0))))-VariablesPL_GROSS_REVENUE_HL_BGT.Value))),
> ((Sum(iif(Fields!PL_Natural.Value = "Volume",  Fields!P_L_ACT.Value,
> 0))-Sum(iif(Fields!PL_Natural.Value = "Volume", 
> Fields!P_L_Budget.Value, 0)))*( iif((Sum(iif(Fields!PL_Natural.Value =
> "Gross Revenue",  Fields!P_L_Budget.Value,
> 0))/Sum(iif(Fields!PL_Natural.Value = "Volume", 
> Fields!P_L_Budget.Value, 0)))=0, 0, (Sum(iif(Fields!PL_Natural.Value =
> "Gross Revenue",  Fields!P_L_Budget.Value,
> 0))/Sum(iif(Fields!PL_Natural.Value = "Volume",
> Fields!P_L_Budget.Value,
> 0))))-(Variables!PL_GROSS_REVENUE_HL_BGT.Value))))][1]

我不能对品牌使用相同的公式,它返回不正确的结果,所以我需要得到一个值的总和。我应该为此目的使用哪种方法?我尝试使用ReportItems集合,但它不适用于聚合。所以请帮忙。提前谢谢!

抱歉,由于声誉不佳,我无法附上照片:(

0 个答案:

没有答案