RankX and filter/ row context

brianhadley

New Member
Joined
May 3, 2013
Messages
1
I am wanting to use RankX to rank people by sales performance in two ways: 1. performance against others on their supervisor 'team', and 2. performance against the entire group, regardless of supervsor team.

Currently I have the following measure defined, which I thought would accomplish #2 when I sliced or filtered by supervisor, but instead behaves as described in #1:

=rankx(all(sales[Agent]),[Sum of HIS Sales])


(HIS in 'HIS Sales' is just an acronym). What argument to table parameter in rankx will get the formula to evaluate for all agents in the dataset, regardless of filter context.
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Brian,

To get the RANKX to work for everything regardless of filter context you should use:

Code:
=RANKX(ALL(Sales),[Sum of HIS Sales])

Its pretty important to understand why your original formula acted like it did - where you have a natural hierarchy like Employee>Team when you open out the filter context on employee, the team filter context remains.
<team, when="" you="" open="" out="" the="" filter="" context="" for="" employee,="" team="" remains.

Depending on your final goal, you might also find the way ALLSELECTED() behaves interesting.</team,>
 
Upvote 0

Forum statistics

Threads
1,223,948
Messages
6,175,575
Members
452,652
Latest member
eduedu

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