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
xvanwindekens
Regular Visitor

RANKX for each date

Hi, 

 

I am trying to rank players for each day in one table and calculate the rank difference between dates for a same player in another column. Note that there is a gap between some dates and the ranking is descending.  

 

Data:

DatePlayerScore
1/1/2017John12
1/1/2017Nico2
1/1/2017Steve7
1/1/2017Ben4
1/2/2017John25
1/2/2017Nico28
1/2/2017Steve26
1/2/2017Ben28
1/3/2017John39
1/3/2017Nico37
1/3/2017Steve40
1/3/2017Ben35
1/6/2017John47
1/6/2017Nico49
1/6/2017Steve47
1/6/2017Ben46

 

Desired table

 

 1/1/20171/2/20171/3/20171/6/2017
PlayerScoreRankDiffScoreRankDiffScoreRankDiffScoreRankDiff
John124-251+3393-2472+1
Nico21-283-2372+1494-2
Steve73-262+1404-2472-2
Ben42-283-1351+2461-

 

Thank you for your help.

 

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

 

You may refer to my solution here.

 

Hope this helps.

 

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

 

You may refer to my solution here.

 

Hope this helps.

 

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Thank you !

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

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.