移动总计使用两个计算字段并使用其先前值 - Spotfire

时间:2017-11-17 05:54:02

标签: spotfire running-total

嗨大家好我是Spotfire的新手,很难将其中一个公式从Excel复制到spotfire。

示例数据 Sample data here(excel) https://docs.google.com/spreadsheets/d/1KSdrIYKlRYG9c3wIM3NwQcLP_Ob8Z2UZ5Cjrdjy8UO8/edit?usp=sharing 我正在尝试复制专栏[Steady Repay-Option Scenario]

enter image description here

excel中使用的公式        = IF(B6-IF(C3大于0,C2,0)大于0,B6-IF(C3大于0,C2,0),0)

以上是我在excel中的公式,其中后续列是使用先前的值和列的当前值[每月对现金的影响]和[运行总计]

计算的

这是我在spotfire中创建的公式:

if((Sum([Scenario opening balance]) over (allPrevious([Document_Date_Number])) - (If(Sum([Rolling_total_cash_calculated]) over (AllPrevious([Document_Date_Number]))>0,Sum([Monthly_impact_on_cash_calculated]) over (AllPrevious([Document_Date_Number])),0)))>0,Sum([Scenario opening balance]) over (allPrevious([Document_Date_Number])) - (If(sum([Rolling_total_cash_calculated]) over (allPrevious([Document_Date_Number]))>0,Sum([Monthly_impact_on_cash_calculated]) OVER (allPrevious([Document_Date_Number])),0)),0)

   Assumptions--
  Data has been pivoted into three columns([Document_Date_Number], Monthly_impact_on_cash_calculated] and [Rolling_total_cash_calculated])
  where:
  [Scenario opening balance] = 150000000(fixed)
  [Document_Date_Number] = Jan,Feb,Mar etc
  [Rolling_total_cash_calculated] = Rolling total(excel)
  [Monthly_impact_on_cash_calculated] = Monthly impact on  cash(excel)

但由于某种原因我的结果不正确

results in spotfire

enter image description here

但预期的结果是

Correct result in excel

enter image description here

因此,虽然结果如上所示匹配至10月,但之后似乎并不匹配。

请让我知道如何才能获得相同的价值观。非常感谢任何帮助。

0 个答案:

没有答案