SSRS柱形图和折线图?

发布于 2024-11-09 08:42:27 字数 577 浏览 0 评论 0原文

你好,我有一个简单的 SQL 数据集,用于计算仪表读数...每天都有仪表读数,我想对计数进行求和,以每日间隔将其显示在柱形图中。我还想做的是将累积计数显示为一行,因此周一有 4 个订单,周二有 3 个订单,周三有 5 个订单 4+3+5 等。显然,我在 SSRS 中的某处读到了一个运行总计属性?有谁知道该怎么做?我被难住了!我目前有一个计数总和作为我读取的日期类别组的总值,但它似乎没有正确显示。周二没有显示 5 个订单,而是仅显示 1,1,1,1,1 等...

SELECT     COUNT(readingId), dateRead
FROM         Readings
WHERE     (dateRead BETWEEN @StarDate AND @EndDate) AND (webcontactid IS NOT NULL) AND (meter = 1)
GROUP BY Readings.dateRead

as you can看到 3 月 19 日不见了,因为我发现没有数据...有什么方法可以让它显示 0 或其他东西来显示什么都没有吗?

Hello I have a simple dataset in SQL that counts meter readings... There are meter readings every day and I would like to SUM the count, display that in a column chart at a daily interval. What I would also like to do is display a cumulative count as a line so 4 orders Monday, 3 orders Tuesday, 5 orders Wednesday 4+3+5 etc. Apparently there is a running total property I read somewhere in SSRS? Does anyone know how to do this? I'm stumped! I currently have a SUM of count as my total value with category group of date read but it does not seem to be displaying properly. Instead of saying 5 orders on tuesday, it is just showing 1,1,1,1,1 etc...

SELECT     COUNT(readingId), dateRead
FROM         Readings
WHERE     (dateRead BETWEEN @StarDate AND @EndDate) AND (webcontactid IS NOT NULL) AND (meter = 1)
GROUP BY Readings.dateRead

as you can see the 19 March is missing as I have found that there is no data... Is there any way I can get it to display a 0 or something to show there is nothing?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

善良天后 2024-11-16 08:42:27

我创建了一个条形图,将 dt 作为类别组,添加了一个名为 g1 的假系列组(按“A”分组),并使用了两个数据字段,一个包含表达式

=Sum(Fields!NReadings.Value)

,一个包含表达式

=RunningValue(Fields!NReadings.Value, Sum, "g1")

,并将其设置为显示为一条线。

我在 SSRS 2005 上得到了这个,但我希望它对 2008 年有所帮助。如果有人有办法做到这一点而不创建假系列,那么请告诉我。

在此处输入图像描述

I created a bar chart, put dt as Category group, added a fake Series group called g1 (Group by "A"), and used two data fields, one with the expression

=Sum(Fields!NReadings.Value)

and one with the expression

=RunningValue(Fields!NReadings.Value, Sum, "g1")

and set this to appear as a line.

I got this on SSRS 2005, but I hope it helps for 2008. If anyone has a way to do this without creating a fake Series, then please let me know.

enter image description here

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