FLIPSTER
STEAMpunks WIKI
Join The Parade, New South Wales - Ph:+61-2-1234-5678

Google Sheets - Pivot Tables

<img src='http://chart.apis.google.com/chart
 ?cht=p3&chs=450x200&chd=t:2,4,3,1&chl=Phones|Computers|Services|Other
 &chtt=Company%20Sales&chco=ff0000'>

http://chart.apis.google.com/chart?cht=p3&chs=450x200&chd=t:8,7,6
&chl=Plan1|Plan2|Plan3&chtt=MyPDP%20Plan
&chco=ff0000
  1. On your computer, open Google Sheets. https://docs.google.com/spreadsheets/u/0/
  2. Open the spreadsheet with the data you want to put in a table.
  3. Select the cells with data you want to use.
    1. Put the data you want to use into columns. Each column is one data set.
    2. Each column needs a header.
  4. In the menu, click Data and then Pivot table. Click the pivot table sheet, if it’s not already open.
  5. Next to each category in the “Report editor” window, click Add field, then click a column to use.

Your table has one row or column for each number in the column you use, even if the number is in more than one cell.

Data from the columns you use for “Values” is sorted into the matching rows and columns.

If you want to add a field to the “Values” category that calculates values based on a formula,

click Calculated field and enter the formula.

  • “Filters” hide data that you don't want to show in the table.
  • You can change how your data is listed, sorted, summarized or filtered. Next to what you want to change, click the Down Arrow Down Arrow.

To format the pivot tables, use the buttons in the toolbar.

Change or remove data

  • To move a data set from one category to another, drag it to the category you want.
  • To remove a data set from a category, click Remove Remove.
  • To expand the range of data used for your pivot table, click Edit range.
  • The pivot table refreshes any time you change the cells it's drawn from.

PHP MySQL

select week, 
    count(*) as total, 
    sum(technical) as technical, 
    sum(non_technical) as non_technical) 
from(
    select week, 
    case(type) when 'Technical' then 1 else 0 END as technical, 
    case(type) when 'Non-Technical' then 1 else 0 END as non_technical
) as data
GROUP BY week
 
 
howtos/google/pivot-tables.txt · Last modified: 12/03/2017/ 18:36 by 127.0.0.1