Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
 
Posts: n/a
Default PivotTable Calculated Item error

I'm new to working with calculated items in PivotTables, and I've run
into a bit of a snag.

My PivotTable is built off of a data set with a start and stop time (in
military time) for a number of workers. Included in the data set as
well is a worktype. I have a calculated field in my Pivot which returns
the # of hours worked by way of the following formula:

(EndTime-StartTime)*24

I have this data displayed by work type and date on the top, and by 1/2
hour interval of the start time on the left (the data set as well is
restricted to half hour intervals). This part works great!

For certain reasons, I need to subtract the hours worked within one
work type from the hours worked within another work type. This is where
I'm running into problems with a calculated item. For certain half hour
intervals, this works. However, for others, I'm getting wrong #'s, and
I can't even determine how Excel is calculating this. I think that it
has something to do with my formula above, as I am able to introduce
another column in my data set with a list of integers, and the
calculated item works great.

Any ideas? I'd be happy to share my file (or a screenshot), if that
would be helpful.

Thanks!

Michael Cumming
,

  #2   Report Post  
Roger Govier
 
Posts: n/a
Default

Hi Michael

If you are getting lots of "####'s" it sounds as though the time calculation
result is negative. Excel doesn't like negative time, unless you are using
the 1904 date system (which can bring with it other complications).

Maybe the calculation where you are subtracting one time from another needs
modifying. Try instead
=MOD((A1-B1),1)
where A1 and B1 hold your times, and see if that resolves the problem.

Regards

Roger Govier


wrote:
I'm new to working with calculated items in PivotTables, and I've run
into a bit of a snag.

My PivotTable is built off of a data set with a start and stop time (in
military time) for a number of workers. Included in the data set as
well is a worktype. I have a calculated field in my Pivot which returns
the # of hours worked by way of the following formula:

(EndTime-StartTime)*24

I have this data displayed by work type and date on the top, and by 1/2
hour interval of the start time on the left (the data set as well is
restricted to half hour intervals). This part works great!

For certain reasons, I need to subtract the hours worked within one
work type from the hours worked within another work type. This is where
I'm running into problems with a calculated item. For certain half hour
intervals, this works. However, for others, I'm getting wrong #'s, and
I can't even determine how Excel is calculating this. I think that it
has something to do with my formula above, as I am able to introduce
another column in my data set with a list of integers, and the
calculated item works great.

Any ideas? I'd be happy to share my file (or a screenshot), if that
would be helpful.

Thanks!

Michael Cumming
,

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calculated Fields showing error results Pasko1 Excel Discussion (Misc queries) 1 August 12th 05 06:32 PM
PivotTable - calculated items? Peter Aitken Excel Discussion (Misc queries) 1 July 4th 05 05:50 PM
Need to sum up numerous columns in different worksheet into 1 devil135 New Users to Excel 3 May 26th 05 03:32 PM
Calculated Item Sunryzz Excel Worksheet Functions 0 May 4th 05 12:31 AM
PivotTable toolbar, Formulas, Calculated Item Jacob Excel Discussion (Misc queries) 1 March 19th 05 01:15 PM


All times are GMT +1. The time now is 08:35 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"