Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have created a pivot table for the following data in excel:

enter image description here

But as you can see, the grand total is not being calculated correctly. What should I do to fix it? My second question is, how could I drop the duration column and use a formula in pivot table for that?

share|improve this question

migrated from Oct 11 '12 at 14:38

This question came from our site for professional and enthusiast programmers.

It seems one should not really ask two separate questions in a single post. One queries time formats (extensively covered on Superuser (where queries of the nature of your post seems to belong) and the other deals with calculated fields in pivot tables (for which there are also many examples on SU). – pnuts Oct 11 '12 at 12:21
up vote 1 down vote accepted

I would guess you just need to format that cell (H5) as a time that can exceed 24 hours: so you just need square brackets around the h in your custom formatting string.

For your second question, you need a calculated field. In 2010, click on the pivot table, go to the options tab in the ribbon, in the calculations group choose Fiels, Items & Set and then choose calculated field. I guess then you just need End Time - Start Time

share|improve this answer

Use formatting as [h]:mm to the time field (Sum of Duration).

It worked for me, could for you as well.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.