Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

nightcap965

macrumors 6502a
Original poster
Feb 11, 2004
728
868
Cape Cod
Is there an app that would extract and calculate total mileage from the Fitness Workout app? I use use Workout to track my bike rides. The Fitness app gives me a monthly summary of time and calories expended, but no way to calculate total mileage.
 
Shortcuts app can do that. Two actions: Find Samples and Calculate Statistics.
 

Attachments

  • 3FC5745F-1873-46A7-AF34-CCDA13CDD7FD.jpeg
    3FC5745F-1873-46A7-AF34-CCDA13CDD7FD.jpeg
    104.9 KB · Views: 73
  • 8A02963F-A790-4793-87C0-AAB0E30EDC9F.jpeg
    8A02963F-A790-4793-87C0-AAB0E30EDC9F.jpeg
    37.7 KB · Views: 68
Thanks, NoBoMac, but I'm afraid that doesn't actually do anything.

Thinking I might have to add an instruction to display the data, I appended Show Sum to the end. Still nothing.

Any idea how to debug this?
 
First of all, make sure that there is data for the category. Go into Health app, Browse (lower right), Activity. Tap on Cycling to see if any saved data.

Make sure "Group by" is set to Day (seems like that needs to be set to some value).

If you run the Shortcut while in the Shortcut, will output the number. Polished way is to add either a Show Notification or Alert action. Just select the default message text, delete it, and then tap the space again to get the option to tap on "Calculate" item to pass the output from Calculate to the message.
 

Attachments

  • Calculate Statistics.png
    Calculate Statistics.png
    59 KB · Views: 66
  • Calculate Statistics 2.png
    Calculate Statistics 2.png
    58.2 KB · Views: 63
I'm afraid there's a limit to the number of health records this shortcut can handle. I do quite a lot of bicycling. Setting the dates a week apart works, so does a fortnight and even a month (though it took forever to tally up 900 miles). But when I try to set the start date at the beginning of the year, I just (eventually) get the error message "There was a problem running the shortcut "Biking".

But you've given me a good start. I'll bet I can figure out how to export daily totals to Notepad and just pump that into Numbers.
 
EUREKA! Marco Boschi wrote a very nice app that converts workout record data to CSV, for easy importation into Numbers. The IOS app is called Workout - CVS Exporter, and it's free.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.