Crosstab query alters numeric values

G

Guest

Howdy,

I have a table of staff members who serve different locations for a
percentage of their time. So employee X may spend 20% of his time at location
A, and 80% at location B. My table that lists each employee/location
combination as a record with one field for percent. It's never lower than a
single percent (i.e. .08 is possible, but .084 is not).

I had to run that table through a crosstab query to generate a new table
with locations as the record entity. As a sresult, my total employee counts
at each location get spit out as text values. As soon as I do anything to
return them to numeric values, the percentages get corroded or something, and
end up incorrect. For example, .5 may become .4999999672. What is the deal
here?

Any help is appreciated,
Wes
 
T

taurus via AccessMonster.com

Would multiplying the crosstab field holding the % data by 1 help?

W.D. Baker wrote:
As a sresult, my total employee counts
 
G

Guest

Nope. I tried dividing by 1 as well, and adding 0 too. Still weird numeric
things going on.

Now, I'm referring to performing those functions in a later query. Is there
a way to run functions directly within a crosstab query?
 
G

Guest

Try formatting the values to 2 decimal places e.g.

TRASFORM FORMAT(SUM(PercentWorked),"0.00")
SELECT ……..

Ken Sheridan
Stafford, England
 

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

Similar Threads


Top