Excel pivot table: How to hide Base Item when show

2019-08-09 21:37发布

I'd like to create a pivot table with values presented as a difference from a specified Base Item. However, I'd like to hide Base Item itself, as it adds redundant empty space to a table.

Picture showing what I'm looking for: Desired result

Is it doable? I'm looking for a solution that does not require hiding worksheet rows or using VBA macro.

Also, I'd like to refrain from adding aditional columns to source table.

Note: filtering out Base Item results in #N/A error as seen below:

enter image description here

1条回答
Viruses.
2楼-- · 2019-08-09 22:10

You can't hide the base item when using it in a "Show values as..." setting.

You can, however, create a calculated items that calculate the difference from A, display those items and hide all original items.

In your PivotTable, click any item in the Row labels.

From the PivotTable Tools ribbon, go to Options > Fields, Items, & Sets > Calculated Item

You'll need to give it a unique name, such as using underscores or remove spaces.

Then create the formula for the field. Select your Dimension field in the Fields list. Select the B Item in the Items list and click Insert Item to add it to your Formula. Enter the a minus then Insert the A Item. Click Save and the new calculated field is added to your PivotTable. Repeat for Item C. Now you can hide the original Items and display only the calculated difference for Items B and C from Item A.

IMG

查看更多
登录 后发表回答