A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Calculation Query



 
 
Thread Tools Display Modes
  #1  
Old July 22nd, 2008, 02:58 AM posted to microsoft.public.access.queries
bengomets
external usenet poster
 
Posts: 2
Default Calculation Query

I have a table with three columns

They a Day, MTD performance and Daily change

I am looking to either write a query to calculate difference between two
numbers in a column (similar to say an excel operation) or build an
expression to calculate the difference between these two numbers.
  #2  
Old July 22nd, 2008, 03:57 AM posted to microsoft.public.access.queries
John W. Vinson/MVP
external usenet poster
 
Posts: 325
Default Calculation Query

On Mon, 21 Jul 2008 18:58:02 -0700, bengomets
wrote:

I have a table with three columns

They a Day, MTD performance and Daily change

I am looking to either write a query to calculate difference between two
numbers in a column (similar to say an excel operation) or build an
expression to calculate the difference between these two numbers.


Several concerns here! Day is a reserved word (for the builtin Day()
function which returns the day of the month of a date argument); more
seriously, the MTD Performance and Daily Change values appear to be
derived from some more basic (sales??) data, and as such should
probably NOT EXIST in a table, but should instead be calculated
dynamically.

What you can do is create a Query based on your table. In a vacant
Field cell type the expression you want. I'm not sure what the
difference between a MTD value and a Daily Change value *means* - the
previous day's value maybe!? - but

Result: [MTD Performance] - [Daily change]

in a field in a query will give you that difference.

--

John W. Vinson/MVP
  #3  
Old July 22nd, 2008, 06:29 PM posted to microsoft.public.access.queries
bengomets
external usenet poster
 
Posts: 2
Default Calculation Query



"bengomets" wrote:

My apologies but I need to be clearer here.

The table with three columns should be date, MTD performance and Daily Change

Example:

7/1 (Date) 0.50% MTD Performance
7/2 0.90% MTD Performance 0.40% Daily Change

If this were in excel, you would be taking the difference of two cells
within the column.

What I am looking to do, is to write a query, or build an expression that
would enable me to get the daily change for 7/2, based on the Month To Date
performances from 7/2 and 7/1 (Or in other words 7/2 Performance-7/1
performance to get the daily change for 7/2)
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:38 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.