drbott Posted January 20, 2006 Posted January 20, 2006 This is a problem I've been working on for a while and I can't seem to figure it out. I'm trying to do a report that will track our profit margin for sales and give me totals based on each level of summaries. We're got a database with all of our order items and each item has the sale price and our cost. A simple calculation gives us the profit margin for each item. 1-(Item Cost/Item Price) When I do the sales report we list out each sale and get a sub-summary by Product, Vendor and a Total. I get totals of each of the sub-summaries (i.e. Total of Item Cost) but I want to be able calculate the sub-summaries to be able to see the profit margin like we do for each individual sale. 1-(Total Cost Summary/Total Price Summary) So far, I can get a summary for the complete found set but I can't seem to get the calculations for the sub summaries. Any ideas?
gdurniak Posted January 21, 2006 Posted January 21, 2006 try "getsummary" (see FM8 Help), e.g. GetSummary(Total Sales;Country) returns a summary of all records pertaining to the value in the Country field. GetSummary(Total Sales;Total Sales) produces a summary of all records (similar to using a summary field, which is a total of total sales).
drbott Posted January 21, 2006 Author Posted January 21, 2006 YES! Thank you. Exactly what I was looking for. This was a big piece of figuring out a report I've been wanting for years. Huge help!
Recommended Posts
This topic is 6945 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