繁体   English   中英

从Spotfire中的另一行检索值

[英]Retrieving Value from Another Row in Spotfire

我试图在Spotfire中为特定的数据列引用另一行中的值。 举个例子,我想参考销售月份,其中青铜小工具的销售数量等于黄金小工具的数量。 我在下面列了一个列,以显示我需要的数据,“铜销售月份=黄金销售额”

Sales Month        Cumulative Bronze Widgets             Cumulative Gold Widgets              Month Where Bronze Sales = Gold Sales
   1/1/2017                                     0                                 1                                              2/1/2017
   2/1/2017                                     1                                 2                                              4/1/2017
   3/1/2017                                     1                                 2                                              4/1/2017
   4/1/2017                                     2                                 3                                              5/1/2017
   5/1/2017                                     3                                 3                                              5/1/2017
   6/1/2017                                     4                                 3                                              5/1/2017

我需要使用表达式来完成此操作而不使用脚本或插入另一个表。 这可能吗? 我已经尝试过以下和其他“结束”功能但没有成功“青铜销售=黄金销售的月份”

Case When Max([Cumulative Bronze Widgets]) over ([Sales Month])= [Cumulative Gold Widgets] Then Max([Sales Month]) Over ([Cumulative Bronze Widgets]) else NULL End

Spotfire支持通过OVER公式从其他行获取数据。 这需要当前行的SAME COLUMN中的公共值以及从中获取数据的公共值。

您需要匹配不同列中的值,因此OVER将不适合您。

你可以尝试一些解决方法:

1.每个Cumulative Bronze Widgets单独列

如果你只想要几个Cumulative Bronze Widgets

  • “累积青铜小工具 - 1”:
    Min(IF([Cumulative Bronze Widgets]=1,[Sales Month],Null))
  • “累积青铜小部件 - 2”:
    Min(IF([Cumulative Bronze Widgets]=2,[Sales Month],Null))
  • ...
  • “青铜销售月份=黄金销售额”:
    Case When [Cumulative Gold Widgets] then [Cumulative Bronze Widgets - 1]
    When [Cumulative Gold Widgets] then [Cumulative Bronze Widgets - 1]
    ....
    End

2.创建一个新表

  • 为Bronze小部件与销售月创建新的交叉表可视化
  • 将此新可视化保存为新表
  • 在旧表和新表之间创建一个链接([原始表]。[gold widgets] = [new table]。[bronze widgets]
  • 您现在可以通过过滤新表来过滤原始表; 遗憾的是,您可以在同一个可视化中包含多个表中的数据。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM