I am working with pivot tables from Google Spreadsheets. It works well for me and I am extracting interesting data, basically thanks to what I learned in How do I see what is the most common value (mode) of a column? .
This time I have the following table of books read
A | B | C | D | E | F
año | libro | autor | nota | idioma | país autor
With entries of the type
A | B | C | D | E | F
-------------------------------------------------------------
2004 | Hamlet | Shakespeare | 8 | ES | Reino Unido
2005 | Crimen y castigo | Dostoievski | 9 | CAT | Rusia
2011 | Dersu Uzala | Arseniev | 8 | EN | Rusia
Now I want to create a pivot table that aggregates the countries the author comes from, tells me how many books I've read from each country, and what average grades they have.
In this specific case it would output something like:
país | #libros | nota media
----------------------------------
Rusia | 2 | 8,5
Reino Unido | 1 | 8
I have been able to do the first part, that of:
país | #libros
---------------------
Rusia | 2
Reino Unido | 1
With a pivot table where I simply choose the column F:F
. However, to do the mean of the grades I also need the column D
and I don't know how to convert F:F
it to something like D:D;F:F
. What would be the way?
It makes no sense to select non-contiguous columns when the data source is a table (data set consisting of contiguous columns and rows). The recommendation is KISS (keep it super simple, keep it super simple)
A1:F4
A6
Set up your pivot table
país autor
COUNTA
nota
, specifyAVERAGE
Customize the headers,
B6
and edit the cell valueC6
and edit the cell valueThe result should be similar to the following:
You actually have to select all the information to put it in the table. Assuming you have:
You select it and click on
Datos > Tabla dinamica
with the data of'Hoja 1'!A1:F4
In the following image you would click:
In the latter you would have to change
SUM
toAVERAGE
And you would already have:
If you want to change the name of the headers, click on one of them and write what you want to put in the upper bar (you will see that it already says
COUNTA de libro
orAVERAGE de nota
, depending on the one you have selected).