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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Anonymous
Not applicable

DAX - Ranking Column by multiple text columns and date/time

Hi all,

I would need some help with a column ranking names in a table. 
The problem is that the customers can change the ResourceName but the ResourceID will stay the same.
I need to rank the ResourceName-s, grouped by the ResourceID-s, and the freshest/newest to have the Rank number 1 for every ResourceID group.
Any help would be much appreciated.
See the example data and an added expected Rank result column in it.
exmpl.PNG

 

 

 

 

 

 

 

 

ExampleFileCanBeDownloadedHere 

Many thanks,
Roland

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Picture1.png

 

https://www.dropbox.com/s/5g55kwxdws7i6pm/rfarago.pbix?dl=0 

 

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

View solution in original post

4 REPLIES 4
Jihwan_Kim
Super User
Super User

Picture1.png

 

https://www.dropbox.com/s/5g55kwxdws7i6pm/rfarago.pbix?dl=0 

 

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Anonymous
Not applicable

Thank you @Jihwan_Kim ,
This looks like exactly what I was looking for. I guess the Max Starttime is not someting difficult. I will try this tomorrow at work!

Kind Regards,
Roland

amitchandak
Super User
Super User

@Anonymous , A new column like

rank = rankx(filter(Table, [resource id] = earlier([resource id])), [resourceName],,desc,dense)

 

But I doubt you will get same order

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Thanks @amitchandak ,
Yes, the problem is that I need it to be in order by the starttime. :S
As it can be changed the same day and I need the freshest to be the number 1.
I was thinking somehow to get the MAX of the ID row involved in the formula as that is an autoincrement, so the same day the highest ID for every ResourceID to be the number 1 rank... That might rank it the same way I need.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.