带系列和平均值的 SSRS 图表
我正在 SSRS 中制作一个图表。
我的数据库返回的数据如下:
期间名称、问题、答案、计数、平均值、中位数
11 月 9 日,Can Haz Chezbrgr,是的,5, 4, 3.1
11 月 9 日,Can Haz Chezbrgr,No, 3, 4, 3.1
11 月 9 日,Can Haz Chezbrgr,DK,2, 4, 3.1
期间名称是主要分组,所有行的问题都相同。答案随计数而变化。平均值和中位数是根据期间名称和时间计算的。计数,但每个时期的所有值都相同。
我在 SSRS 中有一个图表,它按时期绘制答案。我正在尝试将平均值添加为单个绘图项目。问题是图例中每个答案的平均文本显示一次,但在图表中只显示一次(这是有道理的,因为值都是相同的。
这是一个示例图表:
这是我的报告定义的样子:
理想情况下,我希望平均值图例中只有一个条目,与答案没有关联。这可能吗?
感谢您的帮助!
I have a chart I'm making in SSRS.
My database is returning data like this:
Period Name, Question, Answer, Count, Mean, Median
Nov 09, Can Haz Chezbrgr, Yes, 5, 4, 3.1
Nov 09, Can Haz Chezbrgr, No, 3, 4, 3.1
Nov 09, Can Haz Chezbrgr, DK, 2, 4, 3.1
Period Name is the primary grouping, question is the same for all rows. Answer varies as does count. The mean and median are calculated based on period name & count, but are the same for all values in each period.
I have a chart in SSRS that's plotting the Answers by period. I'm trying to add the mean as a single plotted item. The problem is that the mean text is showing up once for each answer in the legend, but only once in the chart (this makes sense since the values are all the same.
Here is an example chart:
Here is what my report definition looks like:
Ideally, I'd like to have only one entry in the legend for Mean, with no association to the answer. Is this possible?
Thanks for your help!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在 Jerry Nee 作为 MSDN SSRS论坛,我有一个 解决方案。
简而言之,解决方案是:
1. 右键单击图表上的空白区域,获取“系列属性(名称)”,其中名称是系列的名称。
2. 进入图例页面,输入自定义图例“Mean”
3.编辑“不要在图例中显示该系列”的功能
4. 表达式为 =IIF(Fields!RowAnswerText.Value=Last(Fields!RowAnswerText.Value,"DataChart"),false,true)
感谢 Jerry 的帮助。现在我正在尝试对标签做同样的事情,但它对我不起作用......
With help from Jerry Nee as the MSDN SSRS forums, I've got a solution.
Briefly, the solution is:
1. Right-click a blank area on the chart to get the "Series Properties (NAME)", where name is the name of the series.
2. Go to the Legend page and enter a custom legend of "Mean"
3. Edit the function for "Do not show this series in a legend"
4. The expression is, =IIF(Fields!RowAnswerText.Value=Last(Fields!RowAnswerText.Value,"DataChart"),false,true)
Thanks to Jerry for the help with this. Right now I'm trying to do the same thing with the label, but it isn't working for me...