[英]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
将不适合您。
你可以尝试一些解决方法:
Cumulative Bronze Widgets
单独列 如果你只想要几个Cumulative Bronze Widgets
:
Min(IF([Cumulative Bronze Widgets]=1,[Sales Month],Null))
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
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.