如何使用SSRS表达式计算表格报告中的总和和平均值
我想显示底部的总成本,应该是
((112*1537)+(222*1567)+(54*2048))/388 = 1625
当前我正在使用以下表达式给我错的avg
=(SUM(Fields!Units.Value))*(Fields!Rent.Value)/SUM(Fields!Units.Value)
I want show the total for cost at the bottom should be
((112*1537)+(222*1567)+(54*2048))/388 = 1625
Currently I'm using the following expression but its giving me wrong avg
=(SUM(Fields!Units.Value))*(Fields!Rent.Value)/SUM(Fields!Units.Value)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
该表达式将总单位乘以一个租金值。
它应该在租金周围有一笔款项,但仍然是不正确的。
它应该概括总成本(单位 *租金),然后除以平均单位数量:
最终将以:
The expression is multiplying the total Units by a single Rent value.
It should have a SUM around the Rent, but it would still be incorrect.
It should sum the total Costs (Units * Rent) and then divide by the number of units for the average:
Which would end up as: