Reputation: 261
Group, I have a SSRS report I am creating which is based off of a cube, and it generats (in a sense) three columns dynamically. Basically it has [Last Yeah Current Month Qty Sold], [This Year Current Month Qty Sold], and then [Variance] (Chart 1). What I want to do is sort the "Product" Group based on the variance column descending (Chart 2). It is initially sorted by [Product Group #].
(Chart 1)
(Chart 2)
Any suggestions are greatly appreciated
Upvotes: 1
Views: 2158
Reputation: 39566
I generated an example dataset (just through a query) to test this but the principle should be the same.
You need to apply a sorting expression to the Matrix row group that only takes total Variance into consideration and ignores the other columns.
You can use expression similar to the following:
=SUM(IIf(Fields!col.Value = "Variance", Fields!val.Value, 0))
You can see this only counts Variance values as required.
Apply this to the row group sorting expression:
Click Edit then Sorting then add the sort expression.
Final result:
Sorted by Variance as required.
Upvotes: 1