Pivot Table Not Displaying Negative Time Values

fadetograham

New Member
Joined
Jul 6, 2015
Messages
39
Hi everyone

I have a pivot that needs to show a planned journey time, actual journey time and then the variance. The problem I have is that the calculated field in the pivot won't display the negative values in the variance where the journey took less time than planned. It just displays #######, which invalidates the subtotals too.

Outside of the pivot table I can get the figures I need by using the below formula where E4 is actual time and D4 is planned time. When I adjust it for use in a calculated field (swapping e4 for 'actual' etc) it doesn't work. =IF(e4-d4<0, "-"&text(abs(e4-d4),"h:mm"), e4-d4)

Is there an adjustment to the basic =actual-planned formula in the calculated field which will get it to show the correct figure?

Thanks in advance for any help you can give.
Graham
 
I changed the cell format for the both columns in the data, updated the pivot and it is now showing all variances but they are showing as all positive.

How do get the negative values to show as such and the subtotals to account for them?
 
Upvote 0

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
You can probably format the displayed values using Conditional Formatting - as long as you have the two individual fields in the pivot too. The subtotals should be OK as they don't add up the values in between, they use exactly the same calculation.
 
Upvote 0
Brill, it's not exactly how I envisaged it would be at the start but have got what I need in terms of numbers displaying and totals adding up in the pivot so I'm happy.

Thanks again for all your help.
 
Upvote 0

Forum statistics

Threads
1,215,353
Messages
6,124,458
Members
449,161
Latest member
NHOJ

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top