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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

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
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.