ExcelHome技术论坛

 找回密码
 免费注册

QQ登录

只需一步,快速开始

快捷登录

搜索
EH技术汇-专业的职场技能充电站 妙哉!函数段子手趣味讲函数 Excel服务器-会Excel,做管理系统 Excel Home精品图文教程库
HR薪酬管理数字化实战 Excel 2021函数公式学习大典 Excel数据透视表实战秘技 打造核心竞争力的职场宝典
300集Office 2010微视频教程 数据工作者的案头书 免费直播课集锦 ExcelHome出品 - VBA代码宝免费下载
用ChatGPT与VBA一键搞定Excel WPS表格从入门到精通 Excel VBA经典代码实践指南
查看: 4753|回复: 1

终曲:值字段技巧

[复制链接]

TA的精华主题

TA的得分主题

发表于 2006-4-23 14:29 | 显示全部楼层 |阅读模式

Pivot Tables grand finale: Tricks with the Values field——透视表终曲:值字段技巧

[Point=2]

This is going to be the last PivotTable post, at least for a while. Unlike the last several posts, the subject matter that follows applies to any PivotTable, not just those connected to SQL Server Analysis Services.

这是本阶段内最后一篇关于透视表的文章了。和前几篇文章不同,本主题相关的应用不只是用于连接到SQL Server Analysis Services的,而是任何透视表。

In current versions of Excel, one of the capabilities that exist in PivotTables is the ability to adjust the position of the labels that describe the values in the Values region of the PivotTable (i.e. “Sum of Sales”). Excel PivotTables offer significant flexibility in this area – the labels can be on rows, on columns, and anywhere in the hierarchy on either of those areas. When we visit customers to talk to them about how they use PivotTables, though, we see a couple of things. First, the majority of users aren’t fans of our initial placement of the labels. Second, most people have never figured out that the labels can be repositioned. We have tried to address both of these items in Excel 12.

在这个版本的Excel中,透视表的一个功能就是,用于描述透视表(例如"Sum of Sales")中选定范围内值的标签的位置是可以改变的。这一点上Excel透视表非常的灵活,标签可以被放在行,列,或者那些区域层级的任意位置。当我们去客户那里,告诉他们怎么使用透视表的时候,通常,我们会遇到两种情况。一种是,大多数用户不喜欢标签的初始位置。另一种,多数客户根本不知道这些标签是可以移动位置的。我们已经试着在Excel12中解决这些问题了。

This area is probably best explained by walking through an example, so here goes. To start with, imagine you were building the following PivotTable. It has some items on rows and columns, and Sales Amount summarized in the Values area.

看一个例子,应该是解释这个问题的最好的方式,所以:),here goes。开始,想象一下你原来做下面这张表的时候。列和行上都有一些项目,后面的计算区域还有销售统计额。

If you add a second field to the Values area – say Product Cost – then Excel adds some captions (“Sum of Sales Amount”, “Sum of Product Cost”) below the years (“2003”, “2004”) to help the user distinguish which numbers are Sales and which numbers are Product Cost.

当你增加另一个字段到数值区域,计算Product Cost,Excel就会在年度("2003","2004")下面加上标题("Sum of Sales Amount","Sum of Product Cost")以帮助用户区别哪些数字是Sales哪些数字是Product Cost。


Those of you familiar with PivotTables have probably already spotted one change from current versions of Excel. In current versions of Excel, the captions are placed in the Row area, not the Column area. Here is a visual of what that looks like.

如果你熟悉数据透视表的话,也许已经看出这个版本的Excel发生了什么改变了。在这个版本的Excel中,标题被放在了行首,而不是列。如下:


This one change – putting the labels on columns and not rows when a second field is added to the Values area – makes PivotTables with multiple items in the Values area more readable, and was the default positioning that most users wanted. So far, feedback on this one small change has been very positive.

当有更多字段被放在计算区域的时候,标签将显示在列上而不是行上,这样的一个改变,使得有多个数值的透视表更具可读性,并且,这也是大多数用户想要的。到目前为止,这个小改变的反映非常良好。

As I said above, PivotTables are flexible enough to show the labels at any point in the hierarchy on either the Row or Column areas . To move the labels around in current versions of Excel, you can drag and drop a “Data” field in the Excel grid. This is not terribly obvious, though, and those folks that did spot this capability often had trouble putting the labels at the point in the hierarchy that they wanted. In Excel 12, we have tried to make this a more straightforward task by putting a field for the labels in the Drop Zone area of the field list that people can move around exactly like any other field. So, when you add more than one field to the Values area, we add a field labeled “∑ Values” to the field list, initially in the Column Label area.

如我上面说的一样,现在的透视表已经非常灵活,随便你把标签放在行还是列上了。在这个版本里,直接在Excel表格里拖拽"Data"字段就可以移动标签了。对于那些经常在移动标签时遇到困难的用户,这显然是小菜一碟了。在Excel 12中,我们试着让这个操作更加简单,用户只要为字段表的拖放区域中的标签再写一个字段,就可以像其他字段一样随便移动了。所以,当您增加一个或多个字段到数值区域的时候,我们就会在这些字段列表标签的开头加上"∑ Values"。



We don’t show this field until you add a second field to the Values area because we don’t put captions in the PivotTable until there are multiple items in the Values area.

当您在数值区域里放置第二个字段的时候字段标题才会显示出来。这是因为我们不希望在透视表里加数值标题,除非里面有多个项目。

If you want to re-position the captions elsewhere, you can simply drag-and-drop the “∑ Values” field to another drop zone or another position in the drop zone that currently contains the “∑ Values” field. Say I wanted to see the labels above the “Year” field in the Column area. All I need to do is start dragging the “∑ Values” field, and I get feedback as to where the field will end up when I am done (blue bar, new cursor).

如果您想把标题放到其它地方,您只需拖拽"∑ Values"字段到其它拖放区域或者已含有"∑ Values"字段的拖放区域的别的位置。也就是说当我要查看列区域中"Year"字段上面的标签的时候,我所要做的就是拖动"∑ Values"字段,当我要放下(蓝色边,不一样的鼠标指针)的时候就会看见字段竖起来。


If I drag the “∑ Values” field above the “Year” field and let go, the PivotTable will refresh, and the captions will now be outside the year information, showing me a different view of my data. Here is what that looks like.

如果我将"∑ Values"字段拖到"Year"字段上放下,透视表就会刷新,并且标题也会显示出年度的信息,显示出来的是一个不同的视图。如下:

I can also move the captions to the Row area. Here is what the PivotTable looks like when I have moved the “∑ Values” field to the bottom of the hierarchy on the Row area.

我也可以将标题移动到行上。下面是当我移动"∑ Values"字段到行的底端相应级别时透视表的样子:


Further, I can move the captions anywhere else in the hierarchy in the Row area. Here is what the PivotTable looks like when I have moved the “∑ Values” field in between the Product Name and Product Category fields.

而且,我可以在行的同级别里随意移动标题。下面是我将"∑ Values"字段移到Product Name 和Product Category字段中间的样子:

By now you are probably getting the idea – the placement of the labels is infinitely flexible, allowing you to see the data pretty much any way you want. Hopefully folks see this as a useful feature. As always, I am interested to hear your feedback.

现在你应该大概明白了——标签的位置已经非常自由了,可以按照你希望的方式更精致的显示数据。呵呵,这是一个非常有用的功能。

注:本文翻译自http://blogs.msdn.com/excel,原文作者为David Gainer(a Microsoft employee),Excel home授权转载。严禁任何人以任何形式转载,违者必究。

[/Point]


[此贴子已经被Kevin于2006-4-26 10:03:46编辑过]

终曲:值字段技巧

终曲:值字段技巧

终曲:值字段技巧

终曲:值字段技巧

终曲:值字段技巧

终曲:值字段技巧

终曲:值字段技巧

终曲:值字段技巧

终曲:值字段技巧

终曲:值字段技巧

终曲:值字段技巧

终曲:值字段技巧

终曲:值字段技巧

终曲:值字段技巧

终曲:值字段技巧

终曲:值字段技巧

TA的精华主题

TA的得分主题

发表于 2008-12-13 22:17 | 显示全部楼层
数据透视表最好的学习方法应该是不断的操练,多练练就是了。不过比较复杂,呵呵
您需要登录后才可以回帖 登录 | 免费注册

本版积分规则

关闭

最新热点上一条 /1 下一条

手机版|关于我们|联系我们|ExcelHome

GMT+8, 2024-4-20 11:38 , Processed in 0.040060 second(s), 14 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 1999-2023 Wooffice Inc.

沪公网安备 31011702000001号 沪ICP备11019229号-2

本论坛言论纯属发表者个人意见,任何违反国家相关法律的言论,本站将协助国家相关部门追究发言者责任!     本站特聘法律顾问:李志群律师

快速回复 返回顶部 返回列表