简体   繁体   English

Excel数据透视表中的自定义列

[英]Custom column in Excel pivot table

I am using a pivot table to display data. 我正在使用数据透视表来显示数据。 In the pivot table I have countries and under each country couple of names. 在数据透视表中,我有国家/地区,在每个国家/地区下都有几个名字。 Then how many training a person led and how big attendance there was. 然后是一个人领导了多少培训,出席人数又有多大。

I have two questions: 我有两个问题:

1) In the data source, I created additional column where is displayed the last training date (latest date) for every person. 1)在数据源中,我创建了一个附加列,其中显示了每个人的最后培训日期(最新日期)。 Meaning that in the source data, in every row for one person, there is always the same "Last training date". 意味着在源数据中,一个人的每一行中,总是有相同的“上次培训日期”。 I would like to take this information a show it in the pivot table. 我想将此信息显示在数据透视表中。 But anywhere I put it, it's always used as another filter and it makes the table much more complex. 但是无论我在何处放置它,都始终用作另一个过滤器,这使表变得更加复杂。 I would like to have just a custom column with this info without having to expand the whole table. 我只想使用此信息创建一个自定义列,而不必扩展整个表。 It's the last column in the example image. 这是示例图片中的最后一列。

2) Same applies for the attendance. 2)出席人数相同。 If the training has been cancelled, the attendance is always 0. Is there a way to hide the whole column? 如果培训已取消,则出席率始终为0。是否可以隐藏整个列? Same for the total of attendance. 出席总数相同。 I don't really need these columns. 我真的不需要这些列。

在此处输入图片说明

Try This: 尝试这个:

First question: 第一个问题:

  1. In the main table change the [Date Field] to type Number 在主表中,将[日期字段]更改为数字
  2. Put the [Data Field] in values into the pivot table 将[数据字段]中的放入数据透视表
  3. Select any value where is the column [Date Field] and right click: 选择[日期字段]列所在的任何值,然后右键单击:
  4. Go to Summarize values by select Max 通过选择最大值转到汇总值
  5. Again right click. 再次右键单击。 Go to Number Format... 转到数字格式...
  6. Select the date format what you like 选择所需的日期格式

Second question: 第二个问题:

I would like to see a data's sample. 我想查看数据示例。 It could be fake. 可能是假的。 I have some ideas but is difficult to see just guessing... 我有一些主意,但很难猜到...

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

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