Calculating between fields in a table and the sorting

access man

New member
Local time
Today, 14:00
Joined
Nov 18, 2007
Messages
6
Below is an example of my table "Pricedata" include 03 fields:

Stock Name ___Price________Status Date
A________________10________ __1/6/2008_
A________________11___________1/7/2008_
A________________12___________1/8/2008__
B________________22___________1/6/2008_
B________________25___________1/7/2008_
B________________29___________1/8/2008__
C________________2____________1/6/2008_
C________________2____________1/7/2008__
C________________3____________1/8/2008_
D________________56___________1/6/2008_
D________________45___________1/7/2008_
D________________27___________1/8/2008__

I want to create a query like this: can calcualte the price change and % price change in certain period, and then sort in % change.

This result should be like the table below:
StockName Change in three days % Change in 03 days
C 1 50%
B 7 31.8%
A 2 20%
D -29 -51.78%

Thanks all,
 
Criteria the certain day

Look at "DemoCalculatingA2000.mdb"
Run Query2, I think it is what you need.

Could you help me to do the query that input 02 days and then compare between 02 days instead of the first day and the last day.

I try to put Date criteria in the First and Last field to find out the percentage change between any day, but I can't. Could you help me again MStef.

Access man
 
Hello access man!

If you want between 2 days, there no difference, (it is the same as
between 3 days).
Look at "DemoCalculating2A2000.mdb".
I made a change only in the table.
 

Attachments

If you want between 2 days, there no difference, (it is the same as
between 3 days).
Look at "DemoCalculating2A2000.mdb".
I made a change only in the table.


Sorry MStef, I don't see different between between 02 table that you sent to me.

Let me explain more detail my problem: I want to compare between any 02 days in my database.
If I input the Monday of this week and the last week -> the query will compare price between a week.

If I input today, and the the day of last year -> the query will compare price between a year.

and so on,...

Thanks,

Access man.
 
Send me a short example of your table, and what you want to win.
 
Send me a short example of your table, and what you want to win.

Dear MStef,

I want to:

1. sorting the ascending & decreasing in percent and in absolute value between any 02 dates that I want. Ex: I want sort between today and yesterday, or today and the last week, or today and the last month

2. I don't know how to put date criteria in my query, despite of you have shown me how to do with "the last and the first" criteria.

3. I think my query should have parameter because I want to chose any date in my query.

By the way, I've tried to attached my file but it don't work!!! Could you please give me my email address so I can send you my table. Mail email address: thuy.vtv@sbsc.com.vn

Thanks again,

Access man.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom