A common business problem in analytics today is that we find it easy to settle for descriptive analytics for decision making, which often leads to sub-optimal or undesired outcomes. Not to say that we shouldn’t rely on descriptive analytics in our day to day analytics practices, but descriptive analytics usually get us through 80% (I made this number up) of the way to a true data driven strategy.

Predictive and Prescriptive analytics allow businesses to find the best course of action to a given situation, where the analyst, using outcomes learned from descriptive analytics, embeds business rules and constraints  in their model that suggests the best course of action as the data varies in the future.

Prescriptive Optimization is one of the most advanced areas of analytics and probably one of the most important. Prescriptive Optimization models combine historical data, business rules, variables, and constraints and try to optimize desired outcomes .

In this blog, I explain how to use Alteryx to solve a simple Mixed Integer Programming problem.

What is Mixed Integer Programming?

A mixed-integer programming (MIP) problem is one where some of the decision variables are constrained to be integer values (i.e. whole numbers such as -1, 0, 1, 2, etc.) at the optimal solution.


I want to pick the starting 5 ( Point Guard, Shooting Guard, Small Forward, Power Forward, Center) for next season’s NBA Fantasy League. I have a set budget of $200 M, and the list of players last season ( I’m working with 2014 data in this case), the average number of points they scored, the average number of rebounds, and the average number of assists.


I want to pick the starting 5 that would maximize my PRA ( Points + Rebounds + Assists ) per game.


I must respect my $200 M budget, and I must have exactly one player for every position picked.

Solution in Alteryx

Dataset – 555 players by Name, Position, Avg Points, Avg Rebounds, Avg Assists, & Avg Espn Valuation.

Prepping Data

A- Create profit variable ( Points + Rebounds + Assists) I call it coefficients.

B- Create a column for every position, and create a formula that sets the field to 1 if the player plays that position and to 0 if not.

C- Create variable table, where the variable is the player name, the lower bound is 0 ( player not picked) and upper bound is 1 ( player picked) and the variable is a binary (0 or 1)

D- Create data input table

E- Create Constraints

Configure Optimization Tool – Model is MIP, Maximizing our coefficient (PRA) by picking variable (player) given our constraints


The team the model has chosen within a budget of $200 M averages 186 PRA per game with the players chosen being Russel Westbrook (PG), Andrew Wiggins (SG), Carmelo Anthony (SF), DeMarcus Cousins (PF),

and DeAndre Jordan (C).

Improving the Model

This model only considers Points, Rebounds, and Assists as optimizers of player outcome. Other features like Field Goal %, 3 PT shooting %, etc.. can improve the model if included in the profit function.