1

我正在记录我历史上的家庭能源消耗。我正在输入谷歌驱动器电子表格,其中 kWh 数字在过去几年的煤气费中找到。

我已经走了很远 - https://docs.google.com/spreadsheet/pub?key=0AuQU5u-2PP8NdC1iNFJVNFVxeDE2WHhVdTUtbGNDWnc&output=html(这里是谷歌文档 - https://docs.google.com/spreadsheet/ccc?key=0AuQU5u -2PP8NdC1iNFJVNFVxeDE2WHhVdTUtbGNDWnc&usp=共享

现在我想以有趣的方式分析这些数据,以了解我随时间变化的消耗——主要是按日历月计算的千瓦时。问题是,包含千瓦时数据的已发行燃气账单跨越多个月和部分月。例如(2 月 1 日至 5 月 11 日,然后是 5 月 12 日至 8 月 6 日)...

工作表中的所有数据都记录在包含两个关键标识符的行上 - 期间开始和结束日期 - 格式化为日期。

我的问题:我怎样才能使这些东西合理化以遍历那些尴尬的多月账单数据,以产生某种基于日历月(即 2007 年 2 月,2007 年 3 月)使用的千瓦时的平均值或平均值?这在数学上是可能的还是可靠的?

提前致谢。

4

3 回答 3

0

Yes it is doable.
Calculate your cumulative usage (since your bills started) for each gas bill. Interpolate the cumulative usage for the 1st of each month. For Feb 2007 = (Mar_1_2007_cumulative - Feb_1_2007_cumulative).


Goal "... consumption over time - kWh by calendar month."

Even if you had daily consumption figures, as months like January (31 days) are longer than February (28/29), charting what you request would show a + bias in long months and - bias in short months. So let's change the goal to

Goal "... daily consumption over time - kWh/day by calendar month."

Say you have figures like where you list the data, usage since last data and you calculate the cumulative usage since the beginning of your records set.

date         kWH *1  Total*2
Jan 1, 2012  -       0
Mar 3, 2012  100     100
Apr 4, 2012  30      130 
May 2, 2012  35      165
Aug 9, 2012  75      240
Dec 25, 2012 100     340
Jun 7, 2013  200     540

*1 energy used since previous period
*2 Sum of total usage

(Ignore the "kWH *1" column for the following)

Now make a table for the first of the month for a year, say 2012, and find in the above table an entry <= the first of the month, and the next entry.

Jan 1, 2012 (Jan 1, 2012    0) (Mar 3, 2012  100)
Feb 1, 2012 (Jan 1, 2012    0) (Mar 3, 2012  100)
Mar 1, 2012 (Jan 1, 2012    0) (Mar 3, 2012  100)
Apr 1, 2012 (Mar 3, 2012  100) (Apr 4, 2012  130)
May 1, 2012 (Apr 4, 2012  130) (May 2, 2012  165)
...
Dec 1, 2012 ....

As dates can have a serial number, you liner interpolate that serial number into the the 2 date/cumulative_usage pairs. this provides the cumulation usage to your 1st of the month. That becomes column "Interpolation" for the below table. The "Days/Month" is straight forward (days form First of the month to the next). The Usage/Day for a given month is then the (change in "Interpolation") / "Days/Month". E. g. 1-Feb-12 --> (96.8-50.0)/29 = 3.34.

Date         Interpolation  Days/Month  Usage/Day  
1-Jan-12     -              31      1.61 
1-Feb-12     50.0           29      3.34 
1-Mar-12     96.8           31      4.10 
1-Apr-12     127.2          30      5.46 
1-May-12     163.8          31  

All thats left is to chart Usage/Day vs. Date.

于 2013-06-07T05:40:16.600 回答
0

尝试=YEARFRAC(StartDate, EndDate, [convention])使用合理的天数约定为您提供日期之间的小数年数。

有关可用的各种天数约定的更多详细信息,请参阅http://office.microsoft.com/en-gb/excel-help/yearfrac-HP005209344.aspx 。

于 2013-06-06T11:23:16.060 回答
0

第一个问题是每月信息不适合您当前的表结构;为了帮助解释,如果您计算出 2007 年 2 月、5 月和 6 月的不同月费率(它们是不同的费率),您会将这些数字放在表中的哪个位置?

有很多选择,但我认为最好的解决方案是:
创建一个频率一致的新表(即 A 列下的连续月份),然后创建公式以插入源表中的相关值。我实际上会推荐这个“纯”表每天(而不是每月)使用一行,因为:

  1. 数学更容易从源表中读取每日费率
  2. 您可以随时将每日数据汇总到每月
  3. 你不会有在工作表中用完线条的危险
于 2013-06-06T13:34:11.777 回答