How to get the column label in a pivot ?

chesini

New Member
Joined
Feb 20, 2016
Messages
3
Hello,

I have a pivot table with column labels YearMonth values (eg 202101, 202102) and row labels CustomerNames. The values in the table are the sales amounts.

To get the maximum value of the monthly sales I add a calculated item MaxSales as an additional column with formula =MAX('202101','202102','202103'). That works perfect and for each CustomerName row I get the MaxSales figure.

Now I try to add another additional column that contains the YearMonth of the MaxSales, in other words that contains the column label value of the month in which the MaxSales is realized.

However, I do not succeed. Is it technically possible or is this a limit of pivot tables ? As Excel knows to find the MaxSales it should know where it found it and should be able to look up and return the associated YearMonth. Does anyone knows the trick to solve this ?

Many thanks.
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at: How to get the column label in a pivot ?
If you have posted the question at more places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
 
Upvote 0

Forum statistics

Threads
1,214,935
Messages
6,122,337
Members
449,077
Latest member
Jocksteriom

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