Expression in query

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
 
D

Damon Heron

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

Damon
 
R

Radhika

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
 

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