Combining different fees columns to create PivotTable income statement? [duplicate]

情到浓时终转凉″ 提交于 2019-11-28 06:44:48

问题


I have a table which records revenue for each product, split into type of revenue: price, fees, tax etc.

To analyze the data I'd like to build a PivotTable to show the revenue breakdown, e.g.:

So to build this PivotTable I need to somehow create an intermediate table of the following format so the PivotTable can be used:

My question is, how do I create a PivotTable from the original table automatically without manually constructing the second table?


回答1:


Here are the steps you have to do:

(1) Enter the data.

(2) Go to the Data tab and select From Table/Range.

(3) A new window will open up with the Query Editor. Here you need to go to the Transform tab, select the three columns you wish to unpivot and then click Unpivot Columns.

(4) The result will be the following (shown in the Query Editor)

(5) Now you can Load this data to the sheet using Close & Load To... on the Home tab

(6) Select the option to show the data in a pivot table and indicate where the pivot table should be placed before clicking OK

(7) The final result should look something like this once you have dragged the various field into the respective boxes: product and attribute into rows while values goes into the values box



来源:https://stackoverflow.com/questions/47283811/combining-different-fees-columns-to-create-pivottable-income-statement

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!