I have the following Pivot Table:
Product: Type: CalculateFeild:
TV Small
Computer Big
HeadPhones Medium
In the Calculate feild, I want it to calculate the number of TV's that are small for the raw date which the pivot table is created from based on the two parameters/look up values: TV and Small.
I tried creating a calculated field using IF and sum but it's not working.
Is that possible? Any tips on how?
You are looking to summarize the data, not calculate it. You already put in your parameters, TV and Small. You just need to add another column that would be the summary. For example, if your raw data is like this:
Order number Product Type
101 TV Small
102 TV Big
103 TV Big
104 Computer Medium
105 TV Small
106 TV Small
Then you can use the Order number field as your summary field, and change the setting to Count. Your resulting PivotTable would be:
Product Type Count of Order number
TV Small 3
TV Big 2
Computer Medium 1
Related
After looking at a few similarish questions I figured I needed something more specific so asking here. I will start by explaining the situation:
The Setup
I have a Store which sells Cakes, Cookies and Wine. I have the weekly sales data of each product sorta like this:
Product ID
Product Name
Quantity
Value
Week Ending
1
Ginderbread
2
£4
13/01/22
2
Chocolate chip
5
£25
13/01/22
3
Red Wine Bottle
1
£10
13/01/22
4
Sponge Cake
3
£9
13/01/22
Currently every week's data is stored within the same table, with me using a Week filter to show only the week i'm interested in.
Using this Data I created PivotTables that shows the sales of each category, with the ability to drill down to show the specific products. Table looks something like this:
Category
Quantity
Value
Cakes
2
£4
Cookies
7
£29
Wine
1
£10
The issue
I now want to stick in a new calculated column that shows the Value as a %. E.g The total value for the previous table was £43, so Cookies is about 67%. If I drill down, it would show the Chocolate Chip record as 80% and Gingerbread as 20%
I imagine doing this would be easier if each individual week's data was on a different table, but I got a lot of weeks and I also want to do tables showing the sales for over a period of time. Plus I don't know of a way to merge the "value" and "quantity" columns, etc instead of having 1 for each week being shown.
any advice would be appreciated
Create an extra column in the source table (prior to filtering) entitled "perc" calculated as the corresponding value for each row divdied by the total value across all rows (se pic. / eqn. for first row below) --
=E2/$E$6
No calculated fields required - just include perc as the mesaure of interest in your pivot table, with value setting as 'sum':
The reason why this worked is because of the common denominator - which allows one to sum ratios on a 1:1 basis.
Devising a calculated field using the standard 'fields, items & sets' functionality for ordinary pivot tables would not be feasible / possible as far as I am aware. You would need to move into the realm of power pivots and data models - which is not too complicated (readily accesible directly from the field list per below) - however, I see this as unnecessary complication for the task at hand.
Side notes:
Using table names in your functions is sometimes more convenient when entering, albeit may appear tricky at first when reviewing - first eqn above becomes:
=[#Value]/Table1[[#Totals],[Value]]
The more I have to work with Excel in helping our customers with advanced reporting, the more I'm amazed at it's capabilities. That being said, I can't seem to find exactly what this customer wants Excel to do.
Scenario:
We have a datasource which refreshes a worksheet containing many rows and columns of a data export from the customer's database. That worksheet then drives the other tabs' charts, tables, etc.
They want to add a table (pivot) which will take their milestones, sum the (ontime) column, and then take the (rownumber) sum for that area and then divide it so they can see how many projects were on time. Simplified data tab looks like this:
RowNum Area OnTime Milestone
------ ---- ------ ---------
1 North 1 M2
2 East 1 M4
3 East 1 M2
4 North 0 M1
5 East 0 M4
and here's the table they want it to produce.
We can get it to do both using a Sum(value) and calculated field, however we can't get the Sum(value) field to go directly beneath the calculated percentage field. Any ideas?
If I understand correctly, it will be enough to move the Values drawer to your Rows:
If you need to change the order of the values (which one will be at the top etc.), you can do this moving the drawers within Values Window at bottom-right.
I'd like to create an appropriate graph for the following sort of data. I'm using an example as the actual data is 1000+ lines.
Date Player Points
02/06/2014 Bob 2500
03/06/2014 Bob 4000
04/06/2014 Bob 5100
02/06/2014 Steve 1000
03/06/2014 Steve 1500
04/06/2014 Steve 3600
02/06/2014 Sam 5000
03/06/2014 Sam 3700
04/06/2014 Sam 4100
I'd like the graph to track each player's progress over time. Ideally a line graph. I am having trouble with excel trying to do this.
Use the data above to generate a pivot table. Put the date in the Rows Area, the player in the Columns Area, and the Points in the Data Area. This will give you a column of values for each player.
Make a pivot chart from the pivot table. Each player will be plotted separately in the chart.
I am working on creating a pivot table for the data I have. The data looks something like below:
ID Policy_July Policy_June Policy_May Policy_April Label
13 High Med High High High Good
2 Low Low Low Low Low Good
3 Low Low Low Low Low Good
4 High Med High High High Good
5 High Low High High High Good
6 Low Low Low Low Low Bad
7 High Med High High High Bad
8 High Low High High High Bad
I am comparing results from July with other months. Is there a way I can add a filter for row to enable me to change "Policy_June" to "Policy_March"? Basically, instead of having a filter for column, can I have filter for row in pivot table? If so, can you please guide me on how can I do it?
Again, what I am looking for is to have a filter button above the pivot table that would enable me to change "Policy_June" to "Policy_April".
Secondly, is there a way I can have "Grand Total" as a column (like I have at the bottom of pivot table)? I am trying to sum the value of "Bad" and "Good" for "High" and show the result in the column in yellow.
Let me know if you need any additional clarification.
You can normalize your data by giving it a layout similar to this:
ID PolicyMonth Status Label
13 July High Good
13 June Med Good
13 May High Good
...
and create a Pivot with ID in vertical (Row Labels) and Status in horizontal (Column Labels) direction. You then can filter Row and Column Labels for a single (or multiple) values.
Not sure though how you would like to process the crosspoint data (Status, Label) as you only can sum/count/average/min/max by default ... this possibly may require conversion of Low/Med/High into numbers (0,1,2) and an average for the row total.
Edit
Further to your comments I understand you want to analyze a Delta ...
columns A..G contain original data
columns H..L contain a numeric representation according to formula
H5: =IF(B5="High",2,IF(B5="Med",1,0))
cells C1 and C2 contain the month names to be compared ... they are identical to headers in H4..L4; change as you like ... data validation using a list of values and in-cell drop-down is thinkable
column M - big trick - is calculated using INDEX and MATCH functions, i.e.
M4: =INDEX(H5:L5,1,MATCH($C$1,$H$4:$L$4,0))-INDEX(H5:L5,1,MATCH($C$2,$H$4:$L$4,0))
Pivot table is created with Diff as Row Label and count(ID) as data, displaying the ones that stayed flat (0), jumped up or down by 1 or 2 levels ... this of course can be filtered to supress or highlight the ones staying equal.
Result in Diff could be further processed into a DiffText using nested IF's and displayed in pivot rows instead of Diff
in screenshot: 3 ID's stayed unchanged, 3 ID's improved by 1 level, 2 ID's improved by 2 levels
Pivot table can drill down to the ID level to show WHO were the good/bad guys if you add ID to the row labels
Hope this comes closer than my 1st attempt.
open image in new tab to get larger size
I'm trying to create an average by category in a pivot table. This is the first time I've created a pivot table so sorry if the answer is staring me in the face. My raw data looks like:
Date, Transaction type, Description, Paid out, Paid in, Balance, Category
Mar-13, Visa, SHOP, £4.44, , £X, Gifts
Mar-13, Visa, SHOP, £5.00, , £Y, Children
Mar-13, Visa, SHOP, £6.00, , £Z, Gifts
Mar-13, Visa, CLOTHES SHOP YORK, £8.00, , £A, Clothing
Mar-13, Visa, FOOD SHOP, £11.96, , £B, Food
My pivot table shows the information rolled up by Month and grouped by a category:
Row Labels Sum of Paid out Sum of Paid in Sum of Difference
2013
Jan £Jan £Jan £C
Food 1 2 -
Car 2 3 -
Cash 6 6
Feb £Feb £Feb £D
Food 1 2
Car 8 0
Cash 2 3
The categories/data is made up in this case, but the desired outcome I'm after is to get an annual average, informing me how much comes in/out on average across the year per category... looking something like:
Row Labels Sum of Paid out Sum of Paid in Sum of Difference
2013
Avg £AvgIn £AvgOut £AvgDiff
Food 1 2 -
Car 5 1.5 -
Cash 4 4.5
Jan £Jan £Jan £C
Food 1 2 -
Car 2 3 -
Cash 6 6
Feb £Feb £Feb £D
Food 1 2
Car 8 0
Cash 2 3
Is this possible to achieve using a pivot table, as I can't seem to find a way to this at the moment using Excel 2010.
Since it appears that your raw data is already grouped by month, you're able to do this pretty easily. You need to re-arrange your data, however -- the months and the categories need to be on different axes. For example, Category as ColumnLabels, with Values then Month as Row Labels. Then right-click one of the normal values for Paid Out, choose "Summarize Value As...", you'll see SUM is currently checked, just change to AVERAGE. Repeat for one of the Paid In values. The labels should change to help let you know if it worked.
Note that this will NOT work effectively if your source data comes in daily, for example. With only one entry per month, the SUM and the AVERAGE of the single entry are identical. This would not be the case if your raw data was daily (and you still grouped by month) -- you'd be switching from a monthly total to a daily average.
I am currently using LibreOffice, which is just the free version of Excel on a mac. It is basically the same thing, but anyways, do you see the top bar where it says =AVERAGE(B8,C8,D8)? Well, that is how you can incorporate the functions within the table. This is actually a pivot table I had to do for my Java class. All you have to do is click on the cell you want to edit, type =, the function name, (in your case, AVERAGE should be fine) and then any other kinds of functions you use. Hope this helps you out.