cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sandeepraichura
Regular Visitor

RANKING in Power BI Desktop !!

I want to Rank the Accounts by their Revenue and I don't see the RANKX function in Power BI Desktop.  Is there an alternative to this ?  One Customer has multiple accounts and I want to rank all the accounts by their Revenue, and when I switch the filter to another Customer, It should list the accounts and their ranking by their revenue.  Is this possible in Power BI Desktop ?

 

Read about the RANKX function but it doesn't seem to work on Power BI Desktop, Please help

 

 

5 REPLIES 5
austinsense Impactful Individual
Impactful Individual

Re: RANKING in Power BI Desktop !!

Do you 1) not see the function or 2) is it not working correctly - if #2, please provide your DAX

Austin is VP Operations at PowerPivotPro and a professional self-service enthusiast 🙂
Twan Advocate IV
Advocate IV

Re: RANKING in Power BI Desktop !!

The RANX function works in Power BI desktop.  If you provide the formula you came up with along with the table and columns names from your model that would be part of the ranking formula then people will be able to help more.

 

Your RANX filter should look something like this based on the information your provided (I don't know what your table name is so I just used Table1 in the example):

=RANKX(FILTER('Table1', 'Table1'[Customer] = EARLIER([Customer])), [Revenue], ,0)
sandeepraichura
Regular Visitor

Re: RANKING in Power BI Desktop !!

sure, I'm using a direct query to create a connection from Power BI Desktop to SQL Server.  When I click on New Measure and enter RANKX, it doesn't work.  For some reason, RANKX is not recognized.  Am i doing anything wrong ?

 

here's the picture of a list of accounts and their revenue in excel, I want to create a ranking by revenue for each account.  I want to add a slicer named Account Manager, so when I click on Acocunt Manager it should only list the accounts that he is responsible sorted by the revenue.

 

 

sandeepraichura
Regular Visitor

Re: RANKING in Power BI Desktop !!

 

Untitled picture.png

 

sandeepraichura
Regular Visitor

Re: RANKING in Power BI Desktop !!

RANKX seem to be working now !  Since I'm using the Direct Query mode, I had to update the settings as listed here.

 

https://powerbi.microsoft.com/en-us/documentation/powerbi-desktop-use-directquery/

 

Thanks All for your help !

Helpful resources

Announcements
New Ranks Launched March 24th!

New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

‘Better Together’ Contest Finalists Announced!

‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Arun 'Triple A' Event Video, Q&A, and Slides

Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

Top Solution Authors
Top Kudoed Authors