Reputation: 196589
i have a pivot table with:
and count of Application data
i want to have a column that displays the Region with the highest count for each Team.
So if my table looks like this:
Team | US | Europe | Asia
Team A 3 2 1
Team B 1 2 3
Team C 1 1 3
Team D 1 2 3
for Team A it would return US. For Team D it would return Asia is this possible?
Upvotes: 0
Views: 6560
Reputation: 59475
There is no need to copy the PT to a 'regular' table:
=INDEX($C$3:EG$3,,MATCH(MAX(C4:E4),C4:E4,0))
in H4 in the example and copied down to suit may to serve.
However, this does only pick the first instance of a maximum value that is repeated within a row (example adapted to show this) whereas Conditional Formatting does not have this possible drawback when applied to =C4:E7 with a rule such as:
=C4=MAX($C4:$E4)
Upvotes: 0
Reputation: 18440
Two ideas:
EDIT:
If you copy the pivot table to a normal sheet, you could use the index
twice to get what you want. Assuming your example data resides in A1:D5, you could put in E2 for instance
=INDEX(B$1:D$1,INDEX(B2:D2,MAX(B2:D2)))
If you have a row with two maximum values, the first max column will be returned.
Google refine appears to be a free tool very well suited for this kind of data manipulation.
Upvotes: 1