简体   繁体   English

基于列组值的SSRS行排序

[英]SSRS row sorting based on column group values

So, I have a tablix that I want to be able to sort the row group by the values in the column groups. 因此,我有一个Tablix,我希望能够按列组中的值对行组进行排序。 The kicker is that I want it to sort by the greatest value in the greatest column grouping first and when the sorting for the greatest column group has come to an empty row then I want it to go to the next column group and sort the rest again until it goes through all of the column groups. 更重要的是,我希望它首先按最大列组中的最大值排序,当最大列组的排序进入空行时,我希望它转到下一个列组,然后对其余列再次排序直到它遍历所有列组。 The other kicker is that I want it to be dynamic so that when the year rolls over I won't have to change the report for the years that will show. 另一个要点是,我希望它具有动态性,这样当年份过去时,我将不必更改要显示的年份的报告。

For example my tablix has customers in the rows and years across the top and shows revenue per year and I'd like the results to sort by the value from the latest year first then sort by the values in the second greatest year and so on until it sorts the whole tablix. 例如,我的tablix在顶部的行和年份中都有客户,并显示每年的收入,我希望结果按最近一年的值排序,然后按第二大的值排序,依此类推,直到它对整个tablix进行排序。 I also need it to be dynamic so that I don't have to change it when the year rolls over to the next year. 我还需要使它具有动态性,以便在年份延续到下一年时不必更改它。

I've tried to add my year to the Sum function I used to sort it, but that didn't work. 我试图将我的年份添加到用于排序的Sum函数中,但这没有用。

I was able to sort my report by counting the distinct values in the column groups first and then by the sum of the values in the report. 我能够通过先对列组中的不同值进行计数,然后再对报告中的值之和进行排序,从而对报告进行排序。

Edit: Here's my solution: Season is my column group and Net Revenue is the value I wanted to sort on to get the values that have multiple years on their contract to the top. 编辑:这是我的解决方案:季节是我的栏目组,净收入是我想要排序的值,以便将具有多年合同的值排到顶部。

季节是我的栏目组,净收入是我想排序的值。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM