简体   繁体   English

枢纽分析表可绘制每个月的日期总和

[英]Pivot table to plot sums of dates of each month

In excel I have a column of days (mm/dd/yyyy) and I want to have a timeline sort of plot showing how many points I have for each month of each year. 在excel中,我有一天的天数(mm / dd / yyyy),我想要一个时间轴图来显示每年每个月我有多少分。 It's easy to show how many instances a day appears with a pivot table (added a column "Count" with just 1's), and then make a plot for that, but I don't know how to do that with just the month/year. 通过枢纽分析表(每天添加1个“ Count”列,然后添加一个列)即可轻松显示一天有多少个实例,然后为其绘制图表,但是我不知道如何仅用月/年。

I tried using the =month and =year functions, and highlighted those columns (with the "Count" column) to make a pivot table, but I'm not sure how to group and plot it the way I want. 我尝试使用= month和= year函数,并突出显示了这些列(带有“ Count”列)以创建数据透视表,但是我不确定如何按照自己的方式对其进行分组和绘制。 Here's what it looks like when I have data point sums for month/day/year, I want the same thing but with the month/year: 这是当我拥有月/日/年的数据点总和时的样子,我想要同样的东西,但月/年:

在此处输入图片说明

And here's my data: 这是我的数据: 在此处输入图片说明

I'm sorry if this is a really low level problem, I'm a noob at pivot tables and have been trying this all day 很抱歉,如果这是一个非常低级的问题,我是数据透视表的菜鸟,并且整天都在尝试

You can group the data by month (or other useful options like quarter & year) IF values are formatted as actual dates. 如果将值格式化为实际日期,则可以按月(或其他有用的选项,如季度和年份)对数据进行分组。 It looks like yours is formatted as a date but just in case, here are two ways to test... 看来您的格式已格式化为日期,但以防万一,这里有两种测试方法...

A) Change format of a cell with date to number (this should return a date serial) A)将带有日期的单元格的格式更改为数字(这应该返回日期序列)
B) Use =ISTEXT(Select Cell With Date) (this should return FALSE ) B)使用=ISTEXT(Select Cell With Date) (这应该返回FALSE

Once valid date format has been verified 一旦验证了有效的日期格式

  1. Click on a date in pivot table 单击数据透视表中的日期
  2. Navigate to Analyze tab 导航到“ Analyze选项卡
  3. Select Group Selection 选择Group Selection
  4. You should get a pop-up asking how you want to group the data. 您应该弹出一个对话框,询问如何对数据进行分组。 Select Month 选择Month
  5. Ensure you are summarizing the points by Sum (right click on point cell in pivot and set option at Summarize Values By ) 确保按Sum对点进行汇总(右键单击支点中的点单元格,然后在Summarize Values By依据处设置选项)

If you are using a pivot chart, it will update on refresh to reflect new row groupings (IE show monthly sums as you asked for) 如果您使用的是数据透视图,它将在刷新时更新以反映新的行分组(即,IE根据您的要求显示每月金额)

Before & After photos below 下面的前后照片


在此处输入图片说明

在此处输入图片说明

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

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