Results 1 to 2 of 2
  1. #1
    jduran2 is offline Novice
    Windows 8 Access 2013 64bit
    Join Date
    Nov 2016
    Posts
    4

    Expressions based on several columns

    I have a query that was created with data from several tables in my database (seen below). I'm currently interested in creating a new field in my query that performs some expression or calculation based on several of the fields in the current query.



    For example, in the AnalyteName field we see values for W,W2,W3,W4,W5, and W6 with an associated response and RSD value. In this example, W6 is the total or the sum of W through W5. I would like to find the percent of each value from the total for the whole query. My ideal output would show W/W6, W2/W6,W3/W6, etc.... in new field next to the respective analyte. Note that each W-W6 is unique based on the SampleIndex field. I've worked with basic expressions, but nothing like this.

    Thank you


    Click image for larger version. 

Name:	ratios_rsd.png 
Views:	11 
Size:	262.2 KB 
ID:	26569

  2. #2
    aytee111 is offline Competent At Times
    Windows 7 32bit Access 2013 32bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Make a separate query that does the totaling and then link to it by key (SampleIndex?). That query will contain just the key field and the calculated values.

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

Similar Threads

  1. Replies: 3
    Last Post: 12-29-2015, 04:06 PM
  2. Replies: 2
    Last Post: 10-26-2015, 06:14 AM
  3. Replies: 1
    Last Post: 11-14-2014, 07:59 AM
  4. Replies: 2
    Last Post: 05-17-2012, 03:52 PM
  5. Pie chart based on two columns
    By gem1204 in forum Access
    Replies: 5
    Last Post: 10-25-2011, 07:57 AM

Tags for this Thread

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