Getting a number based on time

yes: this is the code snippet:

Points.Filter(
[Start time] <= thisRow.[Time spent]
).[Penalty points].Last().IfBlank(0)

The great Coda connaisseur @joost_mineur reached out and wondered how stable my solution was. I had to admit that using a start & end time is not a good practice and that without sorting properly you may mess up as well. The end time is error sensitive, so you best use only the start time, that will do. Sorting is crucial, always;

below how that looks:

The filter shared will only do in a well drafted context, this is more robust.

Cheers, Christiaan

4 Likes