Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2011
    Posts
    31

    Unanswered: Criteria based on calculated fields

    I have a list of numbers that i would like to filter through based on criteria that they fall within the range of
    "Between (Average DAP + Std Dev) AND (Average DAP - Std Dev)" and likewise another for
    "Between (Average DAP + (2*Std Dev)) AND (Average DAP -(2*Std Dev))".

    "Average DAP" and "Std Dev" are both calculated fields of a query. So far i have tried to implement their use within the same query as criteria to display data and from another query as criteria and keep getting error messages. I experimented with square brackets as well, but as you know that only asks the user to enter the value. Am i specifying the criteria wrong? And how can i go about implementing this criteria?

  2. #2
    Join Date
    Oct 2003
    Location
    London
    Posts
    341
    What is your current query?

  3. #3
    Join Date
    Jun 2011
    Posts
    31
    Quote Originally Posted by christyxo View Post
    What is your current query?
    This is the SQL for the query where the value is calculated:

    SELECT SortVerData.Hospital, SortVerData.Room, SortVerData.Examination, SortVerData.[Patient Size], Count(SortVerData.[DAP (cGy cm2)]) AS [Total # of Patients], Min(SortVerData.[DAP (cGy cm2)]) AS [Minimum DAP], Max(SortVerData.[DAP (cGy cm2)]) AS [Maximum DAP], Avg(SortVerData.[DAP (Gy cm2)]) AS [Average DAP], StDev(SortVerData.[DAP (cGy cm2)]) AS [Std Dev of DAP], ([Std Dev of DAP]/Sqr([Total # of Patients]))*2 AS [2 x SEM]
    FROM SortVerData
    GROUP BY SortVerData.Hospital, SortVerData.Room, SortVerData.Examination, SortVerData.[Patient Size]
    ORDER BY SortVerData.Hospital, SortVerData.Room, SortVerData.Examination;

    I'd like to add the criteria here to use values only within the range mentioned before or in another query which calls on this RESULT query.
    Last edited by clownyj; 07-19-11 at 12:50.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •