July 14, 2011 at 9:26 am
I've been struggling with this one for a while.
I have data coming from all over the place to get this report functioning. Everything is starting to come together.
What I have is a report that takes all of a salesman's monthly sales, groups them together and sums them at the group level. I also have another table that shows their sales goals based on monthly numbers. 60% of the time these sales goal numbers change from month to month. Here's an example of my data for sales goals:
MonthSpecialistSales_Goal
1TOM"$80,097.02"
2TOM"$117,492.45"
3TOM"$92,989.83"
4TOM"$100,426.13"
5TOM"$81,013.56"
6TOM"$56,562.60"
7TOM"$33,318.86"
8TOM"$59,672.37"
9TOM"$47,863.28"
10TOM"$41,950.44"
11TOM"$70,254.77"
12TOM"$84,297.45"
When you select the month, the query takes the DATEPART(MM, '2011-1-1') and selects the appropriate sales goal. Everything is working out great with the exception of getting their sales goal to subtract from their actual sales totals (which are grouped by specialist).
I've tried using the obvious (well it was obvious to me, at least) method: taking the group sum and subtracting it from this specified field but I'm getting some pretty bogus numbers.
Any ideas on how to get this working, or is it even possible? Let me know if a query would help out.
July 14, 2011 at 2:32 pm
Could you post your query? I am not sure I understand the problem as you are stating it. Is specialist and sales person the same or is it different?
July 14, 2011 at 2:33 pm
My grasshopper status has proven right!
It was a brain malfuntion on my end. I had two sums (a group sum, and a total group sum) and I used the wrong one....DOH!
Please close this thread.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply