• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Pivot table calculation - % of different field subtotal

P0lar

Member
I have been handed an excel sheet to fix which includes a pivot table:

Location Time spent Time paid
--Site A 1000 2000
----Lunch 100 150
----Break 200 150
----Work 700 1700

--Site B
----etc.

I need to add in a column which calculates time spent / site total time paid, for example Lunch in the above would be 100 / 2000, Break would be 200 / 2000 etc. The number of sites and the work types in each can vary and changes if the table data is refreshed. I've used "show values as..." but this only seems to get me a percentage of the parent total in the same field. Ideally I'd like to avoid VB if possible.
 
Add a calculated field with a manual value of 2000 e.g. formula will be something like =LUNCH/2000. sample file attached
 

Attachments

  • SAMPLE.xlsx
    13.9 KB · Views: 3
Thanks Chirayu,

Unfortunately the total isn;t always going to be 2000, I need it to recalculate as the total paid time in each site changes, or the number of rows of data I'm pivoting change.

If I could add a calculated field of [LUNCH; WORKED] / sum[SITE; PAID] that would work.
 
I think I've solved it using a couple of helper calcs, not sure if it can be done in the pivot table directly - here's what I've got to
 

Attachments

  • SAMPLE.xlsx
    18.9 KB · Views: 3
Oh so that's what you wanted. In that case just do a simple formula table. Sample file attached. I've made 2 different types of table so use whichever you like for your actual file.
 

Attachments

  • SAMPLE.xlsx
    11.5 KB · Views: 1
Back
Top