Ranking for PowerPivot

liybpg

New Member
Joined
Mar 17, 2015
Messages
16
Hi I am new to PowerPivot, so just trying to get my head around few things. What I am trying to do is to create a ranking Measure which I can put in a pivot table and it would calculate a rank within that category. My dataset looks like that:


<tbody>
[TD="align: center"]Company
[/TD]
[TD="align: center"]Category
[/TD]
[TD="align: center"]Revenue
[/TD]

[TD="align: center"]Target
[/TD]
[TD="align: center"]1
[/TD]
[TD="align: center"]100
[/TD]

[TD="align: center"]Target
[/TD]
[TD="align: center"]2
[/TD]
[TD="align: center"]230
[/TD]

[TD="align: center"]A
[/TD]
[TD="align: center"]1
[/TD]
[TD="align: center"]100
[/TD]

[TD="align: center"]B
[/TD]
[TD="align: center"]2
[/TD]
[TD="align: center"]123
[/TD]

[TD="align: center"]C
[/TD]
[TD="align: center"]1
[/TD]
[TD="align: center"]490
[/TD]

[TD="align: center"]Target
[/TD]
[TD="align: center"]2
[/TD]
[TD="align: center"]839
[/TD]

[TD="align: center"]Target
[/TD]
[TD="align: center"]3
[/TD]
[TD="align: center"]100
[/TD]

[TD="align: center"]C
[/TD]
[TD="align: center"]1
[/TD]
[TD="align: center"]230
[/TD]

[TD="align: center"]D
[/TD]
[TD="align: center"]3
[/TD]
[TD="align: center"]498
[/TD]

[TD="align: center"]D
[/TD]
[TD="align: center"]1
[/TD]
[TD="align: center"]587
[/TD]

</tbody>

So what I want to be able to do is to dynamically rank ‘Target’ company without needing to display all other companies (as I have hundreds). I imagine the pivot looking something like this:

<tbody>
[TD="align: center"]Category
[/TD]
[TD="align: center"]‘Target’ Revenue
[/TD]
[TD="align: center"]‘Target’ Rank
[/TD]

[TD="align: center"]1
[/TD]
[TD="align: center"]X
[/TD]
[TD="align: center"]2
[/TD]

[TD="align: center"]2
[/TD]
[TD="align: center"]Y
[/TD]
[TD="align: center"]3
[/TD]

[TD="align: center"]3
[/TD]
[TD="align: center"]Z
[/TD]
[TD="align: center"]7
[/TD]

</tbody>

Thank you!
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
The function you are looking for is RANKX. You can certainly do what you want... though, I do find this particular dax function to be trickier than expected, look for samples.
 
Upvote 0

Forum statistics

Threads
1,224,099
Messages
6,176,341
Members
452,722
Latest member
lexalux

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