我正在尝试计算加权平均值但得到“#Error”。
我目前的公式是在tablix中的地面:
= SUM(Fields!EstimatedEPSGrowth.Value *(Fields!ProposedValue.Value / SUM(IIF(IsNothing(Fields!EstimatedEPSGrowth.Value),0,Fields!ProposedValue.Value))))
If语句存在,因为并非所有行都有EPS增长,以防该增长将针对该特定证券设置为0
答案 0 :(得分:0)
我认为你应该检查Fields!Proposed Value.Value = 0 if yes else 0 else 领域!ProposedValue.Value / SUM(的Field!ProposedValue.Valu E)
我已经为你编写了代码
SUM(
Fields!EstimatedEPSGrowth.Value*
(
IIF(IsNothing(Fields!EstimatedEPSGrowth.Value),0, IIF(IsNothing(Fields!ProposedValue.Value),0,Fields!ProposedValue.Value/SUM(Fields!ProposedValue.Value)))
)
)