Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
JimSales81
Helper I
Helper I

Rank Based on Measure

I'm putting together a stack rank for my sales dept.  


I have 10 measures, things like:

1.) Total Sales

2.) New Customers

3.) % to Quota

4.) % of Total Sales is our Newest Product

Etc.

 

I now want to rank each measure 1st to last and total the Rank for each Measure.  The person with the lowest combined score will be ranked first.  How can i do it? Can i make it dynamic?  I.e. use the same Rank Measure to rank the Area Directors, the Regional Directors, and the Territory Sales People ?  

 

Thank you!

1 ACCEPTED SOLUTION
mark_endicott
Super User
Super User

@JimSales81 

 

You can use RANK to do this, and it is fully dynamic an example of this would be below:

 

RANK(DENSE, ALLSELECTED( **** ) , ORDERBY( **** ,ASC), LAST, PARTITIONBY( **** ))

 

Inside the ALLSELECTED, you must put any columns you would like to Rank by, if you are ranking people then this column must go here - and any other column you intend to use in your visual. 

 

Inside the ORDERBY is the measure you wish to rank. 

 

PARTITIONBY is optional, and gives you the freedom to reset the rank at certain points, for example you wanted a rank within each Area Director. If you do not need to break your rank at certain parts, simply remove:

 

, PARTITIONBY( **** )

If this works for you, please mark it as the solution. 

View solution in original post

1 REPLY 1
mark_endicott
Super User
Super User

@JimSales81 

 

You can use RANK to do this, and it is fully dynamic an example of this would be below:

 

RANK(DENSE, ALLSELECTED( **** ) , ORDERBY( **** ,ASC), LAST, PARTITIONBY( **** ))

 

Inside the ALLSELECTED, you must put any columns you would like to Rank by, if you are ranking people then this column must go here - and any other column you intend to use in your visual. 

 

Inside the ORDERBY is the measure you wish to rank. 

 

PARTITIONBY is optional, and gives you the freedom to reset the rank at certain points, for example you wanted a rank within each Area Director. If you do not need to break your rank at certain parts, simply remove:

 

, PARTITIONBY( **** )

If this works for you, please mark it as the solution. 

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.