I thought I had it figured out but turns out I was wrong…
I have two tables:
Main table
Time table
In the Time table I have cutoff times that correspond to points in increments of 0.5, like 00:18:01 = 0.5 points, 00:19:01 = 1 point, etc. So, the idea is for the Main table to show 0.5 points between 00:18:01 and 00:19:00 and then shift to 1 point from 00:19:01,
(And if there is a way to omit the unnecessary hours, I highly appreciate any suggestion)
The formula I thought worked for the Main table is
DB Poengtrekk: cut-off times and points database
Minutter: Time/minutes column in the points database
Tidsbruk: Time spent, from the Main table
Poengtrekk: Points column in the points database
The idea is that the time table is filtered based on the time and returns the corresponding point. The problem is that instead of changing to 1 point from 00:19:01, it changes already from 00:18:02.
Is there a way to solve this in a fairly easy way?
I apologize for not being able to share the database, it is a bit large and already contains PII.
Thank you, @Christiaan_Huizer. Unfortunately, that formula does the exact same thing.
I played around a bit with using two time columns, From Time and To Time, to see if that would work better but I am not able to find a formula that can verify if a given time is found between the two, and then provide a corresponding number from the third column.
Since the use case is not relying on very frequent updates or changes, I decided to go with a “simple” SwitchIf() formula instead of racking my brain trying to come up with a complex solution to a simple problem…
We just concluded this year’s event so now I have nearly a year to look into these kinds of details (and more…).
I will try to provide an example doc soon.
Here is a simple example.
The Points table lists the Start time and End time for each penalty point. It can also just show the Start time if that makes more sense.
The Time table shows how much time each participant has spent and the number of points that should be deducted.
In the example, Participant 2 and 3 should have respectively 1 and 2 points deducted, not 2 and 3 points. And Participant 1 should not have any points deducted.
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;