If you have a couple of years of daily data in Excel, you can use a pivot chart to quickly compare that data, month by month, year over year. This short video shows how to compare annual data in Excel pivot chart.

如果您在Excel中有几年的每日数据,则可以使用数据透视图逐年,逐年快速比较该数据。 这个简短的视频演示了如何在Excel数据透视图中比较年度数据。

视频:在数据透视图中比较年份 (Video: Compare Years in Pivot Chart)

This video shows how to create a pivot table, and make a pivot chart that lets you compare two years of data.

该视频显示了如何创建数据透视表,以及如何创建数据透视表以比较两年的数据。

Depending on your version of Excel, and your option settings, the dates might be grouped automatically, or they might not be.

根据您的Excel版本和选项设置,日期可能会自动分组,也可能不会自动分组。

There are written instructions below the video that show how to group, if necessary, and how to change your option settings.

视频下方有书面说明,说明了如何分组(如有必要)以及如何更改选项设置。

演示地址

创建数据透视表和数据透视图 (Create a Pivot Table and Pivot Chart)

In this example, there is a named Excel table with 2 years of data from service calls.

在此示例中,有一个名为Excel的表格,其中包含来自服务调用的2年数据。

We'd like to compare the number of work orders completed each month, year over year.

我们想比较每年每个月完成的工单数量。

To create a pivot table and pivot chart,

要创建数据透视表和数据透视图,

  • Select any cell in the work orders table选择工作单表中的任何单元格
  • On the Excel Ribbon, click the Insert tab在Excel功能区上,单击“插入”选项卡
  • In the Charts group, click Pivot Chart在“图表”组中,单击“数据透视图”
  • In the Create PivotChart window, the table name (WorkOrders) should automatically appear in the Table/Range box在“创建数据透视图”窗口中,表名称(WorkOrders)应自动出现在“表/范围”框中
  • Select a location for the pivot table选择数据透视表的位置
  • You don't need to check the box for "Add this data to the Data Model"您无需选中“将数据添加到数据模型”框
  • Click OK点击确定

将订单计数添加到数据透视图 (Add Order Count to Pivot Chart)

After you click OK, an empty pivot table and pivot chart are added to your workbook.

单击确定后,一个空的数据透视表和数据透视图将添加到您的工作簿。

At the right, in the PivotChart Fields list, right-click on WO, and add it to the Values area

在右侧的“数据透视图字段”列表中,右键单击WO,并将其添加到“值”区域

Because the Work Order codes are text, the value is summarized with a count of the orders. The WO count is also added to the pivot table

因为工作单代码是文本,所以该值将与订单计数一起汇总 。 WO计数也添加到数据透视表中

将工作日期添加到数据透视图 (Add Work Date to Pivot Chart)

Next, add a check mark to the WorkDate field, to add it to the pivot chart layout.

接下来,在“工作日期”字段中添加一个复选标记,以将其添加到数据透视图布局中。

Excel will automatically add this date field to the Axis fields (Categories).

Excel将自动将此日期字段添加到“轴”字段(“类别”)中。

Depending on your Excel version, and your option settings, you might see

根据您的Excel版本和选项设置,您可能会看到

  • all the dates listed individually (as shown in the video)单独列出的所有日期(如视频所示)
  • OR just the years listed (in the screen shot below)或者只是列出的年份(在下面的屏幕截图中)

In Excel for Office 365, and the default option settings, my pivot chart shows the total work order count for each year.

在Excel for Office 365和默认选项设置中,我的数据透视图显示了每年的总工单计数。

There are instructions further down, that explain how to change that date grouping option.

后面还有说明,说明了如何更改该日期分组选项。

It also looks like this is a big difference between the years, but that's because the vertical axis starts at 116, instead of zero. We can fix that later, if necessary.

看起来这几年之间存在很大差异,但这是因为垂直轴从116开始,而不是零。 如有必要,我们可以稍后进行修复。

显示月份 (Show the Months)

If your pivot chart is showing the years, the next step is to show the months. (If all dates are showing, go to the next section)

如果您的数据透视图显示年份 ,则下一步是显示月份。 (如果显示所有日期,请转到下一部分)

  • In the pivot table (not the pivot chart), right-click on one of the years在数据透视表(不是数据透视图)中,右键单击年份之一
  • Point to the Expand/Collapse command指向“展开/折叠”命令
  • Click on the Expand Entire Field command单击扩展整个字段命令

按月和年分组日期 (Group Dates by Month and Year)

If your pivot chart is showing individual dates, the next step is to fix the date grouping.

如果数据透视图显示各个日期 ,则下一步是修复日期分组。

  • In the pivot table (not the pivot chart), right-click on one of the dates在数据透视表(不是数据透视表)中,右键单击日期之一
  • Click the Group command单击组命令
  • In the Grouping window, the Starting at and Ending at boxes will show the first and last dates from the WorkDate field在“分组”窗口中,“开始于”和“结束于”框将显示“工作日期”字段中的开始日期和结束日期
  • In the "By" list, click on Months and Years, then click OK在“按”列表中,单击“月份和年份”,然后单击“确定”。

更改图表类型 (Change the Chart Type)

The pivot chart now shows a bar for each month, from January 2018 to November 2019.

数据透视图现在显示了从2018年1月到2019年11月每个月的条形图。

To compare year over year, we'll change it to a line chart.

为了逐年比较,我们将其更改为折线图。

  • Right-click on the pivot chart, and click the Change Chart Type command右键单击数据透视图,然后单击“更改图表类型”命令
  • In the list of chart types, click on Line在图表类型列表中,单击“线”
  • Choose the first line chart option – Line, and click OK选择第一个折线图选项–折线,然后单击确定

逐年更改 (Change to Year Over Year)

The pivot chart now shows a line, but we want a separate line for each year, not a single line for the two-year time period.

现在,数据透视图显示了一条线,但我们希望每年有一条单独的线,而不是两年时间段的一条线。

You can do the next step in the Pivot Chart, or in the Pivot Table.

您可以在“数据透视表”或“数据透视表”中进行下一步。

Pivot Chart

枢轴图表

  • Click on the pivot chart to select it单击数据透视图以将其选中
  • In the PivotChart Fields List, drag the Years field into the Legend (Series) area.在数据透视图字段列表中,将“年份”字段拖到“图例(系列)”区域中。

Pivot Table

数据透视表

  • Click on any cell in the pivot table单击数据透视表中的任何单元格
  • In the PivotTable Fields List, drag the Years field into the Columns area.

    在“数据透视表字段列表”中 ,将“年”字段拖到“列”区域。

数据透视图中的两条单独的线 (Two Separate Lines in Pivot Chart)

After you move the Years field, the pivot chart will show two separate lines – one for each year.

移动“年份”字段后,数据透视图将显示两条单独的线-每年一条。

The pivot table layout also changes, with the years as column headings, across the top.

数据透视表的布局也随着顶部列的年份而改变。

You can't change a pivot chart, without affecting the pivot table that it's based on.

您不能更改数据透视表,而不会影响它所基于的数据透视表 。

数据透视图格式 (Pivot Chart Formatting)

After you have the pivot chart set up to show a separate line for each year, you can clean up the formatting, if you'd like to.

设置数据透视图以显示每年单独的折线后,可以根据需要清理格式。

Here are a few suggestions:

这里有一些建议:

Value Button: In the pivot table, change "Count of WO" to "Work Orders", in the top left cell. That will change the label at the top left of the pivot chart.

值按钮 :在数据透视表中,将左上方单元格中的“ WO的计数”更改为“工单”。 这将更改数据透视图左上方的标签。

Legend: In the pivot chart, right-click the Legend, and click Format Legend

图例 :在数据透视图中,右键单击图例,然后单击设置图例格式

  • For the Legend position, choose Top, and uncheck the option to Show the legend without overlapping the chart对于图例位置,选择顶部,然后取消选中显示图例而不重叠图表的选项
  • Right-click on the Legend button, and click Hide Legend Field buttons on Chart用鼠标右键单击图例按钮,然后单击图表上的隐藏图例字段按钮
  • Then, point to the Legend's border, and drag the Legend to a new position, if necessary, so it doesn't cover the lines然后,指向图例的边框,并在必要时将图例拖动到新位置,以免覆盖线

Axis Button: Right-click on the WorkDate button, and click Hide Axis Field buttons on Chart

轴按钮 :右键单击“工作日期”按钮,然后单击“图表”上的“隐藏轴字段”按钮。

Here's the pivot chart, after making those changes.

进行这些更改后,这是数据透视图。

自动数据透视表日期分组 (Automatic Pivot Table Date Grouping)

In Excel 2016 and later versions, when you create a Pivot Table, Excel automatically groups the dates into years and months.

在Excel 2016和更高版本中,当您创建数据透视表时,Excel会自动将日期分为年份和月份。

If you'd prefer to see individual dates, follow these steps to change your Excel options.

如果您希望查看各个日期,请按照以下步骤更改Excel选项。

NOTE: This is an application-level setting, and will affect all your Excel workbooks.

注意:这是应用程序级别的设置 ,并且会影响您所有的Excel工作簿。

  • On the Ribbon, click the File tab, then click Options在功能区上,单击“文件”选项卡,然后单击“选项”。
  • Click the Data category, and at the end of the Data options section, add a check mark to "Disable automatic grouping of Date/Time columns in PivotTables"单击“数据”类别,然后在“数据选项”部分的末尾,向“在数据透视表中禁用日期/时间列的自动分组”中添加一个复选标记。
  • Click OK to apply the new settings.单击确定以应用新设置。

获取数据透视图示例文件 (Get the Pivot Chart Sample File)

To get the workbook with the Work Order data, go to the Pivot Chart Compare Years page on my Contextures website.

若要获取带有工作单数据的工作簿,请转到Contextures网站上的“数据透视图比较年份”页面 。

The zipped file is in xlsx format, and does not contain any macros.

压缩文件为xlsx格式,不包含任何宏。

翻译自: https://contexturesblog.com/archives/2019/11/07/compare-annual-data-in-excel-pivot-chart/


http://www.taodudu.cc/news/show-5682059.html

相关文章:

  • 80行python代码查询你想要的英雄信息
  • pyecharts制图笔记
  • 手机必备epub阅读软件
  • 2016.03.20
  • 酷狗音乐html5韩国,韩国SHOFAR MUSIC独家入驻酷狗 脸红的思春期掀收听热
  • 年底了是时候学新技术了「GitHub 热点速览 v.21.52」
  • 你的电脑适合升级 Win11 吗?「GitHub 热点速览 v.21.26」
  • 《暗黑破坏神2》重置版 采访记录(一)
  • 远程文件拷贝(fastcopy为例)
  • 一个复制也能玩出花来
  • 鼠标灵敏度怎么调?Mac系统调整鼠标灵敏度教程
  • C#修改系统的鼠标移动速度
  • win7玩游戏时不能全屏该怎么解决
  • openni.utils.InitializationError: OpenNI2 could not be loaded:
  • java使用bytebuddy动态生成带泛型的DTO
  • 编码解码与文件操作
  • TGY_Windows 8.1 x64 企业版(集成Office2013)
  • 理解volatile关键字
  • 酷狗小试页面和简写代码
  • 由酷狗官网界面改造成的焦点新闻插件
  • 仿酷狗官网新闻焦点图插件
  • 一个90后做游戏的女生自白
  • 十年前的java游戏_十年前那些你玩过的手机游戏,现在都去哪儿了?
  • 最新游戏上线(女生版)
  • java打飞机小游戏(跟着网上视频写到)
  • 创意低俗?摸腿游戏
  • android打不出字母来,英雄联盟游戏里打不了字-不能打字解决方法
  • 我的世界服务器修改末地难度,我的世界带你解锁进入末地的高难度姿势
  • 洛谷P3146 区间dp做题笔记
  • 我的世界服务器修改末地难度,我的世界|带你解锁进入末地的高难度姿势

比较Excel数据透视图中的年度数据相关推荐

  1. pandas删除数据行中的重复数据行、基于dataframe所有列删除重复行、基于特定数据列或者列的作何删除重复行、删除重复行并保留重复行中的最后一行、pandas删除所有重复行(不进行数据保留)

    pandas删除数据行中的重复数据行.基于dataframe所有列删除重复行.基于特定数据列或者列的作何删除重复行.删除重复行并保留重复行中的最后一行.pandas删除所有重复行(不进行数据保留) 目 ...

  2. lmbs PHP,PHP 清空 MySql 指定数据表中的所有数据

    PHP 清空 MySql 指定数据表中的所有数据 PHP 清空 MySql 指定数据表中的所有数据,在烈火小编在网上闲逛时,这是某技术博客的一篇文章,说是文章,并没有文字,只有代码,经过测试可以使用, ...

  3. Java实验9 T3.对二进制数据文件中的所有数据求和

    题目要求 (对二进制数据文件中的所有数据求和)假设已经使用DataOutputStream中的writeInt(int)创建一个名为Exercise 19_3.dat的二进制数据文件,文件包含数目不确 ...

  4. layui数据表格中导出所有数据的简易解决办法

    layui数据表格中导出所有数据的简易解决办法 官方文档的困惑 解决办法 官方文档的困惑 首先要说明的是:layui在 table 的工具栏内置了数据导出按钮,如果你是用它内置的导出按钮来导出数据,是 ...

  5. mssql sqlserver 禁止删除数据表中指定行数据(转自:http://www.maomao365.com/?p=5323)

    转自:http://www.maomao365.com/?p=5323 摘要: 下文主要讲述,如何禁止删除数据表中指定行数据 最近收到用户一个需求,禁止所有人删除"表A"中,ID ...

  6. 微信公众号数据2019_公众号年度数据报告怎么写?2019年公众号年报可一键生成啦!...

    一年的光景过去了,又到了写年度总结的时候,老大说要写公众号的年度数据报告,OMG,我是谁.我在哪.我要干什么,阅读.留言.在看.打开率.增长率......恍恍惚惚不知道从哪里下手! 一年的运营总况怎样 ...

  7. pv实现前趋图_Excel 数据透视图实现简易交互式数据面板

    美国Ebay公司成立于1995年的圣何塞,是一家可让全球民众上网买卖物品的线上拍卖及购物网站.本文将结合Ebay(某类体育用品的)在线拍卖数据,主要使用Excel数据透视表为工具,来实现简易的交互式数 ...

  8. python从文件中读取数据_Python3 中把txt数据文件读入到矩阵中的方法

    下面为大家分享一篇Python3 中把txt数据文件读入到矩阵中的方法,具有很好的参考价值,希望对大家有所帮助.一起过来看看吧 1.实例程序: ''' 数据文件:2.txt内容:(以空格分开每个数据) ...

  9. 三分钟看懂大数据风控中用户行为数据的采集、分析及应用( 转 )

    据统计,目前银行传统的风控模型对市场上70%的客户是有效的, 但是对另外30%的用户,其风控模型有效性将大打折扣. 大数据风控作为传统风控方式补充,主要利用行为数据来实施风险控制, 用户行为数据可以作 ...

最新文章

  1. 解锁新姿势:探讨复杂的 if-else 语句“优雅处理”的思路
  2. 用python实现计算器功能_使用python实现计算器功能
  3. 人类无法抗拒的10种心理(转)
  4. 编程方法学26:介绍Java标准库
  5. Machine Learning之Python篇(一)
  6. python实现dem输出三维模型_python DEM数据可视化
  7. 企业会计准则2020版pdf_2020年下半年CATTI三级笔译中译英真题+参考答案+原文件汉英对照PDF版...
  8. Python快速计算Fibonacci数列中第n项的方法
  9. 从零开始拿到了Kaggle竞赛冠军--学习笔记(不是本人)
  10. windows7系统损坏修复_windows系统启动不了,怎么办?一招轻松搞定!
  11. 44. Factor parameter-independent code out of templates.
  12. 无线充U型超声波电动牙刷方案开发
  13. 学习帮——提高智商、改善记忆力的120种绝佳方法!
  14. 计算机execl必背知识点,【分享】Excel必备基础知识(1)
  15. cad转图片格式后不清晰怎么办?三步即可解决
  16. 通过网络数据采集系统快速获得优质销售线索
  17. 运动目标检测发展概述
  18. 周伟焜称卸任CEO后更忙 愿做IBM中国同事师傅
  19. 'Connection aborted.', BadStatusLine('\x15\x03\x01\x00\x02\x02\x16',)
  20. 【元宵快乐】猜灯谜吃元宵 元气满满闹元宵~(附猜灯谜小游戏)

热门文章

  1. 民生银行数据中台体系的构建与实践
  2. TC Games电脑玩手机游戏助手全新升级,会员享更多功能权益了解一下
  3. PS板绘笔记(2):如何自学,避免无脑临摹
  4. Java设计模式-命令模式
  5. 斑点检测simpleBlobDetector
  6. 如何把手机计算机图标放到桌面,手机桌面图标怎么设置,桌面图标主题包
  7. 卡内基梅隆大学机器人研究所教授最新力作:移动机器人学
  8. mysql的text的默认值,mysql给text设置一个默认值(干货)
  9. MySQL递归查询组织架构
  10. HDG杭州站报名| 分享华为CCE容器云、CloudOpera IES和视频UI开放架构实践