Question

Limit results in a table based on the largest value of a dimension

  • 17 December 2021
  • 0 replies
  • 25 views

I am looking for the equivalent to what I know as a level of detail expression in Tableau. Here is a small sample dataset listing a child’s age, favorite sport at a given age, and the given age:

 

NAME - SPORT - AGE

Adam - Soccer - 15

Adam - Baseball - 14

Adam - Hockey - 13

Billy - Baseball - 10

Billy - Soccer - 9

 

Based on the data above, Adam’s most recent favorite sport is Soccer and Billy’s is Baseball. How can I filter table results to show only the record containing each child’s most recent favorite sport (based on the maximum value of the AGE field for each NAME field). My goal is to get a table with data similar to the following:

 

NAME - SPORT - AGE

Adam - Soccer - 15

Billy - Baseball - 10


This topic has been closed for comments