reporting-services - Report Builder charts - grouping data by a specific age group
问题描述
I have a pretty large dataset where learners are divided into age groups (16-18, 19+). I am trying to calculate the retention of learners (completed field/ Leavers field) and display the chart by just one of those age groups (16-18). How can I do this as an expression?
解决方案
我会创建一个计算字段,您可以在其中存储不同的年龄组:
'Name: AgeGroups
=IIF(CInt(Fields!Age.Value) > 15 And CInt(Fields!Age.Value) < 19, "16-18", "19+")
现在将您需要的所有内容添加到图表中。现在Fields!AgeGroups.Value
是大类。在过滤器下的图表属性中,您可以添加以下过滤器,以仅显示一个年龄组:
'Expression
=Fields!AgeGroups.Value
'Format
String
'Operator
=
'Value
16-18
这样,如果您的自定义分组有时发生变化,您只需在计算字段中应用一次更改。
推荐阅读
- node.js - 将 http 请求转发到 https,req.secure 不起作用
- amazon-web-services - 本地执行与 Terraform 和 AWS CLI 不一致
- reactjs - 从 Azure Repos 使用 Azure Devops 构建 React 文件的任务
- java - 在 jdk 14 应用程序上启用 jdwp 导致协议错误不支持地址系列
- spring - 将外键作为复合主键(Spring Boot,Spring JPA)的一部分持久化(保存)实体对象 - 抛出错误
- terraform - 我们可以使用资源的count参数销毁所有由terraform创建的资源吗?
- javascript - Mongoose 等待在预保存钩子中执行的异步函数
- python - 拓扑错误:无法执行操作“GEOSIntersection_r”
- docusignapi - Docusign,如何在浏览器中不记录(授权)的情况下获取访问令牌
- node.js - mongodb突然停了