Newbies Colby0 Posted March 28, 2005 Newbies Posted March 28, 2005 I need help to calculate a year to date purchse field any help would be greatly appreciated Cole
BobWeaver Posted April 1, 2005 Posted April 1, 2005 Can you give a bit more information about how your file is set up?
Newbies Colby0 Posted April 13, 2005 Author Newbies Posted April 13, 2005 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
BobWeaver Posted April 14, 2005 Posted April 14, 2005 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
Recommended Posts
This topic is 7163 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now