1

Sorry for asking such a basic question. I've recently did a Tableau Course that just covered the basics. I've already watched 10+ YouTube videos looking for an answer but nothing that solves my question, so here it goes.

I'm doing a practice visualization with an NBA salaries dataset. I've got a table that looks like this:

Data table

In the table there's every player's salary during each season and I want to list a table with the Most Valued Player (the player that perceived the higher salary during a certain season) per season. I've got every player's salary during each season.

Working sheet

How should I apply a filter? I tried filtering by limit, setting the limit to 1 per Season or Player, but it shows only one season or one player respectively. How can I get the player that has earned the most in each season displayed in a table?

Thanks in advance

mFranck
  • 27
  • 1
  • 1
  • 7

1 Answers1

1

The typical way to address this type of problem uses an LOD calculation - to find the max salary per season, and then a record level calc that returns the player name if he has the max salary that season (and default to null otherwise)

So define

  1. Max_Salary_Per_Season as { FIXED [Season] : MAX([Salary]) } and
  2. Highest Paid Player Per Season as IF [Salary] = [Max_Salary_Per_Season] THEN [Player Name] END

Then you could, for example, put Season on Rows and ATTR([Highest Paid Player Per Season)] on the Text/Label shelf. Not the use of ATTR() means change the field from a dimension to an attribute. Optional step.

Attributes will shows as a "*" if there are multiple non-null values - say if two players are tied for the top salary

Alex Blakemore
  • 11,301
  • 2
  • 26
  • 49