Showing results for 
Search instead for 
Did you mean: 
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

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)

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

Helpful resources

PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Teds Dev Camp Oct. 2021 768x460.jpg

Power BI Dev Camp - October 28th, 2021

Mark your calendars and join us for our next Power BI Dev Camp!