SSRS - 遇到 null 时停止 RunningValue

SSRS - stop RunningValue when encountering null

我在 SSRS 中有一个 table,它绘制了 2019 和 2020 财政年度的累计支出金额。财政年度从 10 月开始,到 9 月结束。

Current Graph

值:=RunningValue(Fields!total_cost.Value, Sum, "fiscal_year")

类别组:month

系列组:fiscal_year

table 包含 2019 财年所有月份(10 月至 9 月)的行,但 2020 财年只有某些月份(10 月至 2 月)的行。但是,当我尝试在同一张图中同时绘制 2019 财年和 2020 财年时,由于 20 财年的其余数据不完整,RunningValue 在 2 月之后保持相同的值。

我正在寻找的是一种在遇到空值(3 月)时停止 RunningValue 的方法,以便生成的图形看起来更像这样:

Expected Graph

谢谢!

这完全未经测试,但您可以尝试这样的操作

=IIF(
    IsNothing(Fields!total_cost.Value), 
    Nothing, 
    RunningValue(Fields!total_cost.Value, Sum, "fiscal_year")
    )

这假定 NULL 值而不是零,如果 'empty' 数据点中有零,则相应地进行调整。