使用 over 函数的 spotfire 计算列

spotfire calculated column using over function

我想创建一个计算列 "indicateur" 来跟踪布尔值 当我有一个 True 时,我将指标递增 1,但是我希望假行具有最后一个 True 指标的值。

当我传递给新 ID 时,递增从零开始。

我已经使用 over 函数尝试了一些 spotfire 表达式,但没有得到正确的结果

case  
when [boolean] then sum(If([boolean],1,0)) over (Intersect([ID],AllPrevious([ID])))
else 0
end

你有几个问题。你的案例陈述是子设置数据......它只会计算布尔值为真的总和。

不过,主要问题是 over 语句。像这样应该给出正确答案

sum(If([boolean],1,0)) over (Intersect([ID],AllPrevious([Timestamp])))