views:

62

answers:

3

I have a spreadsheet corresponding to entries of a user, their estimation, and the actual value (say, of hours for a particular project), which we can represent in CSV like:

User,Estimate,Actual
"User 1",5,5
"User 1",7,7
"User 2",3,3
"User 2",9,8
"User 3",6,7
"User 3",8,7

I'm trying to build a report on these users, to quickly see which users underestimate or overestimate, and so I created a pivot table. But, I can't figure out how to simply show if a user has underestimated at some point. I tried to create a calculated field like =IF(Estimate > Actual, 1, 0), but this sums, then compares the Estimate and Actual columns and tells me that "User 3" doesn't over/underestimate.

Without adding an additional field to my data, how can I accomplish this?

A similar SQL pseudo-query would be:

SELECT DISTINCT al.User,
(SELECT COUNT(*) FROM ActivityLog AS l2 WHERE l2.User = al.User AND l2.Estimate > l2.Actual) AS Overestimates
FROM ActivityLog AS al
A: 

add a column for actual-estimate

then summarize those values for min max and average. (or stddev)

Randy
You're saying that I need to add a column to my data or the pivot table?
palswim
it is a calculated value - so to the pivot i would guess.
Randy
Calculated values only deal with the sum of those columns for each particular user. (E.g. for "User 3", a calculated `Actual-Estimate` would yield 0, since `(7+7) - (6+8) = 0`.)
palswim
+1  A: 

Calculated fields in pivot tables stink. I would get rid of the pivot table and do it with formulas. Start a unique list of users in H15 and enter this in I15

{=MAX(($A$2:$A$7=H16)*($B$2:$B$7-$C$2:$C$7<>0))}

array entered. This will return 1 if they ever over or under estimated and zero if they never did. The downside is that you can't "refresh" it like a pivot table so you have to make sure your unique user list is accurate all the time.

If that's too big of a downside, I think you'll need to add a column to your source data. Specifically

=ABS(B2-C2)

And add that to your pivot table. It will show zero for never over/under and non-zero otherwise.

Dick Kusleika
A: 

You are aware that you should make sure the estimates are all in the same range? Smaller numbers can be estimated better (when talking about hours).

Stephan Eggermont
Huh? I'm giving the estimating hours scenario as an example.
palswim