How to display only top 10 per group? Excel PivotTable

claytont454

New Member
Joined
Feb 28, 2013
Messages
8
I have a long PivotTable for a group of doctors with the codes they use for all their patients, and how many times they used each code.
I only want to show (up to) 10 code + qty lines for each doctor. I have about 300 doctors; some have just a few codes, others have hundreds. All of the "Top 10" Sort or Filter things I have found so far either show the most-often used codes between *all* the doctors, or the top 10 doctors with the most codes overall. This is a sample:
(this last column is what I want to show the top 10 lines per each doctor)
[TABLE="width: 466"]
<colgroup><col><col><col></colgroup><tbody>[TR]
[TD]Physician name[/TD]
[TD]Code[/TD]
[TD]Number of times used[/TD]
[/TR]
[TR]
[TD]Smith, John (only 4)[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]401.9[/TD]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]787.91[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]272.4[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]305.1[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD]Aberger, Cheese (only 2)[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]V58.83[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]285.9[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD]Baker, Tammy (has 195)[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]401.9[/TD]
[TD="align: right"]140[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]272.4[/TD]
[TD="align: right"]122[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]250[/TD]
[TD="align: right"]59[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]272.2[/TD]
[TD="align: right"]41[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]244.9[/TD]
[TD="align: right"]41[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]V58.61[/TD]
[TD="align: right"]38[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]427.31[/TD]
[TD="align: right"]33[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]305.1[/TD]
[TD="align: right"]29[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]lots more...[/TD]
[TD="align: right"]...[/TD]
[/TR]
[TR]
[TD]Bird, Song (has 133)[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]V27.0[/TD]
[TD="align: right"]30[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]650[/TD]
[TD="align: right"]20[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]626.2[/TD]
[TD="align: right"]18[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]625.6[/TD]
[TD="align: right"]18[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]648.83[/TD]
[TD="align: right"]18[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]V74.5[/TD]
[TD="align: right"]17[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]625.9[/TD]
[TD="align: right"]15[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]V77.91[/TD]
[TD="align: right"]15[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]625.3[/TD]
[TD="align: right"]15[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]lots more...[/TD]
[TD="align: right"]...[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

Thanks in advance for ideas!
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
I did find that, but it only seems to sort the *entire* pivottable area, giving me the top 10 providers or adds all the top codes together and presents the top 10 of those totals.
I'm trying to get a result that shows each provider, and then their top 10. Thanks, CT
 
Upvote 0
I have a long PivotTable for a group of doctors with the codes they use for all their patients, and how many times they used each code.
I only want to show (up to) 10 code + qty lines for each doctor. I have about 300 doctors; some have just a few codes, others have hundreds. All of the "Top 10" Sort or Filter things I have found so far either show the most-often used codes between *all* the doctors, or the top 10 doctors with the most codes overall. This is a sample:
(this last column is what I want to show the top 10 lines per each doctor)
[TABLE="width: 466"]
<tbody>[TR]
[TD]Physician name[/TD]
[TD]Code[/TD]
[TD]Number of times used[/TD]
[/TR]
[TR]
[TD]Smith, John (only 4)[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]401.9[/TD]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]787.91[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]272.4[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]305.1[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD]Aberger, Cheese (only 2)[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]V58.83[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]285.9[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD]Baker, Tammy (has 195)[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]401.9[/TD]
[TD="align: right"]140[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]272.4[/TD]
[TD="align: right"]122[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]250[/TD]
[TD="align: right"]59[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]272.2[/TD]
[TD="align: right"]41[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]244.9[/TD]
[TD="align: right"]41[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]V58.61[/TD]
[TD="align: right"]38[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]427.31[/TD]
[TD="align: right"]33[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]305.1[/TD]
[TD="align: right"]29[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]lots more...[/TD]
[TD="align: right"]...[/TD]
[/TR]
[TR]
[TD]Bird, Song (has 133)[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]V27.0[/TD]
[TD="align: right"]30[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]650[/TD]
[TD="align: right"]20[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]626.2[/TD]
[TD="align: right"]18[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]625.6[/TD]
[TD="align: right"]18[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]648.83[/TD]
[TD="align: right"]18[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]V74.5[/TD]
[TD="align: right"]17[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]625.9[/TD]
[TD="align: right"]15[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]V77.91[/TD]
[TD="align: right"]15[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]625.3[/TD]
[TD="align: right"]15[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]lots more...[/TD]
[TD="align: right"]...[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

Thanks in advance for ideas!

DID you ever figure this out I am trying to solve a similar problem and for the life of me cannot. I need the bottom three numbers from each category, I have close to 1000 categories and more them 15000 entries.
 
Upvote 0
DID you ever figure this out I am trying to solve a similar problem and for the life of me cannot. I need the bottom three numbers from each category, I have close to 1000 categories and more them 15000 entries.

Hi Mushmon, I did not. I eventually went to an SQL expert and had them write a report for me. -Clay
 
Upvote 0

Forum statistics

Threads
1,223,908
Messages
6,175,304
Members
452,633
Latest member
DougMo

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