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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.