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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
luiswellington
Regular Visitor

Power BI Ranking by different columns in different tables

Hello All, I would be very grateful if you help me with a challenge. I want to do a raking that takes into account four columns, however, three tables involved. Imagine that I want to have a table where the fields are (Emplyee_Name, Product_Category, Calendar year, Calendar month, [Total_Sales]]). In this table I want a Ranking by [Total_Sales] DESC. But, it needs to respect Date Filters on the page. I've been racking my brains over this for a week now and there is no material anywhere on the internet that teaches this. Can you help me with this, please ?
DAXRank.png

2 REPLIES 2
amitchandak
Super User
Super User

@luiswellington , Power BI Meausre rank (Rankx) work on based on column in visual

 

so in this case, you need, assuming total sales is a column

 

rankx(filter(allselected(Sales), calendar[Year], calendar[Month],employee[Emplyee_Name]) , calculate(Sum(Sales[Total Sales])) ,,desc,dense)

 

Measure Rank: https://www.youtube.com/watch?v=DZb_6j6WuZ0&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=40
https://www.youtube.com/watch?v=cN8AO3_vmlY&t=25627s

 

New DAX Function: RANK - How It Differs from RANKX: https://youtu.be/TjGkF44VtDo

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

Thanks for your attention @amitchandak , but, this formula doesn't work. The video shows columns in the same table and it is not my case.
RankFail.png

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

Top Solution Authors
Top Kudoed Authors