Hi JMP Community,
I need to calculate the signed area under the curve for simple time series data (see mock data below).

Specifically, I need to calculate the area (as shown in the graphs above) above zero as positive and below zero as negative, including local shift from positive to negative and reciprocally.
Examples:
- AUC for curve A = Positive Area 1 + Negative Area 2 + Positive Area 3
- AUC for curve C = Positive Area 1 + Negative Area 2
- AUC for curve E = Positive Area 1
The Polygon Area () function does not appear to handle the more complex time series correctly probably due to the crossing segments. Also, this function does not return the signed value for the area. Would you know of an Add-In or a function that I could use to achieve my goal?
Thank you.
Best,
TS