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 September 15. Request your voucher.

Reply
paguy215
Helper III
Helper III

RANKX Issues, been trying everything

I've had a series of issues using RANKX...after many issues I just built a new table.   Now I'm running into the following:

 

The table contains Date, Store Name, Region, Agent ID, Agent Name, and Revenue.  I am trying to rank the agents by the sum of their revenue in a date range selected by a filter

 

I'm using this formula

 

RANKX(ALLSELECTED('Revenue'[AgentID]),CALCULATE(sum('Revenue '[RevenueSum])),,,Skip)
 
This ranks the ID in correct order, but when I add other idenfitying columns to the visual such as store or name they all become ranked as 1
 
I also tried creating a seperate table with unique AgentID and doing it that way, ranking the whole table, also returns everything as 1
 
RANKX(ALLSELECTED('AgentTable'),CALCULATE(sum('Revenue '[RevenueSum])),,,Skip)
 
Any help is appreciated
1 REPLY 1
Fowmy
Super User
Super User

@paguy215 

Do you have relationship between AgentTable and Revenue table? create the relationship if it's not there. You should be able to add all the fileds if necessary, it will work 

Rank = RANKX(ALLSELECTED('AgentTable'),CALCULATE(sum('Revenue '[RevenueSum])),,,Skip)

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.