Excel 2007数据透视表 - 显示已分组和未分组的数据

时间:2022-08-21 20:55:41

I have data as below in 3 columns:

我在3列中有如下数据:

Excel 2007数据透视表 - 显示已分组和未分组的数据

I have created a simple pivot table which looks like this (Invoice Day filtered for days 2 & 4 only):

我创建了一个简单的数据透视表,看起来像这样(仅在第2天和第4天过滤发票日):

Excel 2007数据透视表 - 显示已分组和未分组的数据

I need to modify the pivot to group some rows and display both grouped and ungrouped data. This would change the Grand Total as well. The Pivot table should look like this after it is grouped:

我需要修改数据透视表以对某些行进行分组,并显示已分组和未分组的数据。这也将改变总计。数据透视表在分组后应如下所示:

Excel 2007数据透视表 - 显示已分组和未分组的数据

I tried working with pivot table options a lot but cannot achieve this. Appreciate any help on this!

我尝试使用数据透视表选项很多,但无法实现这一点。感谢任何帮助!

1 个解决方案

#1


0  

I see that this is an interview question.

我看到这是一个面试问题。

What I'd do is adding another column to the source data, say ProductGroup which contains SG+WI for SG and WI products, and CC for the other product. By dragging the ProductGroup field to the pivot table, you will achieve your desired result without getting wrong totals.

我要做的是在源数据中添加另一列,例如ProductGroup,其中包含用于SG和WI产品的SG + WI,以及用于其他产品的CC。通过将ProductGroup字段拖动到数据透视表,您将获得所需的结果,而不会出现错误的总计。

#1


0  

I see that this is an interview question.

我看到这是一个面试问题。

What I'd do is adding another column to the source data, say ProductGroup which contains SG+WI for SG and WI products, and CC for the other product. By dragging the ProductGroup field to the pivot table, you will achieve your desired result without getting wrong totals.

我要做的是在源数据中添加另一列,例如ProductGroup,其中包含用于SG和WI产品的SG + WI,以及用于其他产品的CC。通过将ProductGroup字段拖动到数据透视表,您将获得所需的结果,而不会出现错误的总计。