[英]Calculated column for difference between ordered cells Spotfire
What would be the calculated column formula for trying to calculate the thickness (difference between cells of different depths) for each PLACENAME. 试图计算每个PLACENAME的厚度(不同深度的像元之间的差异)的计算列公式将是什么。 See table below.
见下表。 The thickness I am trying to calculate is the difference between each depth increment.
我要计算的厚度是每个深度增量之间的差。
Since your data is already sorted, there is no need to place row numbers based on the ranking (order) of the Depth
. 由于您的数据已经排序,因此无需根据
Depth
的排名(顺序)放置行号。 If the rows were unsorted, we would need to use Rank()
to apply a sort order based on the Depth
and PLACENAME
. 如果行未排序,则需要使用
Rank()
来应用基于Depth
和PLACENAME
的排序顺序。 Depending on what row and what direction you want to do the difference to be calculated, you can use the following formulas: 根据要计算差异的行和方向,可以使用以下公式:
[Thickness] - First([Thickness]) over (Intersect([PLACENAME],Next([Depth]))) AS [DifferenceBelow]
[Thickness] - First([Thickness]) over (Intersect([PLACENAME],Previous([Depth]))) AS [DifferenceAbove]
You will get the following results: 您将得到以下结果:
@FLgeo- As per your question, the below custom expression should calculate the difference of depths for each Placename. @ FLgeo-根据您的问题,以下自定义表达式应计算每个地名的深度差。
Abs([Depth] - Sum([Depth]) OVER (Intersect(Next([RowID]),[PlaceName])))
Note: 'RowID' column is added for computation purpose. 注意:添加“ RowID”列用于计算目的。 This need not be displayed in the table.
不需要在表中显示。
Question - Your table shows thickness value for the last rows of Placenames A & B, how did you calculate those? 问题-您的表格显示了地名A和B的最后一行的厚度值,您如何计算这些值?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.