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 !! Connect on Linkedin
Want To Learn Power BI
Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!

Helpful resources

2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Power BI December 2021 Update_carousel 768x460.jpg

Check it Out!

Click here to read more about the December 2021 Updates!

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Jan 2022 Dev Camp 768x460 copy.png

Power BI Dev Camp- January 27th, 2022

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

Top Solution Authors