Ranking With a Slicer

Tucker62

New Member
Joined
Nov 14, 2013
Messages
15
Hi,

I have a pivot table that lists 67 stores by their Region and State and respective sales for each store. I am using slicers to filter the data by Region and State. I also have a formula within the table that ranks the stores by their sales. So, when all slicers are unfiltered the results give me the stores ranked on a national level from 1 to 67. However, when using the slicer to filter on a specific state, the ranking formula re-ranks the stores within the state and does not retain their nationally ranked number. How can I retain the stores national ranking when using the slicer?

Thanks,
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
The Slicer I believe will always slice/filter the data before it reaches the Pivot Table.
You can apply an Auto Filter.
However, the ranking may be better to be calculated in the source table instead.

Check out a Dueling Excel episode https://www.youtube.com/watch?v=QkOwkbdaruQ
 
Upvote 0
Is your desired output the regionally filtered rankings that have a column with the national ranking as well? The logical steps seem to be:
1. Generate the national rankings
2. Generate the filtered rankings (should be changed dynamically)
3. Join the national ranking column with the new filtered rankings - joined by store name/id presumably

In excel, you could probably do this with some combination of formulas using VLOOKUP. However, if this is a professional use case, check out Parabola (https://parabola.io/) - it would only take a couple minutes to set up those steps, and then it's automated going forward.
 
Upvote 0
Thanks for the reply, but I'm still uncertain. As you see below, the Area ranking column ranks each District within it's respective Area based on the Top2 % column, which is one ranking I need, but I can't get the National ranking column to ranking each District on a National level from 1-67 based on the Top2 % column.

AreaDistrictArea Ranking National RankingTop2 % RankingTotal Surveys% of Total Surveys Received
CAPITAL METROGREATER SOUTH CAROLINA11100.00%581.09%
NORTHERN VIRGINIA2297.44%390.73%
MID-CAROLINAS3395.12%410.77%
CAPITAL4493.88%490.92%
BALTIMORE5592.77%831.56%
GREENSBORO6692.73%551.03%
ATLANTA7792.59%811.52%
RICHMOND8891.30%691.30%
EASTERNCENTRAL PENNSYLVANIA1198.52%2705.07%
SOUTH JERSEY2295.87%1212.27%
TENNESSEE3395.62%1372.57%
APPALACHIAN4494.29%701.31%
<colgroup><col width="37" style="width: 28pt; mso-width-source: userset; mso-width-alt: 1184;"> <col width="175" style="width: 131pt; mso-width-source: userset; mso-width-alt: 5600;"> <col width="175" style="width: 131pt; mso-width-source: userset; mso-width-alt: 5600;"> <col width="83" style="width: 62pt; mso-width-source: userset; mso-width-alt: 2656;"> <col width="106" style="width: 80pt; mso-width-source: userset; mso-width-alt: 3392;"> <col width="96" style="width: 72pt; mso-width-source: userset; mso-width-alt: 3072;"> <col width="84" style="width: 63pt; mso-width-source: userset; mso-width-alt: 2688;"> <col width="111" style="width: 83pt; mso-width-source: userset; mso-width-alt: 3552;"> <tbody> </tbody>
 
Upvote 0
Add a new Field to your Source Data for "Nation"
Add that field to your Pivot Table as the lowest Label item.
Right Click on a "National Ranking" Item and set the Parent Item to the new "Nation" field.
 
Upvote 0
I added a column to my source data for Nation, but what populates that column of data? Thanks for your patience

CCC:NationAreaDistrictSite
723580095 WESTERNCOLO./WYOMINGDENVER
581000417 PACIFICSIERRA COASTALVAN NUYS
3066450567 WESTERNCENTRAL PLAINSOMAHA
4371400951 NORTHEASTCONNECTICUT VALLEYPROVIDENCE
1187450624 SOUTHERNSOUTH FLORIDASTUART
502940816 PACIFICSIERRA COASTALARCADIA
<colgroup><col width="94" style="width: 71pt; mso-width-source: userset; mso-width-alt: 3008;" span="2"> <col width="100" style="width: 75pt; mso-width-source: userset; mso-width-alt: 3200;"> <col width="218" style="width: 164pt; mso-width-source: userset; mso-width-alt: 6976;"> <col width="199" style="width: 149pt; mso-width-source: userset; mso-width-alt: 6368;"> <tbody> </tbody>
 
Upvote 0
I tried that also using Nationally...and here were the results

CCC:NationalAreaDistrictSite
723580095NationallyWESTERNCOLO./WYOMINGDENVER
581000417NationallyPACIFICSIERRA COASTALVAN NUYS
3066450567NationallyWESTERNCENTRAL PLAINSOMAHA
4371400951NationallyNORTHEASTCONNECTICUT VALLEYPROVIDENCE
<colgroup><col width="94" style="width: 71pt; mso-width-source: userset; mso-width-alt: 3008;" span="2"> <col width="100" style="width: 75pt; mso-width-source: userset; mso-width-alt: 3200;"> <col width="218" style="width: 164pt; mso-width-source: userset; mso-width-alt: 6976;"> <col width="199" style="width: 149pt; mso-width-source: userset; mso-width-alt: 6368;"> <tbody> </tbody>

AreaDistrictNationalArea Ranking National RankingTop2 % RankingTotal Surveys
CAPITAL METROGREATER SOUTH CAROLINANationally11100.00%58
NORTHERN VIRGINIANationally2197.44%39
MID-CAROLINASNationally3195.12%41
CAPITALNationally4193.88%49
BALTIMORENationally5192.77%83
GREENSBORONationally6192.73%55
ATLANTANationally7192.59%81
RICHMONDNationally8191.30%69
EASTERNCENTRAL PENNSYLVANIANationally1198.52%270
SOUTH JERSEYNationally2195.87%121
TENNESSEENationally3195.62%137
APPALACHIANNationally4194.29%70
PHILADELPHIA METRONationally5193.98%83
OHIO VALLEYNationally6192.81%167
NORTHERN OHIONationally7192.03%138
WESTERN PENNSYLVANIANationally8191.89%185
WESTERN NEW YORKNationally9190.72%97
KENTUCKIANANationally10188.04%92
<colgroup><col width="37" style="width: 28pt; mso-width-source: userset; mso-width-alt: 1184;"> <col width="175" style="width: 131pt; mso-width-source: userset; mso-width-alt: 5600;"> <col width="175" style="width: 131pt; mso-width-source: userset; mso-width-alt: 5600;"> <col width="69" style="width: 52pt; mso-width-source: userset; mso-width-alt: 2208;"> <col width="83" style="width: 62pt; mso-width-source: userset; mso-width-alt: 2656;"> <col width="106" style="width: 80pt; mso-width-source: userset; mso-width-alt: 3392;"> <col width="96" style="width: 72pt; mso-width-source: userset; mso-width-alt: 3072;"> <col width="84" style="width: 63pt; mso-width-source: userset; mso-width-alt: 2688;"> <tbody> </tbody>
 
Upvote 0
Add a new Field to your Source Data for "Nation"
Add that field to your Pivot Table as the lowest Label item.
Right Click on a "National Ranking" Item and set the Parent Item to the new "Nation" field.

I swear. I thought I had it right one way but....
Try Right Click on a "National Ranking" Item and set the Parent Item to the new "Area" field.

You can retain the National ranking when the Advanced Filter is applied to the Table, but not the Slicer.
 
Upvote 0

Forum statistics

Threads
1,215,394
Messages
6,124,683
Members
449,180
Latest member
kfhw720

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