Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Calculating Year to date purchases

Featured Replies

  • Newbies

I need help to calculate a year to date purchse field any help would be greatly appreciated

Cole

Can you give a bit more information about how your file is set up?

  • 2 weeks later...
  • Author
  • Newbies

I have a invoice system where customers are in one database and the invoice info is in another and I would like to be able to look at a customers name and have it calculate the year to date purchases from the invoice database. Thanks so much

You will have these fields in the invoice table:

InvoiceDate - Date of invoice

InvoiceAmount - Amount of purchase

CustomerID - unique ID number of customer

You will also have CustomerID in the customers table.

In your customer table you will need to create an unstored calculation field YearStart with this formula:

Date(1;1;Year(Get(CurrentDate)))

Next, make a relationship named YTD from the customer table to the invoices table with the following match fields

Customers::YearStart <= Invoices::InvoiceDate

AND

Customers::CustomerID = Invoices::CustomerID

Then make a new calculated field in Customers, YTDTotal with the formula:

Sum(YTD::InvoiceAmount)

This should give you your year to date totals by customer

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.