I’m using my Fantasy Baseball league to learn more about analytics. I have an Excel file with the following columns:
I want to figure out a way to rank and score each player.
The challenge is that the contract length plays a big role in how valuable a player is. For example, if a player is relatively cheap (say, 300k), productive, and 23 years old with a 5-year contract, that’s a good situation. On the other hand, a player who is 34 years old, making 70 million, and has a 10-year contract isn’t as favorable, since you'd have to honor that contract for a longer period.
Do you have any suggestions for how to approach this in Alteryx? I’m comfortable with data cleaning, maintaining, and breaking things down, but analyzing scenarios like this is an area I need more help with.
Thanks in advance!
Below are some high-level ideas and workflows to consider. They aren’t specific “click by click” instructions, but rather ways you could structure your analysis in Alteryx (or any tool, really) to capture the trade-offs between age, salary, contract length, and projected fantasy points.
1) Define the Core Question or Objective
Before you build any analytic framework, clarify what “value” really means for your league context:
Once that’s clear, you can pick or build a formula that best represents that objective.
2) Combine Your Metrics into a “Value Score”
A common approach is to create a composite score (or multiple scores) using the available data. For example:
You can then combine these into a single ratio or weighted measure that balances cost, production, and risk.
Example (simple ratio idea):
Value Score=Projected Annual FPtsAnnual Cost×1Age Factor\text{Value Score} = \frac{\text{Projected Annual FPts}}{\text{Annual Cost}} \times \frac{1}{\text{Age Factor}}
Where “Age Factor” might be something like (1+0.01×(Age−25))(1 + 0.01 \times (\text{Age} - 25)) to slightly penalize older players.
That’s a very rough example; you might get more nuanced by adding contract length in ways that amplify or penalize long-term deals.
3) Account for Aging and Contracts Over Time
In baseball (and fantasy baseball), performance often declines (or at least gets riskier) with age, and long contracts for older players can be detrimental. If you want to reflect that:
You can create something like a “NPV of Total Points” relative to “NPV of Contract Cost.” For instance, if you have a discount rate rr, the value in year tt is discounted by 1(1+r)t\frac{1}{(1 + r)^t}.
This requires some assumptions, but can provide a better “apples to apples” comparison of multi-year deals.
4) Putting It All Together in Alteryx
Let’s assume you have a dataset with columns:
a) Building the Workflow
Input Data: Start with your Excel file in Alteryx via the Input Data tool.
Create Formulas: Use the Formula tool to create new fields:
Compute a Composite Value Score: In a new Formula tool, combine the above into your chosen metric. For instance:
[Value_Score] = ([Projected_Total_FPts] / [Total_Cost]) / [Age_Penalty]
or use any ratio/weighted combination that aligns with your league’s needs.
Ranking: Use the Sort tool to sort by [Value_Score] descending, or you can use a Rank tool (part of the Transform or Summarize options, or a multi-row formula) to assign a numeric rank to each player.
b) Scenario Analysis
If you want to try different weighting scenarios (e.g., more emphasis on age or more emphasis on cost), you can:
c) Consider Predictive Tools (Optional)
Alteryx has built-in predictive tools (Linear Regression, Random Forest, etc.) if you want to get more sophisticated. For instance:
However, that typically requires more historical data on players, performance, injuries, etc.
5) Practical Tips
Example Formula in Action
Here’s a made-up example just to illustrate how you might put it into a single expression:
Value_Score = ([FPts] * [Contract_Length] * (1 - 0.01 * (Age - 25))) / ([Salary] * [Contract_Length])
From there, refine your approach as you gather insights. Good luck with your fantasy league analytics!
First off wow and thanks for responding but also for putting so much work and detail in it. I'm going to read it and the reread it and then try to understand everything you wrote. Before diving into deep I just wanted to make sure I thanked you for this. So THANK-YOU! I have many strengths but this is my one area of weakness.