I need to create a line graph which shows top 10 Products which have made the highest sales for the current month and their trends the previous months.
My query for the dataset is something like this :
**select [Year], [Month] , ProductName, Sales from ABC;**
I inserted an ssrs Line Chart with
Values : Sum(Sales)
Category Group : Month
Series Groups : ProductName
I did a right click on the Series Groups and Changed the filtering and the sorting properties as below :
Filter :
Expression : Sales
Operator : Top N
Value = 10
Sorting :
Sort by : Sales Order by : Z to A
Logically , I expected to see the top 10 Products which have made the highest sales in the descending order , but I dont see that happenning.
Instead what I see is that the legend for the line graph is sorted in some random order and the first 10 products shown in the legend are only shown as part of the line graph. Can anyone tell me how I can resolve it ?
Let me know I can provide more details if needed.
Most of the time I find it is easier to do the aggregating, filtering, and ordering in SQL and just use SSRS to display the chart. You could change your dataset query to be something like this:
This will make it easier to get the chart working the way you would expect it to in your report.