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
vensali
New Member

Ranking a dimension table with data of multiple hospitals using measure

Hi 

 

I have a  Speciality dimension table with specialities of multiple hospitals. I also have fact table with outpatient count from multiple hospitals. I need to rank  the speciality hospitalwise base on the respective hospital outpatient counts using measure

 

I request specialist's help to resolve the said issue.

 

Regads

Venkat

3 REPLIES 3
Anonymous
Not applicable

You can try something like 
Hospital Rank =
RANKX( ALL('Speciality dimension table', SUM( 'fact table'[outpatient count]))

amitchandak
Super User
Super User

@vensali , Try a measure like

Rankx(filter(summarize(allselected(Fact), fact[hospital],[Speciality]), [hospital] =max([hospital])), [outpatient counts measure],,desc,dense)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
tamerj1
Super User
Super User

Hi @vensali 
Please send sample data with a screenshot of the data model relationships if any.

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.