在排序表达式中使用聚合函数 [英] Use an Aggregate function in Sort Expression

查看:160
本文介绍了在排序表达式中使用聚合函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个报告,该报告使用从存储过程返回的数据集。有两个关键列:名称

I have a report which uses a dataset returned from a stored procedure. There are two key columns: Name and Value

我正在将此数据集用于两个Tablix。第一个只是显示数据的简单Tablix。

I am using this dataset for two tablixes. The first is just a straightforward tablix displaying the data.

第二个基于 Name 列对数据进行分组。我需要根据列的总和对该数据进行排序

The second groups the data based on a Name column. I need to order this data based on the Sum of Value column

但是我遇到以下错误:


[rsAggregateInDataRowSortExpression] Tablix
'table1'的
排序表达式包括一个总计
函数。聚合函数
不能用于数据行排序表达式。

[rsAggregateInDataRowSortExpression] A sort expression for the tablix 'table1' includes an aggregate function. Aggregate functions cannot be used in data row sort expressions.

还有另一种方式可以显示按名称分组的数据仍然按Sum(Value)排序吗?

Is there another way I can show the data grouped by name and still order it by Sum(Value)?

推荐答案

好,我只需要为Sum值添加一个额外的列到我的查询,然后使用它。不理想,但是可以用

OK, I just had to add an extra column for the the Sum value to my query and then use that. Not ideal, but it works

这篇关于在排序表达式中使用聚合函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆