How to swap dimension order without changing the sort

by Blair Alagoa

The order that Dimensions are placed in columns or rows will affect how the view is sorted

In the view below we have two dimensions, a player name column and a calculation column that indicates whether each player did better in their last season compared to the one previous to it.

If we have the player dimension first than the view will be sorted alphabetically by player name first and the aggregated dimension second, because each name can’t be grouped there isn’t any more sorting that can be done. When the order is reversed then the view is sorted and grouped by calculation first and then sorted alphabetically within those groups.

If we wanted the arrows on the right side of the sheet while not having the view grouped by the calculation then it seems like there would be a simple solution, just add a second ‘player’ dimension, sandwich the calculation between them and hide the first player name column. Unfortunately this doesn’t work, Tableau ends up hiding both instances of the player dimension.

The answer to this problem is fortunately very simple. All we need to do is create a duplicate of our player name dimension and use that as one of the two columns. Tableau recognises duplicates as different dimensions so we can now hide one without losing the other.

Anytime a dimension is needed more than once in the view but they need to act independently, duplicates are a invaluable tool. This is only one of countless ways this idea could be used. Hopefully you’ll remember this trick for any specific cases where it would come in handy.

Thu 03 Sep 2020

Thu 20 Aug 2020

Tue 18 Aug 2020