I'm trying to show something like the followingm
Where for a given team for a given year
Top row shows the team batting average
Second row shows the batting average for the year (all teams)
Third row shows the ranking for the selected team (in this case, DET) compared to all other teams - for example, if DET had the highest batting average of all teams, they would have a value of 1, 2nd highest , a value of 2, etc.
I cant seem to get the ranking to work.. it only shows the ranking of DET for a given year compared to DET for all years (2007 had the highest batting average for Detroit as compared to all years Detroit batting average)
How do I get the ranking to work so that Detroit 2007 is compared to all teams 2007, 2006 compared to all teams 2006, etc?
Thanks
Jeffrey,
I think you can use the technique described here to get the rank
amongst the other teams that year, without filtering those teams out:
https://kb.tableau.com/articles/howto/filtering-view-without-filtering-underlying-data
Basically, LOOKUP(ATTR(Team ID),0) is placed on the Filter shelf.
Then [Team ID] needs to be placed on the detail shelf,
and the Table Calculation settings need to set as shown below.
Please see the workbook v10.5 attached in the Forum Thread.