I have a large amount of website page view data. The exported format is:
Page | Date (mm/yy) | View Count
-----------------------------------
Page 1 | 01/18 | 150
Page 1 | 02/18 | 250
Page 1 | 03/18 | 350
Page 1 | 04/18 | 450
Page 2 | 01/18 | 150
Page 2 | 02/18 | 250
Page 2 | 03/18 | 350
Page 2 | 04/18 | 450
What I would like to do is format the data like this:
Page | 01/18 | 02/18
-----------------------
Page 1 | 150 | 250
Page 2 | 150 | 250
Page 3 | 150 | 250
Page 4 | 150 | 250
What you're after can be done with a Pivot table with a few clicks.
Best practice in Excel:
With an Excel Table as the source, when you add more data to your source, you can simply click a cell in the pivot table and use Data > Refresh All to, well, refresh the pivot table.
Just a few clicks, no formulas.
=query({A:C}, "select Col1, sum(Col3) where Col3 is not null group by Col1 pivot Col2")
pivot
does what you wanted
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.