Search code examples
sqlreporting-servicesssrs-2008ssrs-2008-r2

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.


Solution

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