Custom column in pivot table

Mandark

New Member
Joined
Mar 18, 2014
Messages
43
Hi,

I am using a pivot table to display data. In the pivot table I have countries and under each country couple of names. Then how many training a person led and how big attendance there was.

CompletedCancelled
Count of TitleSum of AttendanceCount of TitleSum of AttendanceLast Training Date
CZE
Karel1050101-10-2017
Peter554007-10-2017
Jean623504-10-2017
Fanda5142017-10-2017
DEU
Hanz2235017-10-2017
Franc552305-10-2017

<tbody>
</tbody>

I have two questions:

1) In the data source, I created additional column where is displayed the last training date (using max(if...)). That means in the source data for each person, there is always the same "Last training date". So I would like to take this info a put into the pivot table. But anywhere I put it, it's always used as another filter and it makes the table much more complex. I would like to have just a custom column with this info without having to expand the whole table.

2) Same applies for the attendance. If the training has been cancelled, the attendance is always 0. Is there a way to hide the whole column?
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
hello, Mandark

What about if the 'Last Training Date' field is the last row field of the pivot table? (The row fields are the ones on the left.)

So, row fields of Country, Name and then 'Last Training Date'. (May need to turn off any totals for the Name field.)

HTH. regards, Fazza
 
Upvote 0
Hello Fazza,

thank you for your answer. That is a great and working suggestion. However, now the date is displayed below the names and takes up another row and the user will have to expand it. If I had it the way I want (explained in the OP), it would be much cleaner.

Also I am not able to make the pivot table display just the date. The pivot table automatically inserts Years and Quarters and even if I remove those from the field list and leave just the date, the pivot table keeps displaying quarter.
 
Upvote 0
I'm not sure I really understand, why can't you just put the last training date in the data area in your pivot table exactly as in your example?

What does your example not have that you want?
 
Last edited:
Upvote 0
I'm not sure I really understand, why can't you just put the last training date in the data area in your pivot table exactly as in your example?

What does your example not have that you want?

If I put the field into Values, than all the columns will multiply to also contain "Count of latest date". If I put the field into Columns, then I will have milion more columns, one for each date that exists in the field data.

I would like to achieve the same thing I have in the example, but I do not know how.
 
Upvote 0
Put it into the values, change count to average and format as date. Since all the dates are the same, the average will be the actual value.
 
Last edited:
Upvote 0
Put it into the values, change count to average and format as date. Since all the dates are the same, the average will be the actual value.

That works great, but now I have it there three times. Once under Completed, once under Cancelled and once as Total. Is there a way to have it only once (one column)?
 
Upvote 0
Actually, if you can live with it at the beginning, put it into the Rows field and switch to "Classic PivotTable Layout" in PivotTable options. Then remove the Subtotal. I think that will give you what you want
 
Upvote 0

Forum statistics

Threads
1,215,325
Messages
6,124,254
Members
449,149
Latest member
mwdbActuary

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