SSRS 2008 矩阵 - 如何对这个简单的数据集进行排序?

发布于 2024-12-19 02:22:11 字数 411 浏览 0 评论 0原文

我有一个数据集,其中包含 [Names][Level Achieved][Month Achieved]

我希望结果看起来像:

[Month Achieved] ->按从一月到十二月的顺序显示在顶部
[Names] 位于左侧
每个月下的[Level Achieved]

使用向导,我选择一个矩阵,将列设置为[Month Achieved],将行设置为[Name],将详细信息设置为[Level Achieved]

然而,月份的显示未排序。如何对列进行排序以使它们按顺序排列?

I have a dataset which has [Names], [Level Achieved], and [Month Achieved].

I want the result to look like:

[Month Achieved] -> Displayed across the top in order from Jan - Dec
[Names] down the left side
[Level Achieved] under each month.

Using the wizard I choose a matrix, set the columns to [Month Achieved], rows to [Name] and details to [Level Achieved]

Yet the months are being displayed unsorted. How do I sort the columns so they are in order?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

半城柳色半声笛 2024-12-26 02:22:11

完成向导后,在“设计”视图的底部,您应该会看到“列组”窗格。右键单击月份列组并选择组属性。

在出现的窗口中,您可以选择排序部分,您可以在其中更改或添加用于排序该组的字段。在您的情况下,您可能需要使用公式(fx 按钮),例如

 =SWITCH(Fields!Month_Achieved.Value = "January", 1,
         Fields!Month_Achieved.Value = "February", 2,
         Fields!Month_Achieved.Value = "March", 3,
 .
 .
 .
         Fields!Month_Achieved.Value = "December", 12)

This is if you 实际上从数据集中返回月份名称而不是月份的日期时间值。

After you complete the wizard, in the bottom of the Design view, you should see a pane for Column Groups. Right click on the month column group and select Group Properties.

In the resulting window you can select the Sorting section, where you can change or add the fields by which this group will be sorted. In your case, you might need to use a formula (the fx button) such as

 =SWITCH(Fields!Month_Achieved.Value = "January", 1,
         Fields!Month_Achieved.Value = "February", 2,
         Fields!Month_Achieved.Value = "March", 3,
 .
 .
 .
         Fields!Month_Achieved.Value = "December", 12)

This is if you are actually returning the Month names from your dataset and not a DateTime value for the month.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文