Excel - Time Difference in Pivot
Excel - Time Difference in Pivot
Author
Discussion

The_Burg

Original Poster:

4,853 posts

245 months

Tuesday 26th February 2019
quotequote all
Hi i'm trying to create a calculated field in a pivot table in Office 365

I have a planned start date and an actual start date. In the spreadsheet i can subtract one from the other and get a time difference once formatted in hours and minutes.

Actual Start Plan Start
26/02/19 09:57 26/02/19 09:08 =G2-F2 works perfectly.

I need this to work as a calculated field. I just can't see why it won't work. Am i being really thick?



Prinny

1,669 posts

130 months

Tuesday 26th February 2019
quotequote all
Not got all your spreadsheet to go off, but if it’s working on the sheet, why not just incorporate that column into the pivot table? Saves faffing within the pivot itself.

The_Burg

Original Poster:

4,853 posts

245 months

Thursday 28th February 2019
quotequote all
Prinny said:
Not got all your spreadsheet to go off, but if it’s working on the sheet, why not just incorporate that column into the pivot table? Saves faffing within the pivot itself.
The full sheet contains a macro that collects data from a report. Then pivots it off. Doing it manually slightly defeats the object. As a calculated field it would refresh with no intervention.

weeboot

1,065 posts

130 months

paulrockliffe

16,665 posts

258 months

Friday 1st March 2019
quotequote all
It's worth pointing out that if you're creating your Pivot using the Excel Data Model, you'll need to use MDX to create that column in the Pivot due to the way Data Model works. Not sure if you're using Power Pivot how that interacts with Data Model, it may be possible the hang a Pivot off Data Model rather than the usual Pivot cache without realising it.