Understanding and quantifying playing styles across different lineups is crucial for evaluating player roles, optimizing lineup combinations, and recruiting suitable athletes. This study proposes a comprehensive framework to capture player versatility, defined as the range of playing styles exhibited across various lineups in elite basketball. We collected data from 11,978 games spanning 10 NBA regular seasons and extracted lineup-based player statistics and applied Non-negative Matrix Factorization to reduce dimensionality, identifying 6 performance bases that represent playing styles in specific lineups. A two-step clustering algorithm based on cosine distance was then used to group typical performance patterns and quantify each player's versatility. To compare versatility between players, we employed the Wasserstein distance, providing an interpretable alignment of playing styles. This framework offers basketball practitioners a powerful tool to assess player performance across lineups, supporting informed decisions in lineup optimization, player development and recruitment in basketball and other team sports.