A pivot table is a way of dynamically presenting data in a spreadsheet program like Microsoft Excel.
For example let’s say you had a spreadsheet of your company’s monthly financial results for the last 20 years. In a pivot table, you could quickly do things like showing each year’s total, or each year’s average, things like that.
Suppose you had data on the monthly production at 5 different factories. There are two fundamental ways to store these data.
First is “long.” The long data will have many rows and three columns: month, factory, and production. To see the production at factory 3 in May 2020, you find the row where month=”May 2020″ and factory=3, then read the value in the production column.
Second is “wide.” The wide data will have just 1 row but many columns. Each column will be labeled something like “Factory X month M”. To see production at factory 3 in May 2020, you find the column labeled “Factory 3 month May 2020” and read the value below.
Both wide and long data are useful in different contexts, and people who do a lot of work with data regularly need to switch between them. So all modern data environments have built-in commands to make it happen. In Excel, this is the “pivot table,” so named because you’re literally “pivoting” the data from a long orientation to a wide orientation or vice-versa.
Latest Answers