Display text as values in pivot table - excel

I have a dataset sample shown below:
Name Area Term Score
AA SW Summer A
AB NW Spring B
AC SW Winter D
AD NW Spring C
I need to display a pivot table with text as values the table should follow the below
Summer Spring Winter
A AA
B AB
C AD
D AC
Inside the grid should display the Name(s) of each person who achieves the respective grade in a specific for example Name "AA" would appear in the first cell between Grade A and Summer term.
I have found many examples online but nothing specifically for what I need. I am using excel version 2010.
I would be very grateful if anyone can help me
Thanks

the easiest way to do it is
set up a pivot table on a new tab with
rows - score, name
columns - term
value - count of name
to the right set h5=IF(C5>0,$B5,"")
copy that to your range
hide the desired columns of the pivot table
there's more complicated ways, but that's the easiest

Related

Counting duplicates across multiple columns in excel

I have a spreadsheet that looks like this
State
City
WA
Seattle
WA
Seattle
WA
Yakama
OR
Portland
OR
Albany
NY
Albany
OR
Portland
I want to count the duplicates but only for the times that BOTH columns are the same value, I would like the output to give me this info
State
City
Count
WA
Seattle
3
WA
Yakama
1
OR
Portland
2
OR
Albany
1
NY
Albany
1
I know this should be simple but I am having trouble finding this exact question elsewhere... thanks
You have a couple options.
Solution 1: Formulas
First copy and paste your state and city to new columns, then dedupe them using the Data tab. Then here's the formula for cell F3:
=COUNTIFS(A:A,D3,B:B,E3)
Solution 2: Pivot Table
Create a pivot off your data. Rows would be State and City. Values is Count of Whatever (city for example). Change your design to Tabular, repeat all labels, do not show grand or subtotals.
Just for fun a Microsoft365 solution (assuming you made a typo in your sample data):
=CHOOSE({1,2,3},UNIQUE(A2:B8),INDEX(UNIQUE(A2:B8),0,2),COUNTIFS(A2:A8,INDEX(UNIQUE(A2:B8),0,1),B2:B8,INDEX(UNIQUE(A2:B8),0,2)))

Create a Pivot Chart which compares an individual's score with that of his teams Average score

I need to compare how Fred is performing compared to the rest of his team Team 1 in the form of Pivot Line Graph. Below is the data.
A B C D
James Team 1 20 11/05/18
Fred Team 1 50 12/11/18
Elliott Team 2 100 21/04/18
Sarah Team 1 75 11/04/18
Fred Team 1 75 11/04/18
I need to create a Pivot Table from this data and then a Pivot Chart which shows a line graph for Team 1 and a line graph overlaid for Fred. The Team scores would be the average i.e. total of C Team As / No. of Team As.
The chart would have slicers attached to other Charts where a different Name or possible Team could be selected to filter.
I can create a chart for the names or for the teams but weighing a name against the team aggregate doesn't look possible.
Ok here it is, let me know if it solves your problem
Formula in E2 is
=AVERAGE(IF($B$2:$B$26=B2,IF($C$2:$C$26=C2,$D$2:$D$26)))
It is an array formula and have to be entered using Ctrl+Shift+Enter
The pivot table is as below
and the graph looks like this
Here is the pivot options window

Percentage column in a Pivot table

[/edit]Solved it, just right click on a field, Pivot table options, used For error message show: "0".
Again 1 step closer, looks like the filters don't work with the IF statement, when I only use the formula ([A]-[B])/[B] it works. How can I add the check if [B] <> 0 ? Do I need to use CALCULATE and what would the code look like?
Ok, found another way of doing it, with the following issues:
When I use a calculated field with formula =IF([Sum of B]=0;0; ([Sum of A]-[Sum of B])/[Sum of B]) my filters don't work correctly anymore. It empties all fields which are filtered out but doesn't collapse the table. So for example when I filter on 2017, both 2017 and 2018 are displayed but 2018 has only empty fields.
Im kinda new in the whole Pivot Tabel making and I have an issue I can't solve.
I have 2 columns (A and B) with values, I want to add a 3rd one (let's call it C) with the percentage change per row.
I made the following formula =IF([A]=0;0;[A]/[B]*100-100) which works in the Power Pivot window (Data view) from Excel 2010.
When I add this to my Pivot table (under Σ Values) I can only select Sum, Min, Max, Count, etc. but not the raw output from my column in the designer.
I want the 3 columns to be arranged next to each other and grouped by date so the output looks like 01.2017 A B C 02.2017 A B C so i put date and Σvalues in Column labels and A B and C in Σ values. All 3 get SUM of but C I want the raw data.
How to acclompish this? My colleague (not much better than me in Power Pivot) says I have to make a calculated column in the tabel but I can't find how to do this and can't find it online.
Found something more:
What I get when I right click Edit measure in the PP field list:
What I would like to see:
You need to add a Calendar table and use the Time Intelligence functions. There's plenty of examples on Google if you search "Calendar", "Time Intelligence", "Year on Year" and the like. I'd suggest you subscribe to Matt Allington's blog, and also check out this specific post: https://exceleratorbi.com.au/power-pivot-calendar-tables/
Matt has a fantastic book, and if I had one suggestion about picking up PowerPivot it's this: Don't try to muddle through. Buy a book from a pro like Matt or Rob Collie at PowerPivotPro. The cost of a great book is a fraction of the cost of the time you'll otherwise spend scratching your head.
Also check out Mike Girvin's ExcelIsFun YouTube channel for posts on the subject.

Pivot Table Column with Value and Calculated Field row per group?

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.

excel group data on one page allowing for sorting but also updating (prefer no VBA)

I would like to create a spreadsheet that has 3 types of data (list of students, list of teachers, list of parking), for example:
Students Grade Parking_Lot
Joe A 1
Carl B 2
Teachers Class Parking_Lot
Mr. Bob Science 1
Ms. Ann Math 2
Name Parking_Lot Position
Joe 1 Student
Carl 2 Student
Mr. Bob 1 Teacher
Ms. Ann 2 Teacher
I don't want to enter names more than once. I figured I could edit the students and the teachers table, and create the parking table automatically. But then I can't sort the parking table as the entries are all formulas. I'd like to be able to sort by parking lot or name. I also would like to be able to change parking lot from any of the tables.
Is there any way to accomplish this without VBA? Am I thinking about this wrong?
Thanks,
Nachum
Example with PT (using Count of Name for Σ Values):
Unfortunately referencing the parking lots with just 1 and 2 makes the PT more difficult to interpret.
Added some clarification.
Position, Name and Grade are Row Labels (in that order from the top), Parking Lot and Class are Column Labels, with Count of Name for Σ Values. I chose Type for the Report Filter and removed all Field Subtotals (click on each Field if necessary and select None) and in PivotTable Options, Totals & Filters removed the Grand Totals by unchecking Show grand totals for rows and Show grand totals for columns. Note that the PT is driven by the source data – not vice versa. Changes to the source data will be reflected in the PT (after Refresh) but you can’t edit data cells for fields in the row, column, or page area of the PT.

Resources