I have columns with count of Customers and count of orders. how can i show the average count of orders?
Drop the orders column onto the Pivot layout again and then double click to select the summary method.
Related
So I have a bunch of rows in a query table that shows orders from a certain timeframe and whether that order had a "defect" or not. I have started a pivot table on that table to summarize the # of orders and # of those orders that were defective by day (trying to start a p-chart).
Is there any way to create a 4th column in the pivot table that calculates the percent defective (Orders with Defects/Count of Orders) from the two existing columns?
Sure,
Based on this site, these are the steps:
To start, select any cell in the pivot table
Next, on the Excel Ribbon, go to the PivotTable Analyze tab
In the Calculations group, click Fields, Items, & Sets
Then, in the drop-down menu, click the Calculated Field command
Once there give a name to your Calculated Field and set your formula to Orders with defect / orders (tip: select the fields from the list to make sure you get the names right).
One last note: I believe calculated fields perform additions by default.. I noticed your 2nd column is a "count", I believe the calculated field will sum that column (before dividing) instead of counting it.
In Excel I have raw data that looks like this:
I am creating a pivot table that lists employees and the days they punched in by department / shift.
I'd like the Employee Count to give a count of the distinct number of employees in the particular Department / Shift. Currently the pivot table is showing a count of the total number of rows in which each employee appears.
Instead of 1st SHIFT Warehouse 44th having a total of 69 I want it to have a total of 5. And no values alongside the individual employee rows. When I change Count to Sum I get values of 0.
How can I achieve this?
When creating the pivot table, check the box for "Add this data to the data model". Then design your pivot table, doing on a count on employee. Lastly, right click on the employee count in your pivot, go to Value Field Settings, and change your Summarize to Distinct Count.
I have a table in Excel that consists of two columns, Name and Score. The Name column is not unique, many names appear several times. I want to create another table that using formulas groups by name and calculates the total score for each.
So if James had 3 records with scores 2, 8 and 4, the other table would show James with total score 14. How do I do this?
You need to create a pivot table. Select the data you want to use and then go to the Insert tab on the ribbon and select Pivot Table. After the pivot table is created you need to add the Name column to the Rows section of the pivot table and the Score column to the Values section. Then change the Values calculation from count to sum.
I'm sure this is simple, but how do I get a pivot table to display an average for a calculated sum of fields? In the simplified example, I've filtered out fund x1, and the pivot table is showing the sums of the remaining funds per person. Now how do I get an average by person (so, manually calculated, 3300/3)?
I tried using a calculated field, but cannot figure out how it will work because the denominator will change based on how many people will have the funds I'm filtering on. If I use the averaging inside the calculated field it goes back to averaging the funds.
I tried putting the calculation outside the pivot table, and this works, but of course as I filter, my calculated field is no longer adjacent to the pivot table data, instead just floating off on the worksheet by itself.
TIA.
Per request here is the field list - if I try adding an "average of amount" to the value box it averages the fund amounts, instead of the fund amount per person. :
Here is a working solution:
Firstly you should install or enable Power Pivot. Quoting Microsoft:
Power Pivot is an Excel add-in you can use to perform powerful data
analysis and create sophisticated data models.
https://support.office.com/en-us/article/Power-Pivot-Powerful-data-analysis-and-data-modeling-in-Excel-a9c2c6e2-cc49-4976-a7d7-40896795d045?ui=en-US&rs=en-US&ad=US
In newer Excel versions Power Pivot is already installed and you can enable it by going to:
File > Options > Advanced > Data > Enable Data Analysis add-ins: Power Pivot, Power View, and Power Map
Alright, so you have Power Pivot now and you can see Power Pivot tab. Please follow the steps below:
Select your data and click add to “data model” icon on Power Pivot tab.
In Power Pivot window add column which will count distinct number of
persons in the data. =DISTINCTCOUNT([person]) name it for example
“DistPersNo”. This is crucial step – Power Pivot enables you to
count unique values in selected column.
Add another column with formula =[amount]/[DistPersNo] name it
“PersonAverages”.
In Power Pivot window click PivotTable and add new pivot table to
your worksheet.
In Pivot Table add 'persons' to rows and 'amount' to values. Now, if you add 'PersonAverages' to values (sum of it) and filter out fund 'x1' you will achieve desired result i.e. value of 1100.
Hope that helps.
I would add a helper column in column D to count unique customers.
Sort your data by person
In column D2 put =IF(A2=A1, 1, 0) and call the column UniqueCust
Copy formula down your dataset for all rows
Add the column to your pivot
Create a formula in your pivot table called Avg per Cust =Value/UniqueCust
This will flag each row in your data with a 1 if it is the first time a name appears in the column or zero otherwise. The pivot table calculation will sum up the total value and divide by the total unique customers.
I'm assuming that you want the value to come in any pivot table and not in a cell calculated outside the pivot table as a formula.
As a workaround you can use another pivot table, which takes the input as the original pivot table to find the average.
pivot tables
The second pivot table has data source as- E3:F5 or till whatever row you require.
You'll have to refresh all so that the second pivot table reflects any changes in the filter of first pivot table.
I've hidden (or you can filter it out) the grand total in the first pivot table so that the average gives the average of the sum of the amounts.
Since you didn't mention how you are using the data, I will give a couple of options that could work.
If you are the only user of the data or if someone else using the data is pivot table savvy you can use the following field list setups to switch data usage:
Sort by Fund (Note the Fund and Person in the Row labels section)
and Sort by Person (Note the reversed position of Fund and Person in the Row labels section)
To simplify the data, you can always minimize the main fields.
If you are distributing the pivot table to other people who aren't able or willing to modify the pivot table data, I would recommend setting up two separate pivot tables (using the same data source) with the same setups that I showed above.
Click the pivot table to bring up the field list.
In the Values section where it says "Sum of Amount" click the drop down.
Click "Value Field Settings" and choose average from the list in the pop-up.
i wonder if this is possible at all or is there any way of expanding pivot table column in a new sheet.
here is what pivot i've got:
so you see it's grouped by customer.
the question is - can i expand/open each customer in a new sheet (as if you do when double clicking values)
Figured this out:
move Customers to filter (top left box)
then select a customer
double click on total values
this will open all sales ONLY for selected customer
Yes. Double click the Grand Total row (for the Customer). If you don't have such then under PivotTable Options, Totals & Filters check Show grand totals for columns.