Expression in query

  • Thread starter Thread starter Radhika
  • Start date Start date
R

Radhika

The query I am trying to create is from another query which takes the sum of
two fields and the count of a third. I am trying to add the two 'sum' fields
in a query and divide the result by the 'count' field.
My expression is:
Average: (([SumOfProcedures non-time based]+[SumOfTime Based
Units])/[CountOf# Hours Worked])

I get '#Error' in the result. This does not happen if i only add the two
'sum' fields.
([SumOfProcedures non-time based]+[SumOfTime Based Units])

What am I doing incorreclty?

Thank you,
Radhika
 
Break it into two expressions:
SELECT [sumofProcedures non-tim....]+[sumofTime...] AS Ans1,
[ans1]/[countofhours...] AS Ans2
FROM YourQuery1;

Damon
 
I did try doing that. However, I still get an '#Error' msg for Ans2

Damon Heron said:
Break it into two expressions:
SELECT [sumofProcedures non-tim....]+[sumofTime...] AS Ans1,
[ans1]/[countofhours...] AS Ans2
FROM YourQuery1;

Damon

Radhika said:
The query I am trying to create is from another query which takes the sum
of
two fields and the count of a third. I am trying to add the two 'sum'
fields
in a query and divide the result by the 'count' field.
My expression is:
Average: (([SumOfProcedures non-time based]+[SumOfTime Based
Units])/[CountOf# Hours Worked])

I get '#Error' in the result. This does not happen if i only add the two
'sum' fields.
([SumOfProcedures non-time based]+[SumOfTime Based Units])

What am I doing incorreclty?

Thank you,
Radhika
 
Back
Top