mitchimus
mitchimus

Reputation: 828

SSRS - Sorting Series by value In a Stacked Bar chart

I have a dataset that I'm representing as a stacked bar chart. I want to order each series by it's value (See image)

enter image description here

The ordering works as expected in the first column, however proceeding columns maintain the order of the last, regardless of their value.

Is this possible in SSRS? Im current sorting the series by value.

Upvotes: 2

Views: 16767

Answers (2)

Sarat
Sarat

Reputation: 176

I don't have enough reputation to give a comment so posting this as an answer.

By looking at your graph I can presume that maybe your value is not an integer or you haven't put the right field for sorting the series.

In series properties go to the sorting and sort by the value instead of the name of the stacked bar as below the screenshot. enter image description here

If this too is not resolving your problem then you have to look ur closely and decide what u want to put in group and what u want to put in ur sorting.

Upvotes: 6

mitchimus
mitchimus

Reputation: 828

Thanks for your responses. I fixed the issue by utilising the following SQL to seperate each category group to have its own order.

SELECT Row_number() 
     OVER ( 
       partition BY createddate 
       ORDER BY Count(loggedrecid)) AS Col_group, 
   Count(loggedrecid), 
   createddate, 
   ownerteam 
FROM   @allrequests 
WHERE  faculty IN ( @faculty ) 
GROUP  BY createddate, 
      ownerteam 
ORDER  BY createddate ASC 

enter image description here

I then added Col_group as the Series group and ordered it by Col_group

enter image description here

All working as expected! Thanks for the assistance.

Upvotes: 1

Related Questions