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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 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.