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?
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…
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.
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.