报告生成器百分比出错了

时间:2018-03-28 07:10:21

标签: sql reporting-services reportbuilder3.0

iam使用报告构建器这是我的第一份报告,虽然我能够创建在列表报告中有一列,即使数据不存在,也会高达70%

这是我的col chart报告 enter image description here

来自sql server的数据就像这样

Start_Date  Total   Required
2017-04-01 00:00:00.000 6   6
2017-05-01 00:00:00.000 12  11
2017-06-01 00:00:00.000 3   3
2017-07-01 00:00:00.000 3   3
2017-08-01 00:00:00.000 7   7
2017-09-01 00:00:00.000 6   6
2017-10-01 00:00:00.000 3   3
2017-11-01 00:00:00.000 3   3
2017-12-01 00:00:00.000 3   3
2018-01-01 00:00:00.000 15  14
2018-02-01 00:00:00.000 13  13
2018-03-01 00:00:00.000 24  21

enter image description here

on x axis we have =FORMAT(CDATE(Fields!Start_Date.Value), "MMM-yy") & vbcrlf & Fields!Total.Value

on y axis we have =IIF(Fields!Total.Value = 0, 1, IIF(Sum(Fields!Required.Value) / Sum(Fields!Total.Value) = 1, 0, (Sum(Fields!Total.Value) - Sum(Fields!Required.Value)) / Sum(Fields!Total.Value)))

我认为6月份没有任何变化,我们应该得到0,但是即将到来的70%我感到困惑,请你在这里帮助我

0 个答案:

没有答案