Pivot Table - Averages Puzzle

Lister00

New Member
Joined
Mar 12, 2018
Messages
4
Hi All

I have a spreadsheet with 10,000s of Theatre Box Office records. Each record is a count of the number of tickets sold by Show, Date, and Ticket Type. For example some records may look like this:

Show TypeShow NamePerformance DateDayTicket TypeTickets Sold
Christmas ShowA Christmas Carol1/1/2018MonFull Price50
Christmas ShowA Christmas Carol1/1/2018MonFull Price65
Christmas ShowA Christmas Carol1/1/2018MonDiscount25
Christmas ShowA Christmas Carol8/1/2018MonFull Price100

<tbody>
</tbody>

I would like to summarise in a pivot table the AVERAGE sales on a Monday for a Christmas Show. This should be fairly simple. I would make AVERAGE "Tickets Sold" the Value in the Pivot Table, "Day" the Column and "Show Type" the Row, and "Ticket Type" a sub-row. Such a pivot table may look like this:

Day
Christmas ShowMonTueWed

  • Full Price
71

  • Discount
25

<tbody>
</tbody>

Lets look at that Full Price average of 71. That is calculated by summing the "tickets sold" of all records matching the criteria "Christmas Show", "Full Price" and "Mon" and dividing by the number of records that match those criteria.

In this case (50 + 65 + 100) / 3 = 71

However!

Annoyingly some records relate to the same performance and ticket type. For example the top two records in the table.

We actually sold 115 Full Price tickets for the performance on 1/1/2018. However it is split into two records as they had different sale points. To get a correct average the Pivot table actually needs to add these two records together before calculating the average.

The Correct maths would be ((50+60)+100) / 2 = 105

My first instinct was to group the records by adding another column with a "Performance Code" calculation. So the new table looks like:

Show TypeShow NamePerformance DateDayTicket TypeTickets SoldPerformance Code
Christmas ShowA Christmas Carol1/1/2018MonFull Price50Performance 1
Christmas ShowA Christmas Carol1/1/2018MonFull Price65Performance 1
Christmas ShowA Christmas Carol1/1/2018MonDiscount25Performance 2
Christmas ShowA Christmas Carol8/1/2018MonFull Price100Performance 3

<tbody>
</tbody>

But how I translate this into a working Pivot table... I have no idea. I am stumped. I feel like there needs to be a middle table that summarise the records into 1 record per performance. But not sure how best to do that.

Any advice, greatly appreciated.
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.

Forum statistics

Threads
1,215,566
Messages
6,125,593
Members
449,237
Latest member
Chase S

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top