简体   繁体   English

Excel Pivot 表-分别显示年月

[英]Excel Pivot Table - Display Year and Month Separately

I'm wondering how I can create a pivot table so that the Year is populated on each row (vs. collapsed).我想知道如何创建一个 pivot 表,以便在每一行上填充年份(相对于折叠)。

Below is what I want to get.以下是我想要得到的。 I have Year on each row and there isn't an empty row when I collapsed the Year.我的每一行都有年份,当我折叠年份时没有空行。

在此处输入图像描述

This is what I'm currently have.这就是我目前拥有的。 As can be seen, there is an aggregated row for each Year.可以看出,每年都有一个聚合行。

在此处输入图像描述

So, if year and month are different columns in your data, then I don't see a problem.因此,如果年和月是数据中的不同列,那么我看不出有什么问题。 No subtotals, no grand totals, design in tabular form, repeat all labels.没有小计,没有总计,以表格形式设计,重复所有标签。

Here is picture when year is collapsed.这是折叠年份时的图片。 Is this not what you want to see?这不是你想看到的吗?

在此处输入图像描述

Assuming your dates are in a single column:假设您的日期在一列中:

For the Report Layout, select to对于报告布局,select 至

  • Show in tabular form以表格形式显示
  • Repeat all item labels重复所有项目标签
  • no subtotals没有小计

original data原始数据

在此处输入图像描述

uncollapsed未倒塌的

在此处输入图像描述

Collapsed倒塌

在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM