Data Visualization: Swap and Sort Your Charts

Swap rows and columns by clicking the swap button, dragging fields, or using Ctrl+W; sort data by text or field values, adjust sort order manually or alphabetically.

Master the basics of Tableau chart manipulation by learning how to easily swap rows and columns, use keyboard shortcuts, and customize sorting options. This article also explains how to reset views and utilize the fit menu for optimal data visualization adjustments.

Key Insights

  • Swapping rows and columns can be done either by dragging field pills between axes or by using the toolbar button or the Ctrl+W keyboard shortcut on a PC.
  • Sorting options in Tableau include sorting by text, by field values (such as sales), and manual sorting, with the ability to revert back to the original data source order for clarity.
  • Noble Desktop’s training covers the use of the fit menu, which allows users to adjust the visualization display to fit width, fit height, or show the entire view for improved readability.

This lesson is a preview from our Tableau Course Online (includes software). Enroll in this course for detailed lessons, live instructor support, and project-based training.

Swap rows and columns. All you have to do is click the button to swap rows and columns. The other way that you could swap rows and columns is just by dragging fields into the different positions.

That's what you're doing when you're swapping rows and columns. If I want to turn this into a column chart, and let's say I forget how to do this on the menu, I can take this green pill, drag it down here. Now, it makes my chart look weird, but all I have to do is take subcategory and move it into columns, and now I have a column chart.

If I want to switch it, I can just drag this, put this here, and then drag this, put this up here. Very easy to work with, or you can use this button. The keyboard shortcut is Ctrl W. If you like keyboard shortcuts, if you hover your mouse over some of the icons in the toolbar, you can pick up some keyboard shortcuts.

One for swap rows and columns on the PC is Ctrl W. If I press Ctrl W, that's how quickly I can take a look at my data and see maybe which one I prefer. I'm going to go back. You can simply swap the fields as well.

You can sort in ascending or descending order. Let me show you something about sorting in ascending and descending order. I'm going to go over to sales, and I want to choose to, let's see, I'm not seeing the option I'm looking for here.

It's subcategory. In subcategory, I'm going to choose sort, and let's say I'll choose descending, ascending. This is just by text.

This is sorting by text. It's not sorting by the value. I don't want to sort on the data source order.

What I want to do is sort on a field. Now I'm sorting by sales. You can control that over here as well.

I'm sorting by sales, ascending or descending. I can do manual. Manual, I will manually adjust the sorting.

I'm not too familiar with nested. Alphabetical, that's alphabetical based on the name of the categories, which is weird, but maybe you want to sort something alphabetically. You should be able to do that with text as well as numerical values, so you're able to do that.

Now, if you sort this, let's say, by field, and you choose ascending or descending, you might say, well, how do I change it back to the default order? That's called data source order. If you do that, that's the original sort order that came with the table, so you can always get back to the original sort order. I just wanted to go over that to let you know that you can play around with the sort if you want to change it back to the original sort order you can.

Also, this little icon lets you know that this is being sorted. I can click here, and you can click clear sort, and if you clear sort, you're just clearing the sort, and you're saying I don't want to apply any kind of sort, even one that I manually apply, so I just wanted to go over that because that's related to sorting your information. The pane is invisible.

We covered this. You use the fit menu. This is what this is called, the fit menu, and you can fit width, fit height, or choose entire view.

Most of the time, you'll choose entire view.

Yelp Facebook LinkedIn YouTube Twitter Instagram