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
liztruong
Frequent Visitor

Rank values based on the slicers from another table

Hi everyone, I need your help!!!

 

I have 2 tables: Sales and Services. Now I want to rank SumSales per Products by selecting the Services. The table needs to have 4 columns: Rank, Products, Services, SumSales. I did make a measure like this:

 

rank = RANKS(CROSSJOIN (ALL(Sales[Products]), ALLSELECTED(Services[Name]), [SumSales], , DESC)

 

But it doesn't work. Anyone can help me? Thank you much

1 REPLY 1
amitchandak
Super User
Super User

@liztruong , If they are joined with each other

 

Try like

rank = RANKX(Summarize(ALL(Sales),Sales[Product],Services[Name]), [SumSales], , DESC)

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

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.