Quantcast
Channel: SQL Server Reporting Services, Power View forum
Viewing all articles
Browse latest Browse all 10045

SSRS 2012 -- sort stacked bar chart by category total (i.e., the aggregate of the series) in descending order

$
0
0

I've added a dataset to a report giving counts by Clinic by Status

SELECT AptClinic, Aptstatus, COUNT(1) AS myCount
FROM tblAppointments
WHERE AptDate BETWEEN '01-01-2016' AND '02-29-2016'
GROUP BY AptClinic, Aptstatus

I've added a stacked bar chart to the report with the AptClinic as the Category, AptStatus as the Series, and myCount as Values.  I'm trying to figure out how to sort the chart by the aggregate of all the series values for a given category, in descending order.

In other words, the clinic with the most appointments should be at the top of the list, no matter the mix of the appointment statuses.  I've tried sorting the Category by myCount and also by an expression, =Aggregate(Fields!myCount.Value), both tries in Descending Order, but I'm not getting the desired outcome:

The bottom row should be on the top and following rows should be based on the aggregate for each clinic.

How can I get the chart to sort the way I want?

Christian Bahnsen



Viewing all articles
Browse latest Browse all 10045

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>