问题描述
我尝试创建(在 SSRS 中)年收入摘要,但在尝试比较它们时却陷入困境.
I try to create (in SSRS) a summary of incomes in years and I'm stuck when I try to compare them.
例如在我的桌子上,Rok = 年:
e.g. of my table, where Rok = Years:
我有上图中的表格,其中 A 和 B 是表达式(收入总和).列是 SQL 查询的年份,因此 2020 将很快出现.我想将 2019 年与 2018 年进行动态划分,所以如果 2020 年出现,一切都将在 2020 年和 2019 年之间计算.你知道有什么解决方案吗?提前致谢:)
I have table like at image above where A and B are Expressions (sums of incomes). Columns are years from the SQL query, So 2020 will appear soon. I would like to divide 2019 vs 2018 but dynamically so if 2020 will appear, everything will calculate between 2020 and 2019. Do you know any solution for that ? Thanks in advance :)
推荐答案
首先,您需要为每一年创建一个单独的过滤列组.第二个在组右外的列中添加,标记为比较和插入以下表达式:=ReportItems!Rok.value - ReportItems!Rok1.value(Rok 和 Rok1 是每个过滤列组的文本框属性中可用的名称)
First you need to have an individual filtered column group for each year.Second add in column outside group right, labelled as compare andInsert the following expression: =ReportItems!Rok.value - ReportItems!Rok1.value ( Rok and Rok1 are the Name available from Text Box Properties for each filtered column group)
这篇关于SSRS:矩阵中两列之间的动态差异的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!