我有以下的计算是每每个行组中SSRS运行:计算,不包括空值
=(count(Fields!RowNumber.Value)*sum(Fields!RowNumber.Value*Fields!Score.Value) - sum(Fields!RowNumber.Value)* sum(Fields!Score.Value))/(count(Fields!RowNumber.Value)*sum(Fields!RowNumber.Value*Fields!RowNumber.Value) - sum(Fields!RowNumber.Value)* sum(Fields!RowNumber.Value))
计算工作,以显示结果斜率。
问题是一些Fields!Score.Values在行组中是空白的,所以它不应该包含在计算中。 RowNumber是一个字段,对该行组中的每个分数添加1。
我该如何考虑这个计算来排除Fields!Score中的空值!Score.Value来自计算?
作为一个例子:
How it seems to be working How it should work:
1 0 (converting it to 0) 1 (not take into account this row)
2 0 (converting it to 0) 2 (not take into account this row)
3 4 3 4
4 4 4 4
5 4 5 4
6 4 6 4
你可以看到下面,上面的表达式转换坯料至0℃并用的0.914286一个不正确的结果,其中,作为正确的结果是0时,它并不需要完成向上将这些空白条目考虑在内。以下是其他一些例子。
这是在使用上述表达式在SSRS中重新创建的Excel中使用SLOPE功能(= SLOPE(F5:F10,E5:E10))。 Excel看起来非常聪明,可以忽略系列中的空白条目,并且我需要SSRS表达式中的相同功能。
一个这将是很好对第3-6行提供的Y的一个或两个样本有不同的数字和预期的结果 – niktrs
当然, done @niktrs – Philip