SQL Server 2012
Visual Studio 2010
Dataset being used is called Performance
Formulas
ACB = Average Capital Base
IRR = Internal Rate of return = Total Gain/ACB
Contribution = ACB/Sum(ACB)*IRR
我正在计算投资贡献。 这是一个计算示例。SSRS小计和总计的嵌套总计错误
Account Total Gain ACB IRR Contribution
ABC 2,000.00 20,000 10% 6.67%
DEF 2,000.00 10,000 20% 6.67%
total 4,000.00 30,000 13.33% 13.33%
总内部收益率和总贡献始终是相等的
注意的贡献是各行ACB乘以总和ACB的然后通过各行IRR相乘。
我有以下报告。我的问题是我无法获得小计和总计工作,因为嵌套聚合。我也不确定如何定位正确的数据范围。
内部收益率和内部收益率小计表达式(工作)
=Fields!TotalGain.Value/Fields!ACB.Value
=Sum(Fields!TotalGain.Value)/Sum(Fields!ACB.Value)
试图让贡献计算工作(出现数错误)
=Fields!ACB.Value/Sum(Fields!ACB.Value, "Performance")*Fields!IRR.Value
试图让小计和总的贡献(尽管数量是错误的)
=sum(Fields!ACB.Value/Sum(Fields!ACB.Value, "Performance")*Fields!IRR.Value)
我得到这个错误
Error 3 [rsInvalidNestedDataSetAggregate] The Value expression for the text box ‘Textbox29’ has a nested aggregate that specifies a dataset scope. Inner aggregates cannot specify a dataset scope. F:\Automater\SSRS\Reports_2012\PerformanceSample2.rdl 0 0
我认识错误的是与试图总结已经总结的价值有关,但这正是计算所要求的。
谢谢。我已在下面发布回复。 –