简体   繁体   中英

How to Calculate Area Under the Curve in Spotfire?

Can someone assist me in calculate the area under the curve in Spotfire w/o using R or S+?

I am looking to rank the data in [K] (1 = largest value) for each Well, and then calculate the cumulative sums of [P] (ranked by descending K) and [K], then calculate and plot (as curves) the % cumulative sum of [P] and [K], calculate the area under each curve, for each Well (what is the expression).

I would like to calculate each column in Spotfire, but my main problems are ranking [K] so there are no ties (I was attempting to Rank first by [K] and then by [Depth]), summing the values of [P] and [K] by ranked [K] for each Well, and then calculating the Riemann Sums (Area) under each curve.

数据表和曲线

At first you need to add a new column ( [period] ) to calculate a unique time, otherwise Spotfire would get confused of different times in the datasets:
[well] & Log10([time] + 1)

Then add a cross table, drag [well] to the vertical axis, and enter this expression to cell values: Sum(([pressure] + Avg([pressure]) over (Next([period]))) / 2 * (Avg([time]) over (Next([period])) - [time]))

Alternatively you can add a new column ( [AUDPC_helper] ) too see step by step calculations:
([pressure] + Avg([pressure]) over (Intersect(NextPeriod([period]),[well]))) / 2 * (Avg([time]) over (Intersect(NextPeriod([period]),[well])) - [time])
Just need to get summary of this column in eg a cross table

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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