SQL 2005 Reporting Services-错误的平均值 [英] SQL 2005 Reporting Services - Wrong Average Values

查看:62
本文介绍了SQL 2005 Reporting Services-错误的平均值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个基本上显示时间信息的报告.

I have a report which basically shows time info.

共有三个级别或组:

 Route
    Fleet
      Vehicle

在车辆"级别下,报告显示了车辆每次行程的时间信息以及车辆的平均时间.

Under the Vehicle level, the report shows time info for each trip performed by the vehicle, and a time average for the vehicle.

在舰队"级别内,报告显示了每辆车的时间信息以及该舰队的平均值.

Inside the Fleet level, the report shows time info for each vehicle, and an average for that Fleet.

同样适用于路由级别.它列出了通过该路线的所有舰队的时间信息,以及该路线的平均值.

The same applies for the Route level. It lists time info for all the Fleets that travel through that route, and an average for that route.

问题是我得到了一些奇怪的路线平均值.我正在对所有平均字段使用标准的Avg函数.

The problem is that I am getting some weird Route averages. And I am using the standard Avg function for all the average fields.

例如,第一行应该以粗体显示平均时间. 在第二列中,它带来了时间平均值 01:25:30 .我希望的是(01:55:50 + 01:10:20)/2 = 01:33:05.

For instance, the first line is supposed to show an average of the times in bold. On the second column, it brings the time average value of 01:25:30. What I wished was (01:55:50 + 01:10:20)/2 = 01:33:05.

我猜想,不是平均考虑舰队时间,而是考虑第一行以下的所有时间.

I guess that instead of considering only the Fleet times in the average, all the times below the first row are being considered.

有什么方法可以实现我想要的?

Any way of achieving what I want?

预先感谢

推荐答案

您是否已确保将每个级别的相同字段平均化?另外,您可以在设计视图中发布表格的外观吗?另一个有用的项目是您的sql代码看起来是什么

have you made sure that you've got it averaging the same field at each level? Also, could you post what your table looks like in design view? Another helpful item would be what your sql code looks like

这篇关于SQL 2005 Reporting Services-错误的平均值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆