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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
sonny
Regular Visitor

Ranking a value based on columns from different tables

Hi,

 

I am a new user to Power BI Desktop and wondered how I rank a 'Total' value that I have in table1, which is ranked by a 'Job Title' column which is in table2? There is a relationship between the 2 tables which is based on an employee number column.

 

Would I build he measure/column in table 1 or am I better off creating this in a new clean table3?

 

Thanks

Sonny

1 ACCEPTED SOLUTION
v-qiuyu-msft
Community Support
Community Support

Hi @sonny,

 

According to your description, I create some sample data and create a calculated column in Table 1 use Rankx() function to rank the Total values based on Job Title. See:

 

Rank = RANKX(Table1,RIGHT( RELATED(Table2[Job Title]),1))

 

z1.PNGz2.PNGz3.PNG

 

If above DAX doesn't meet your requirement, please share same sample data and expected results for our analysis.

 

Best Regards,
Qiuyun Yu

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-qiuyu-msft
Community Support
Community Support

Hi @sonny,

 

According to your description, I create some sample data and create a calculated column in Table 1 use Rankx() function to rank the Total values based on Job Title. See:

 

Rank = RANKX(Table1,RIGHT( RELATED(Table2[Job Title]),1))

 

z1.PNGz2.PNGz3.PNG

 

If above DAX doesn't meet your requirement, please share same sample data and expected results for our analysis.

 

Best Regards,
Qiuyun Yu

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thats great, thanks Qiuyan.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

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.

Top Solution Authors