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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
SriKandimalla
Helper I
Helper I

Create a Rank column by using a date column. There might be duplicate dates, but the rank should not

Hello PBI Comunity,

 

I am trying to solve the following criteria:

[Latest name] is my target DAX column, which I tried to achieve.
I need to check if a name is duplicate, then check all the dates for that name, and give rank for each row even when the dates are repeated.

MockData.png

 

I appreciate all the help.
TIA

1 ACCEPTED SOLUTION

Hi @SriKandimalla ,

 

This was a tricky thing to solve but finally got a way to do this by creating an INDEX/ID column to the data.

1. Sample data used is as follows:

r1.png

2. Created the DAX expression column as follows:

Rank = RANKX(FILTER('Name Rank', 'Name Rank'[Name] = EARLIER('Name Rank'[Name])), 'Name Rank'[Date] - 'Name Rank'[ID] / POWER(10, 9), , ASC, Dense)
 
3. Then I move it to dashboard as follows:
r2.png
4. Let's check result by filtering down one person:
r3.png
We finally get the required result 🙂
 
If this helps and resolves your issue, appreciate a Kudos and mark it as a Solution! 🙂
 
Thanks,
Pragati
 
 

 

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

View solution in original post

4 REPLIES 4
Pragati11
Super User
Super User

Hi @SriKandimalla.,

 

Do you have anyother column in your dataset apart from NAME and DATE?

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Yes @Pragati11 ,

I have many columns, but I cannot use them. Not relevant to this requirement.

Hi @SriKandimalla ,

 

This was a tricky thing to solve but finally got a way to do this by creating an INDEX/ID column to the data.

1. Sample data used is as follows:

r1.png

2. Created the DAX expression column as follows:

Rank = RANKX(FILTER('Name Rank', 'Name Rank'[Name] = EARLIER('Name Rank'[Name])), 'Name Rank'[Date] - 'Name Rank'[ID] / POWER(10, 9), , ASC, Dense)
 
3. Then I move it to dashboard as follows:
r2.png
4. Let's check result by filtering down one person:
r3.png
We finally get the required result 🙂
 
If this helps and resolves your issue, appreciate a Kudos and mark it as a Solution! 🙂
 
Thanks,
Pragati
 
 

 

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Hi @SriKandimalla ,

 

Just wanted to check, if my latest solutions worked for you? It works in my case. If it works please accept it as a solution ans close the thread.

 

If this helps and resolves the issue, appreciate a Kudos and mark it as a Solution! 🙂

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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