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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|