parallax Posted January 6, 2010 Posted January 6, 2010 I'm running into a problem reporting sales by month and counting the months with sales. The report has a sub-summary part that totals invoice detail rows using a month(invoice_date) break field. The 'body' is the invoice details, which we actually hide on the report. Some customers purchase only a few times each year and the challenge is to count the number of months (we want to use that count in various calculations, like avg-sales-per-month for that customer). The 'count' function only counts the records in the body (the invoice detail rows). So how the heck do I count the resulting months? The report breaks each month, then breaks again for a new customer. Customer A Jan 200 units Apr 100 units Jun 300 units ============== avg sales = 200 units /month Customer B Feb 100 units May 200 units ============== avg sales = 150 units /month etc. I've seen this discussed on this forum before but I can't find the topic. Any help would be greatly appreciated.
comment Posted January 6, 2010 Posted January 6, 2010 See here, for example: http://fmforums.com/forum/showtopic.php?tid/196703/post/297056/#297056
parallax Posted January 6, 2010 Author Posted January 6, 2010 Thanks! That was the post I was trying to find. Much appreciated.
efen Posted January 6, 2010 Posted January 6, 2010 I seem to have been beaten to reply to this while making this sample file - but I will include it anyway in case it's of some help ... subsummary.zip
parallax Posted January 6, 2010 Author Posted January 6, 2010 efen, i appreciate the sample file, but your example doesn't work. it counts the number of detail records which only results in the correct count *if* there is only one detail per month. i'm trying to count the number of months w/ data, not the number of records. if there are sales on jan 1, jan 2, jan 3, jan 4 and no others, i want to see "1" month, not "4".
efen Posted January 6, 2010 Posted January 6, 2010 I'm running into a problem reporting sales by month and counting the months with sales. ... Some customers purchase only a few times each year and the challenge is to count the number of months ... . That is how I read your problem
Recommended Posts
This topic is 5505 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