Hi:
This problem has been nagging at me for several days. There must be a way to do this, but I'm just not seeing it. (I'm using Excel 2007.)
A landscaping company has given me their data. At the beginning of the year, each of their client signs up for one of several pre-paid plans. As work needs to be done, the company sends in a contractor to do the work, then the company pays the contractor. The company wants to measure the profit and loss from each of their customers.
Here's a sample of the raw data. Each row represents a service provided to a customer. Note that each customer's Pre-Paid Plan field gets redundant: every time the customer is listed, it's always the SAME plan amount associated with that client.
Excel 2007
<tbody>
[TD="align: center"]1[/TD]
[TD="align: center"]2[/TD]
[TD="align: right"]1/19/2012[/TD]
[TD="align: center"]3[/TD]
[TD="align: right"]4/30/2012[/TD]
[TD="align: center"]4[/TD]
[TD="align: right"]5/15/2012[/TD]
[TD="align: center"]5[/TD]
[TD="align: right"]6/11/2012[/TD]
[TD="align: center"]6[/TD]
[TD="align: right"]6/7/2012[/TD]
[TD="align: center"]7[/TD]
[TD="align: right"]1/18/2012[/TD]
[TD="align: center"]8[/TD]
[TD="align: right"]6/1/2012[/TD]
</tbody>
And here's the ideal pivot table that the company wants to see, but that I'm not able to generate:
Excel 2007
<tbody>
[TD="align: center"]10[/TD]
[TD="align: center"]11[/TD]
[TD="align: center"]12[/TD]
</tbody>
The "Total Contractor Cost" makes sense. It's just the total amount that the company has paid out, broken down according to the pivot table definition. The problem is generating the Total Pre-Paid Recieved -- the 2 customers in the East Region have paid $300 and $550. So the income from the East Region should be $850, but when I do this as a Pivot table, that value is $3,050 - the sum of all the pre-paid values every time they appear in the data sheet. Then of course there's the problem of generating that final column, which is the difference between the
totals in Columns H and I.
Any ideas?
This problem has been nagging at me for several days. There must be a way to do this, but I'm just not seeing it. (I'm using Excel 2007.)
A landscaping company has given me their data. At the beginning of the year, each of their client signs up for one of several pre-paid plans. As work needs to be done, the company sends in a contractor to do the work, then the company pays the contractor. The company wants to measure the profit and loss from each of their customers.
Here's a sample of the raw data. Each row represents a service provided to a customer. Note that each customer's Pre-Paid Plan field gets redundant: every time the customer is listed, it's always the SAME plan amount associated with that client.
Excel 2007
A | B | C | D | E | F | |
---|---|---|---|---|---|---|
Region | Customer | Pre-Paid Plan Amount | Service Call Date | Service | Contractor Cost | |
East | SIMPSON | $300.00 | Waste Removal | $60.00 | ||
East | SIMPSON | $300.00 | Edging - small | $100.00 | ||
East | WEBBER | $550.00 | Watering | $85.00 | ||
East | WEBBER | $550.00 | Waste Removal | $60.00 | ||
West | BABCOCK | $550.00 | Planting - Med | $120.00 | ||
West | ABRAMS | $400.00 | Watering | $85.00 | ||
West | ABRAMS | $400.00 | Mulching | $80.00 |
<tbody>
[TD="align: center"]1[/TD]
[TD="align: center"]2[/TD]
[TD="align: right"]1/19/2012[/TD]
[TD="align: center"]3[/TD]
[TD="align: right"]4/30/2012[/TD]
[TD="align: center"]4[/TD]
[TD="align: right"]5/15/2012[/TD]
[TD="align: center"]5[/TD]
[TD="align: right"]6/11/2012[/TD]
[TD="align: center"]6[/TD]
[TD="align: right"]6/7/2012[/TD]
[TD="align: center"]7[/TD]
[TD="align: right"]1/18/2012[/TD]
[TD="align: center"]8[/TD]
[TD="align: right"]6/1/2012[/TD]
</tbody>
short version
And here's the ideal pivot table that the company wants to see, but that I'm not able to generate:
Excel 2007
G | H | I | J | |
---|---|---|---|---|
Region | Total Pre-Paid Received | Total Contractor Cost | Net Loss/Gain | |
East | $850 (i.e. Simpson-$300; Webber-$550) | $305 | $545 (i.e. $850-$305) | |
West | $950 (i.e. Babckock-$550; Abrams-$400) | $285 | $665 (i.e. $950-$285) |
<tbody>
[TD="align: center"]10[/TD]
[TD="align: center"]11[/TD]
[TD="align: center"]12[/TD]
</tbody>
short version
The "Total Contractor Cost" makes sense. It's just the total amount that the company has paid out, broken down according to the pivot table definition. The problem is generating the Total Pre-Paid Recieved -- the 2 customers in the East Region have paid $300 and $550. So the income from the East Region should be $850, but when I do this as a Pivot table, that value is $3,050 - the sum of all the pre-paid values every time they appear in the data sheet. Then of course there's the problem of generating that final column, which is the difference between the
totals in Columns H and I.
Any ideas?