Incrementing Numbers in Query

rich.barry

Registered User.
Local time
Today, 13:07
Joined
Aug 19, 2001
Messages
176
This query is the data source for a chart on a report.
First column of the query is the sorted data.
Second column should be = n / ( count + 1 )
where n is the row number and count is the total number of rows or values in the first column.
Any ideas how this is written as a calculated expression in a query?

Thanks

Richard
 
n = row number
count = total rows

2nd column:[row number / SUM[total rows] + 1]
 
Unfortunately its not quite that easy.
The query has to work out what the row number is and what the total number of rows is.
The only thing it has from the table is a column of sorted numbers. Column 2 must use built in functions to determine the rest

ie

Col1 Col2
12.4 =1/(6+1)
13.2 =2/(6+1)
13.9 =3/(6+1)
16.4 =4/(6+1)
19.1 =5/(6+1)
20.3 =6/(6+1)

Count=6
 
Thanks Pat

It makes one appreciate the simplicity of Excel for such a task!

Richard
 

Users who are viewing this thread

Back
Top Bottom