年度比较的SSRS列组

时间:2019-05-29 20:25:35

标签: reporting-services

我试图创建逐年比较,但是我很难按我的需要来安排栏目。

当前的SSRS设置

Imgur:

enter image description here

所需的输出

| Metric | 2019FW16 | 2018FW16 | YoY  | 2019FW17 | 2018FW17 | YoY | 2019FW18 | 2018FW18 | YoY  | 2019FW19 | 2018FW18 | YoY  |
|--------|----------|----------|------|----------|----------|-----|----------|----------|------|----------|----------|------|
| Sales  | 150      | 140      | 7%   | 200      | 187      | 7%  | 180      | 198      | -9%  | 600      | 700      | -14% |
| Orders | 60       | 90       | -33% | 160      | 100      | 60% | 120      | 300      | -60% | 560      | 600      | -7%  |

对于每个time_frame,我添加了一个列可见性表达式。

=IIF(Fields!time_frame.Value = 2019, True, False) for 2019
=IIF(Fields!time_frame.Value = 2018, True, False) for 2018

我要鼓励的问题是如何在每个时间范围分组之间获取同比列。如果我在“ YoY”列中输入列可见性表达式,则报表确实为报表正确放置了列,但是由于年份表达式,它无法正确计算YoY变化。如果没有表达式,则报表仅在每个时间范围后添加一列,如下所示。

| Metric | 2019FW16 | YoY | 2018FW16 | YoY | 2019FW17 | YoY | 2018FW17 | YoY | 2019FW18 | YoY | 2018FW18 | YoY |
|--------|----------|-----|----------|-----|----------|-----|----------|-----|----------|-----|----------|-----|

我想输入一列以便输入表达式

(ReportItems!Sales2019.Value - ReportItems!Sales2018.Value)/(ReportItems!Sales2018.Value)

关于如何实现所需输出的任何想法?

0 个答案:

没有答案