简体   繁体   中英

Filtering results for SSRS Bar Chart

I have an SSRS report created using Report Builder 3.0. 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.

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.

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. But the bar chart shows that a few users have 4 or 5 implemented ideas which is incorrect!

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).

I have also tried using countdistinct (this time on status = "SUBMITTED") but this also didn't help.
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".
条形图

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? You likely have part of your query forcing the IdeaId to be replicated more than once. When using count it will count all NON NULL values. use CountDisctint() to count unique non null values.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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