With our data, we can try to answer the question we posted in the Preparing data section of this chapter. We'll start by creating a pivot table and then create our data model that we have been promising:
Select the pmthistory tab and select any cell with data in it. Navigate to the INSERT tab and click on the PivotTable button.
In the Create PivotTable dialog box, select the Existing Worksheet option, and click on the Location button.
When the dialog box appears, select the report tab and click on cell A1, as shown in the following screenshot. After cell A1 is selected, press the Enter key on your keyboard and then click on OK in the dialog box.
In the PivotTable wizard, choose the userid and price columns, as shown in the following screenshot. The only issue is that we want to take the sum and not the count of the price column. Let's change this in step 5.
Click on the Count of price drop-down menu and select the Value Field Settings... option.