Need Help To Calculate Trip Distance Per Day

I need help with my glide pages app please.

I have a trip screen were a user can start a trip by selecting the vehicle, the start date and the start odometer reading. They can then also stop the trip by editing the trip, entering the end odometer reading and then selecting a date and time the trip stopped.

What I need help with is calculating the trip distance per day? Anyone know how can do this?

Thanks in advance.


Do you create new rows every time a user start a trip, or is the row replaced when a new trip starts? And would you like see daily distances driven for each day or just the current day?

A new row is created every time a user starts a trip and calculates the distance of each trip. Here are some screen shots that may help you visualise it better. My thinking is to use a template column and together with the trip date add the total distance per day on the trips listing screen…

1 Like

What you could do is format your trip date (either with the ‘format date’ column, or the ‘math’ column) so that you remove the hours.
Then you create a relation columns between the formated trips’ date, and make it multiple. You can then use a rollup column to sum the trip’s distances from this relation.

1 Like

Am I creating a relationship in the Trips table between the Normal Start Date and The Formatted Start Date set to multiple?

1 Like

I go it to work, thanks for the reply. Much appreciated.

1 Like

Perfect! Glad that it helped!

I answer if someone encounters the same issue someday. You have to create the relation between the formatted itself. It means that you select the formatted date in both data fields in your relation columns, and make it multiple.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.