Welcome back! This week’s Formatter Features article is for all you math nerds out there. I too am a math nerd (*nerd wave*), so it is with great nerd excitement that this week I get to dig deep into math operations.
What we’ll be covering
So first off - let’s put away the graph paper and TI-83’s. You won’t be needing them today. Instead, let’s kick this off by talking about what exactly constitutes a math operation in Formatter and why you might need one. Then we’ll dig into exactly how to get to these math operations.
How do I get to math operations?
So glad you asked. You can find math operations under Formatter by Zapier > Numbers. Once there, you’ll want to select “Perform Math Operations”.
What It Looks Like
What is a math operation?
Fortunately for us, Formatter is going to do all the hard work of figuring out the order of operations (PEMDAS, anyone?) and the crunching of numbers. But we still need to understand what exactly a math operation is.
A math operation is a mathematical process that takes input, applies an operand, and generates a defined output.
In really plain terms, we’re talking about addition, subtraction, multiplication, and division. Those are math operands. When we grab something like the numbers 2 and 5, those are input. Numbers like 7 (operand: addition) and 10 (operand: multiplication) are outputs.
Why would I need a math operation?
When a formula is overkill
Ever have those moments where you just don’t want to have to figure out a formula, the syntax, and all that other stuff? That’s where math operations become a better option than Formatter’s spreadsheet-style formulas (read about those here). Click. Click. Done.
When a simple division will do
For example, despite being a data nerd, I also spend a lot of time out on the trails. In fact, I’m actually training for a few hilly mountain bike events. And that means I need to get some quality elevation on each ride.
Doing a 10 mile ride with 200 feet of elevation is nowhere near as impactful as 5 miles with 500 feet! I can easily use math operations on a Strava activity to calculate my elevation per mile effort… and send it to Slack to remind me to get out and ride harder.
Or perhaps I want to calculate the average cost of an item in an order with multiple items, make a number negative to pull it from an inventory, or calculate cost before tax, fee, or discount. All easy things for Formatter to handle, push to your app of choice, and free up more time.
Anything tricky about it?
While the experienced Zapper knows this, this specific Zapien Zapper (me) isn’t as experienced so it’s worth calling out for any other newbies out there… You need to set up a trigger that pulls in the numerical input before setting up Formatter. In this example, I’ve already gone through the steps to set up Strava and pull in data anytime there’s a new activity.
Once the trigger is set up and you’ve picked Formatter > Numbers as the next step, pick your operation, grab your inputs, and test away.
Once you’re happy with your number crunching, set up your next step to put your fresh new output to good use!
Coming Up in the Series
Next up in the Formatter Features series we'll be taking a look at formatting phone numbers. Until next time!