Search code examples
spotfire

Spotfire- Continuous Max Depth


I have a dataset that has start and end depths that can either progress or regress. The goal is to add a calculated column that will provide the last known max depth, regardless of regression. Here's a look at the data and the goal:

enter image description here

I've created a "Running Depth" column that provides the last known positive value for the end depth, but this logic doesn't work when the end depth is less than the previous maximum end depth (See rows 6 and 11 for my issue).

Running Depth= SN([Positive Depth],Last([Positive Depth]) over (Intersect([PRPRTY],AllPrevious([Row]))))

Are there any other ways to keep the last known maximum depth for each row to get the "Continuous (Max) Depth"?


Solution

  • Try this:

    Max(Max([EndDepth]) over (Intersect(AllPrevious([Row]),[Property])),[EndDepth])