How to get the total sum of recorded mileage?

  • servlinkllc
    Asked on March 18, 2025 at 4:41 PM

    Hello,

    I have a mileage form for our guys in the field. At the end of the month, I will apply a filter for the previous month and the name of the employee. How do I add a column that will give the total sum of all of their recorded mileage?

    To be sure, I can't do this with a row, correct?

    Thanks,

    Derek

  • Israel JotForm Support
    Replied on March 18, 2025 at 9:41 PM

    Hello Derek,

    Thanks for reaching out to Jotform Support. You can use the Advanced formula on the Tables to calculate the total sum of recorded mileage. Let me show you how to do it:

    1. Go to the Tables page to see the form submissions.
    2. On the Tables page, click on +Add to add a new column and select f{x} Formula section.
    3. Select Advanced Formula and enter a column name.

    How to get the total sum of recorded mileage? Image 1 Screenshot 40

    4. Create a formula like below to calculate the percentage of the total sum of recorded mileage

    How to get the total sum of recorded mileage? Image 2 Screenshot 51

    Take a look at the screenshot for the result:

    How to get the total sum of recorded mileage? Image 3 Screenshot 62

    Give it a try and let us know how it goes.

  • servlinkllc
    Replied on March 19, 2025 at 9:44 AM

    This formula is not correct or what I'm looking for. You would never add the odometer start and end to figure out miles driven.

    When you look at the link for the table I sent, I already have a formula column to get the total mileage per day. I need to create a column with a formula that will add up the total daily mileage for the entire month (or a time that I specify). How do I do that?

    Example:

    On 3/01/25, Henry drove 52 miles

    On 3/02/25, Henry drove 32 miles

    On 3/03/25, Henry drove 46 miles

    How do I create a column to add up these 3 amounts?


  • Cristy JotForm Support
    Replied on March 19, 2025 at 10:30 AM

    Hi Derek,

    I’ll need a bit of time to look into this. I’ll get back to you as soon as I can.

    Thanks for your patience, we appreciate it.

  • Cristy JotForm Support
    Replied on March 19, 2025 at 11:26 AM

    Hi Derek,

    You can get the Total Summary of the column by clicking on the Add Summary button at the bottom of each column. Check out the screenshot below for reference:

    How to get the total sum of recorded mileage? Image 1 Screenshot 70

    Unfortunately, it is not possible to get a Summary of the Total Mileage because of the field type used to it. As a workaround, you'll need to add a Number field on your form and apply a Conditional logic to copy the value from the Total Mileage to it. Let me show you how:

    1. In Form Builder, click on the Add Element menu on the left side of the page.
    2. Under the Basic tab, scroll down to Number, and drag and drop a Number element to your form.
    3. Rename the field to Total Mileage.
    4. Right-click on the Number field and click Hide.

    How to get the total sum of recorded mileage? Image 2 Screenshot 81

    Now, let's set up the conditions:

    1. In Form Builder, in the orange navigation bar at the top of the page, click on Settings.

    2. Click on Conditions on the left of the page.

    3. Now, click on Add a New Condition and then click on Update/Calculate Field.

    How to get the total sum of recorded mileage? Image 3 Screenshot 92

    4. Set the conditions like you see below:

    How to get the total sum of recorded mileage? Image 4 Screenshot 103

    5. On your Jotform Submissions Table, click the Add Summary under newly added Number field column then select Sum.

    How to get the total sum of recorded mileage? Image 5 Screenshot 114

    Check out the screencast below to see my results:

    How to get the total sum of recorded mileage? Image 6 Screenshot 125

    Give it a try and let us know how it goes.

  • servlinkllc
    Replied on March 19, 2025 at 12:08 PM

    Thank you Cristy! It worked, this is great