Query Help: Max Value in A Row

E

Erica

I am trying to find the max value in a row in an Access Queriy. I originally
started with a table like one below with several values by date.

Code Date $Value 1 $ Value 2 $ Value 3

I then created a query that found the max value for each column grouped by
code.
I now need to take that query and find the max value by code for each row.
My query looks like
Code $Value 1 $Value 2 $ Value 3. THe desired result is to find the
maximum dollar value for $Value 1 $Value 2 $ Value 3 for each code value.

I attempted to do this using the expression builder but it errored out. I
am not familar with SQL and was hoping I could perform this calculation
without SQL.

I would appreciate at any advice anyone could give me. THank you in advance
for your help.
 
A

Allen Browne

You could copy the MaxOfList() function from this webpage:
http://allenbrowne.com/func-09.html
and then use it by typing something like this in the Field row of your
query:
MaxOfList([$Value 1], [$ Value 2], [$ Value 3])

Of course, the better solution would be to use related records in another
table, rather than repeating fields as you have.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top