gmooney
Active Member
- Joined
- Oct 21, 2004
- Messages
- 252
- Office Version
- 365
- Platform
- Windows
I have the below pivot table with 2 value columns that I need for any subtotals (in this example Romaine Leaves is the sub total of the 5 rows) to calculate the weighted average of the 5 rows (the math for this is the 3 columns to the right of the pivot table. Instead of 10.9 showing for Average of U/SW the correct answer should be 14.5. The 10.9 is simply the straight average of the 5 rows and that isn't the result that I want.
Any helpers out there?
<tbody>
</tbody>
Any helpers out there?
Row Labels | Sum of [$] | Average of [U/S/W] | |||
Romaine Leaves | $29,413,131 | 10.9 | Sum $ * Avg of U/S/W | % of Total | Weighted Avg |
Brand A Washed Red Romaine Leaves | $4 | 1.0 | 4 | 0% | 0.0 |
Brand A Washed Romaine Leaves | $3,874,598 | 13.2 | 51,284,182 | 12% | 1.6 |
Brand B Washed Leaves | $5,291,218 | 10.3 | 54,314,349 | 13% | 1.3 |
Brand B Washed Red Leaves | $7,925,547 | 13.6 | 107,890,470 | 26% | 3.5 |
Brand B Washed Romaine Leaves | $12,321,764 | 16.4 | 202,138,544 | 49% | 8.0 |
415,627,550 | 100% | 14.5 |
<tbody>
</tbody>