Database

Notion Showcase: How I Manipulate My Pedometer Data With Formulas

Screen Shot 2020-04-24 at 2.20.53 PM.png

โ›…๏ธ My Step Tracker

In order to showcase some unique Notion formula cases, here is my step tracker and how I manipulate its data from the Pacer app. Properties available from the app are Number of Steps, Calories Burned, Distance, and Date.

The Main View (All Basic Properties)

Click to Expand

Daily-Goal:

This property returns a line of green checkmarks if # steps is greater than 10,000.

  • (prop("steps") > 10000) ? "โœ…โœ…โœ…โœ…โœ…โœ…" : ""

Avg. Hours/Day:

This property grabs the property directly from my pacer app export labeled activeTimeInSeconds and converts it into hours. I then round the calculation to clean up the number. More about rounding numbers in Notion here.

  • round(100 * prop("activeTimeInSeconds") / 60 / 60) / 100

Month View: Stats and Averages

Click to Expand

% of Month that goal is achieved:

This property returns what percent of the month reached my 10,000 steps/day goal. I divide # of Days Goal Achieved by 31 (or roughly one month) and round the result. More about rounding numbers here.

  • round(100 * toNumber(prop("# of Days Goal Achieved")) / 31) / 100

In Progress?:

Here, a checkbox returns whether or not an entry is in the current month. For example, if this month (โ€œnow()โ€) is equivalent to the title of the page, a checked box will appear. In this case, my page is labeled โ€œApril 2020,โ€ so I use the slice function to remove โ€œ2020โ€ from the query.

  • formatDate(now(), "MMMM") == slice(prop("date"), 0, 5) or formatDate(now(), "YYYY") == prop("date")

Year View: 2020 Success Rate

Click to Expand