Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Creating Dense_Rank() Partition in Power BI with Numbered Rankings

Hi

I want to create measure in power BI which would allow me to rank() the number of times ID would appear in  table by that ID created date. I would like the ID to be ranked in desc order. 

 

For example 

 

 

PowerBI dense_rank().PNG

 if I was to produce this in SQL then the code I would use is.. 

DENSE_RANK() over(partition by [OwnerID],order by [CreatedDate]) END AS RankJob

 

Appreciate the responses.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Thanks for the responses.

 

I have figured out the solution to the issue. Solution was found here in the following link.

 

https://community.powerbi.com/t5/Desktop/Rank-based-on-date-for-each-individual-user/td-p/411053

View solution in original post

4 REPLIES 4
V-pazhen-msft
Community Support
Community Support

@Anonymous 

So you want to rank the date by ID:

measure = RANKX(ALLEXCEPT('Table','Table'[ID]),CALCULATE(SUM('Table'[Date])),,ASC,Dense)

Paul Zheng
Don't forget to hit THUMBS UP and mark it as a solution if it helps you!

Anonymous
Not applicable

Thanks for the responses.

 

I have figured out the solution to the issue. Solution was found here in the following link.

 

https://community.powerbi.com/t5/Desktop/Rank-based-on-date-for-each-individual-user/td-p/411053

Anonymous
Not applicable

J

amitchandak
Super User
Super User

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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