Help

Total Number of Packages Sold in a Month

Topic Labels: Formulas
Solved
Jump to Solution
2570 1
cancel
Showing results for 
Search instead for 
Did you mean: 
Owen_Marshall
4 - Data Explorer
4 - Data Explorer

Hi Everyone,

I had previously accomplished this in Google Sheets, but since moving to Airtable, I’ve had a bit of trouble replicating it.

We’re a dog training company, and want to count the number of packages that each trainer sells in a given month.

My table has a column with a date field that contains when the package is sold, a column with the trainer’s name (a linked record to a trainer’s table), and a column if the package has been paid for.

Previously in Google Sheets, I used a table that contained the date range for each month (ex. 1/1/22 to 1/31/22). The formula would see if the date the package was sold was between these dates, checked the trainer’s name matches, and if the payment contained the word “Paid”.

Would love some help trying to get this working with Airtable :slightly_smiling_face:

Thank you

1 Solution

Accepted Solutions
Justin_Barrett
18 - Pluto
18 - Pluto

Welcome to the community, @Owen_Marshall! :grinning_face_with_big_eyes: Create a formula field named {Sale Month} using this formula (replacing {Date Sold} with the name of your date field that marks the date the package was sold):

DATETIME_FORMAT({Date Sold}, "MM-MMMM")

That will give you output like “01-January”, “02-February”, etc. for each record. Create a new view that groups records by that field, and then by trainer (you can hide the {Sale Month} field at this point, as the group header will show it). Filter the view to only show records that are marked as paid. Within each month group you’ll have one group per trainer that indicates how many packages they sold in that month.

See Solution in Thread

1 Reply 1
Justin_Barrett
18 - Pluto
18 - Pluto

Welcome to the community, @Owen_Marshall! :grinning_face_with_big_eyes: Create a formula field named {Sale Month} using this formula (replacing {Date Sold} with the name of your date field that marks the date the package was sold):

DATETIME_FORMAT({Date Sold}, "MM-MMMM")

That will give you output like “01-January”, “02-February”, etc. for each record. Create a new view that groups records by that field, and then by trainer (you can hide the {Sale Month} field at this point, as the group header will show it). Filter the view to only show records that are marked as paid. Within each month group you’ll have one group per trainer that indicates how many packages they sold in that month.