计算Spotfire中同一列的差异 [英] calculate the difference for same column in Spotfire
本文介绍了计算Spotfire中同一列的差异的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是Spotfire的初学者。我对某个列值的差异计算存在问题。
我对日期差异计算也提出了类似的问题,请参见:
I am a beginner for Spotfire. I have a problem about the difference calculation for the some column value.
I have opened a similar question for the date difference calculation, see:calculate the time difference for same column in Spotfire
how can i calculate the difference for the same column, is there any related function like DateDiff() here? for example:
id times state
1 12 1
2 7 0
3 10 1
4 11 0
5 6 1
6 9 0
7 7 1
the result could be :
id times state diffence
3 10 1 -2
5 6 1 -4
7 7 1 1
For example : for the first difference: -2 = 10 (the third row, the state is 1) - 12(the first row, the state is 1)
thanks for your help :)
解决方案
@ZAWD - Please try this over expression.
If([state]=1,[times] - Sum([times]) over (previous([id])),null)
这篇关于计算Spotfire中同一列的差异的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文