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
spompeo
New Member

RANKX Player Position Rank over Time

Farily new with DAX and struggling with filtered RANKX. I have a StatsDB table and a playerkey table for a fantasy football database I'm working on.

 

Each row of the data table is a game log for a player:

 

StatsDB:

  • PlayerID (relation)
  • Year
  • Name
  • Position
  • Team
  • Week
  • Pass Attempts
  • Pass Completions
  • etc. - Other relevant offense statistics. 

PlayerKey

  • PlayerID (relation)
  • Player Name
  • Current Position

I created measures that calculate fantasy points based on stats. 

 

Example Measures:

  • FPTS Rush Yds:=CALCULATE(sum([Rush Yards])*.1)
  • FPTS Total:=[FPTS Fumb Lost]+[FPTS Rush Yds]+[FPTS Pass TDs]+ etc.

 

I have a points rank that seems to work for the context of the pivot / slicers - 

  • FPTS Rank:=if(not(ISBLANK([FPTS Total])),rankx(filter(all(PlayerKey),not(isblank([FPTS Total]))),[FPTS Total]),blank())

 

However, my goal is to have a "fantasy points positional rank" measure. Where did a player rank in fantasy points scored at his position over any given period of time?

 

Any ideas how to go about this? Would be much appreciated! I can do this manually but am trying to work positional ranks into the data model and am stuck.

1 REPLY 1
v-frfei-msft
Community Support
Community Support

Hi @spompeo ,

 

Could you please share your sample data and excepted result to me if you don't have any Confidential Information. Please upload your files to One Drive and share the link here.

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

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.

Top Solution Authors
Top Kudoed Authors