SSRS - Display only Top N Category Groups excluding duplicate groups at the end in Bar Chart

Viewed 900

Consider the following table

enter image description here

I need to generate a bar chart with the Category Group = "Country". The chart should only display the top 3 Groups based on the count of records for a country. I have already applied a filter for the Category Group specifying the Top N Condition as 3 for Count(Country). The chart generated, applies the filter as expected based on count, but i need only 3 bars to be shown even if there are bars with duplicate values.

Below is the chart that I get.

enter image description here

Expected Result

enter image description here

Now I know that, i can create an additional column in my dataset with ranking values and then apply a filter on this column to get the expected result (i have tried this, and it works)

Is there a way to achieve the expected result without changing the underlying Dataset?

Note: The dataset shown above is a highly simplified version of my dataset. In reality i have a huge dataset with a lot of columns. The same dataset has been used for various charts (with groupings on different columns).

2 Answers

I just found out, I could use an x-axis minimum of 0 and an maximum of 10.5 together with an interval setting of 1.

So, I was able to achieve a top 10 limitation and the axis labels show the names - (it may be a side effect but when I changed the axis maximum to a whole number, the axis no longer shows the names but numbers).

I was not really happy with the other approaches. They seems much of an overkill to me for such a simple requirement like limiting the number of bars shown in a chart.

Related