简体   繁体   中英

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)

在此处输入图片说明

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.

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. 在此处输入图片说明

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.

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 

在此处输入图片说明

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

在此处输入图片说明

All working as expected! Thanks for the assistance.

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