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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
kk_shp_user
Helper I
Helper I

Computing Rank using 2 measures

I have a data model in which I have created two measures, 
m_personal_recruits -> tells how many recruits have been hired by a manager

m_personal_recruit_qv -> tells how much sales the new recruits have done

I use measures for these metrics because they need to be dynamic for the chosen date/ month range.

 

How can I add a rank measure so I can filter the rank on the visual. Say - top 20, 25, etc. The ranking has to be on m_personal_recruits & m_personal_recruits_qv combined because, managers can have the same number of recruits.

 

I can find exmaples where multiple calculated columns are used for ranking but not where multiples measures are used,

2 REPLIES 2
johnt75
Super User
Super User

The RANK function allows you to specify multiple items to sort on, so you could create a measure like

Rank =
VAR BaseTable =
    ADDCOLUMNS (
        ALLSELECTED ( 'Table'[Manager] ),
        "@PersonalRecruits", [m_personal_recruits],
        "@QV", [m_personal_recruits_qv]
    )
VAR Result =
    RANK ( BaseTable, ORDERBY ( [@PersonalRecruits], DESC, [@QV], DESC ) )
RETURN
    Result
Elena_Kalina
Solution Specialist
Solution Specialist

Hi @kk_shp_user 

Perhaps this video will help you

https://www.youtube.com/watch?v=vvceE7WRcqU

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.