Results 1 to 3 of 3
  1. #1
    MIS_Analist is offline Novice
    Windows XP Access 2003
    Join Date
    Oct 2010
    Posts
    1

    Median value for multiple columns

    Hi,

    I'm trying to find the median value in access like in the form below:

    Name Month_1 Month_2 Month_3 Month_4 Month_5 Month_6 Median
    Oagaru 15 18 15 15 15 15
    Se Vede 10 10 45 10 10 10
    Un nimeni 20 20 48 20 20 20

    Bassicaly, I have a column (Nume) that has unique values and six columns with number values. I wan't in the column median to obtain the median value for each unique record in "Nume". e.g: for Oagaru, the result in "Median" Column should be 15.
    Please take in consideration that this is just a sample and the original table cotains more then 1.000.000 million records, with at least 20 columns, so no normalization or other stuffs like this can be taken in consideration.


    Another work-around solution could be to obtain result of the SUM(3rd+4th largest value)/2 since this is the method to calculate the median when you have even numbers, like in this case.

    Thanks in advance

  2. #2
    weekend00 is offline I may not be right
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    1,295
    would please describe in more detail about how do you want/get the MEDIAN?

    I think you need VBA codes to do the calculation.

  3. #3
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    well, you know how to get the median value already, so...try applying this code in your query: http://www.ajenterprisesonline.com/_...me=SumFields()

    it will have to be modified of course, but like weekend says, the query builder cannot do calculations horizontally. you have to resort to code.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. ComboBox with multiple columns
    By rkm360 in forum Forms
    Replies: 10
    Last Post: 05-14-2010, 01:19 PM
  2. Replies: 1
    Last Post: 02-05-2010, 08:33 AM
  3. Consolidate multiple columns into one
    By COforlife in forum Access
    Replies: 17
    Last Post: 10-19-2009, 01:12 PM
  4. Combo Box with multiple columns
    By desireemm1 in forum Access
    Replies: 1
    Last Post: 08-17-2009, 02:36 AM
  5. Multiple Price Columns
    By kmwhitt in forum Access
    Replies: 0
    Last Post: 04-04-2009, 09:48 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums