如何使用SSRS表达式计算表格报告中的总和和平均值

发布于 2025-02-02 05:00:35 字数 294 浏览 3 评论 0原文

“在此处输入映像说明”

我想显示底部的总成本,应该是

((112*1537)+(222*1567)+(54*2048))/388 = 1625

当前我正在使用以下表达式给我错的avg

=(SUM(Fields!Units.Value))*(Fields!Rent.Value)/SUM(Fields!Units.Value)

enter image description here

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

日记撕了你也走了 2025-02-09 05:00:35

该表达式将总单位乘以一个租金值。

(112 + 222 + 54) * (1537 or 1567 or 2048) / (112 + 222 + 54)

它应该在租金周围有一笔款项,但仍然是不正确的。

(112 + 222 + 54) * (1537 + 1567 + 2048) / (112 + 222 + 54)

它应该概括总成本(单位 *租金),然后除以平均单位数量:

=SUM(Fields!Units.Value * Fields!Rent.Value) / SUM(Fields!Units.Value)

最终将以:

(112 * 1537 + 222 * 1567 + 54 * 2048) / (112 + 222 + 54)

The expression is multiplying the total Units by a single Rent value.

(112 + 222 + 54) * (1537 or 1567 or 2048) / (112 + 222 + 54)

It should have a SUM around the Rent, but it would still be incorrect.

(112 + 222 + 54) * (1537 + 1567 + 2048) / (112 + 222 + 54)

It should sum the total Costs (Units * Rent) and then divide by the number of units for the average:

=SUM(Fields!Units.Value * Fields!Rent.Value) / SUM(Fields!Units.Value)

Which would end up as:

(112 * 1537 + 222 * 1567 + 54 * 2048) / (112 + 222 + 54)
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文