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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. 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
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

May 2025 Monthly Update

Fabric Community Update - May 2025

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