计算上个月的数字 [英] Calculating figures from a previous month
问题描述
寻找答案并在书籍和网站上进行搜索但仍无法找到答案:
我正在建立一个关于住房数据的市场趋势数据库。我的表中有以下字段:
我的目标是查找本月和上个月之间的变化百分比。很容易,但我该如何设置呢?它不像excel你可以进入单元格。
月(1月,2月,3月等)
年
市场趋势区域
SFR中位数销售价格
销售价格变动的SFR%公式:(当月SFR中位数销售价格 - 上个月SFR中位数销售价格)/(上个月SFR中位数销售价格)
如何设置公式以便识别哪个列是上一个月,哪个是当前月?我如何让数据库考虑到这一年?
我希望这是有道理的。
感谢任何帮助都会非常感激。
我一直在四处寻找解决你提到的问题的方法。我看到你发帖了,但没有回复,你找到了答案吗?
塞西尔
寻找答案并在书籍和网站上进行了搜索,但仍无法找到答案:
我正在建立一个关于住房数据的市场趋势数据库。我的表中有以下字段:
我的目标是查找本月和上个月之间的变化百分比。很容易,但我该如何设置呢?它不像excel你可以进入单元格。
月(1月,2月,3月等)
年
市场趋势区域
SFR中位数销售价格
销售价格变动的SFR%公式:(当月SFR中位数销售价格 - 上个月SFR中位数销售价格)/(上个月SFR中位数销售价格)
如何设置公式以便识别哪个列是上一个月,哪个是当前月?我如何让数据库考虑到这一年?
我希望这是有道理的。
感谢任何帮助都会非常感激。
还没有等待......我还在搜索其他网站 - 如果我找到答案我会告诉你的。
谢谢!
寻找答案并在书籍和网站上进行搜索,但仍然可以找不到答案:
我在房屋数据上设置市场趋势数据库。我的表中有以下字段:
我的目标是查找本月和上个月之间的变化百分比。很容易,但我该如何设置呢?它不像excel你可以进入单元格。
月(1月,2月,3月等)
年
市场趋势区域
SFR中位数销售价格
销售价格变动的SFR%公式:(当月SFR中位数销售价格 - 上个月SFR中位数销售价格)/(上个月SFR中位数销售价格)
如何设置公式以便识别哪个列是上一个月,哪个是当前月?我如何让数据库考虑到这一年?
我希望这是有道理的。
感谢任何帮助都会非常感激。
那里。
我有一个可行的解决方案。
First of所有你需要重新组织表结构如下。
表:
tblMonthSales
keyMonthSaleID Autonumber(Long),PK
keyMonthID Long,FK(tblMonths)
lngYear Long
curSale Currency
> tblMonths
keyMonthID Autonumber(Long),PK
txtMonth Text
完成此操作后,您将能够构建以下查询。
每个查询都相同。
到目前为止,查询不计算1月份之间的销售变化和去年12月。如果您觉得这个解决方案可以接受,我也会帮您解决这个小问题。 :)
查询:
qryChangeOfSales
展开 | 选择 | Wrap | 行号
Looking for answers and have done a search in books and websites and still can''t find the answer:
I am setting up a Market Trend DB on housing figures. I have the following fields in my table:
My objective is to find the percent of change between this month and last month. Easy enough, but how do I set this up? It''s not like excel where you can just enter the cell.
Month (Jan,Feb,Mar, etc..)
Year
Market Trend Area
SFR Median Sales Prices
SFR % of Change of Sales Price Formula: (Current Month SFR Median Sales Price -Previous Month SFR Median Sales Price)/(Previous Month SFR Median Sales Price)
How do I set up the formula so that it recognizes which column is the previous month and which is the current month? And how do I have the DB take the year into consideration?
I hope this makes sense.
Thanks any help would be really appreciated.解决方案Hi,
I have been scrambling around for solutions to the problem you mention below. I saw you post, but no replies, did you find an answer?
Cecil
Looking for answers and have done a search in books and websites and still can''t find the answer:
I am setting up a Market Trend DB on housing figures. I have the following fields in my table:
My objective is to find the percent of change between this month and last month. Easy enough, but how do I set this up? It''s not like excel where you can just enter the cell.
Month (Jan,Feb,Mar, etc..)
Year
Market Trend Area
SFR Median Sales Prices
SFR % of Change of Sales Price Formula: (Current Month SFR Median Sales Price -Previous Month SFR Median Sales Price)/(Previous Month SFR Median Sales Price)
How do I set up the formula so that it recognizes which column is the previous month and which is the current month? And how do I have the DB take the year into consideration?
I hope this makes sense.
Thanks any help would be really appreciated.
No still waiting... I''m still searching other sites though -if I find the answer I''ll let you know.
Thanks!
Looking for answers and have done a search in books and websites and still can''t find the answer:
I am setting up a Market Trend DB on housing figures. I have the following fields in my table:
My objective is to find the percent of change between this month and last month. Easy enough, but how do I set this up? It''s not like excel where you can just enter the cell.
Month (Jan,Feb,Mar, etc..)
Year
Market Trend Area
SFR Median Sales Prices
SFR % of Change of Sales Price Formula: (Current Month SFR Median Sales Price -Previous Month SFR Median Sales Price)/(Previous Month SFR Median Sales Price)
How do I set up the formula so that it recognizes which column is the previous month and which is the current month? And how do I have the DB take the year into consideration?
I hope this makes sense.
Thanks any help would be really appreciated.Hi, there.
I have a working solution for you.
First of all you need to reorganize table structure as following.
Tables:
tblMonthSales
keyMonthSaleID Autonumber(Long), PK
keyMonthID Long, FK(tblMonths)
lngYear Long
curSale Currency
tblMonths
keyMonthID Autonumber(Long), PK
txtMonth Text
Having done this you will be able to build the following queries.
Each of them does the same.
So far the queries don''t calculate change of sales between January and December of previous year. If you will find this solution acceptable, I''ll help you to solve this little problem too. :)
Queries:
qryChangeOfSales
Expand|Select|Wrap|Line Numbers
这篇关于计算上个月的数字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文