简体   繁体   English

SSRS条形图的过滤结果

[英]Filtering results for SSRS Bar Chart

I have an SSRS report created using Report Builder 3.0. 我有一个使用Report Builder 3.0创建的SSRS报告。 We have an "ideas" portal where people can submit suggestions. 我们有一个“想法”门户,人们可以在其中提交建议。 We want to see data about this to see where ideas are coming from, the quality of ideas etc. 我们想查看有关此数据,以了解创意的来源,创意的质量等。

When the user runs the report, he/she selects from various criteria (parameters) such as the date of submission, the country, department etc. 用户运行报告时,他/她从各种标准(参数)中选择,例如提交日期,国家/地区,部门等。

I have checked the output and I get all the records I expect to see if I put them into a table on SSRS. 我已经检查了输出,得到了所有期望看到的记录,如果我将它们放入SSRS的表中。

I then show a series of bar charts below the drill down table. 然后,在向下钻取表下方显示一系列条形图。 Each bar chart shows different information - eg Top 5 people who have submitted ideas, top 5 people who have had ideas implemented etc. 每个条形图都显示不同的信息-例如,提交想法的前5名人员,实施想法的前5名人员等。

I used the bar chart category groups properties to put in some filters as follows: 我使用条形图类别组属性来放置一些过滤器,如下所示: 筛选条件

The bizarre thing is that I don't see what I expect to see. 奇怪的是我看不到我期望看到的东西。 I end up with too many results. 我最终得到太多结果。 Eg I can interrogate the data and see that the maximum number of implemented ideas is 2 for any one person. 例如,我可以查询数据,发现对于任何人来说,已实现想法的最大数量为2。 But the bar chart shows that a few users have 4 or 5 implemented ideas which is incorrect! 但条形图显示,一些用户有4或5个已实现的想法,这是不正确的!

I have tried putting the filters in on the chart properties but this doesn't seem to help (plus I don't seem to be able to put in top N aggregates on the chart properties level). 我尝试将过滤器放在图表属性上,但这似乎无济于事(再加上我似乎无法在图表属性级别上放入前N个汇总)。

I have also tried using countdistinct (this time on status = "SUBMITTED") but this also didn't help. 我也尝试过使用countdistinct(这次是status =“ SUBMITTED”),但这也无济于事。
Countdistinct选项

The output shows this (names chopped off the bottom of the chart but the x axis is names of people who submitted ideas. Notice the top person has 8 ideas with status of Submitted. But this is not true. This person has 8 ideas but only 5 have a status of "SUBMITTED". 输出显示此信息(名称从图表底部切下,但x轴是提交想法的人员的名称。请注意,最高人员有8个想法,其状态为Submitted。但这不是正确的。此人有8个想法,但仅5的状态为“已提交”。
条形图

The data looks like this (relating to the first bar in chart above). 数据看起来像这样(与上图中的第一个条形相对)。 Seems to be ignoring the filter on status: 似乎忽略了状态过滤器:

一位员工的数据

Any suggestions would be much appreciated in terms of how to resolve! 关于如何解决任何建议将不胜感激!

does CountDistinct(IdeaId) give you the correct results? CountDistinct(IdeaId)给您正确的结果? You likely have part of your query forcing the IdeaId to be replicated more than once. 您可能在查询中有一部分会强制IdeaId复制IdeaId When using count it will count all NON NULL values. 使用count时,它将计算所有NON NULL值。 use CountDisctint() to count unique non null values. 使用CountDisctint()来计算唯一的非null值。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM