From the course: Tableau 2024.1: Essential Training
Sort based on a field’s values - Tableau Tutorial
From the course: Tableau 2024.1: Essential Training
Sort based on a field’s values
If you work with business data, you know that the order your data appears in matters. For example, if you have time data divided by month, then it makes sense to put the months in chronological order with January, February, and March instead of alphabetical order. Where April comes before August and everything is just a terrible mess. In this movie, I will show you how to sort your data so you can emphasize the aspects of it you find most important. My sample file is 06_01_Sort, and you can find it in the Chapter_06 folder of the Exercise Files collection. In this workbook I have sales broken down by region. The regions are text values that are currently in ascending alphabetical order, and that controls the values that appear in the data area. If I want to sort based on the values in the data area, then I can go to the toolbar. And this works because I have exactly one field in the data area. And then click the sort ascending button. This will put the smallest values on top and the largest on the bottom. So there we go. I can also sort in descending order with the largest values on top, by clicking the sort descending button on the toolbar, and you see the result there. Another way to sort is to move my mouse pointer over the sales region column header. And here if I click the button that indicates descending order, then that switches to ascending. If I click it again, it switches to sales region in alphabetical order. If I click it again, it switches to alphabetical order in descending order. So Southwest is the last, Southeast comes after that and continuing on throughout the rest of the terms. If you want more control over sorting, you can go to the sales region Pil. And then click a sound arrow and click sort. This displays the sort dialog box, and I'll drag it over to the right so we can see the results in the background. There are a number of ways that I can sort. The first option under sort by is data source order. So I currently have that in descending order. So the dialog box carried over to the settings. And if I click ascending then we go back to alphabetical or rather data source order in ascending order. And if I were to switch to alphabetic and descending, that would be exactly the same, and I'll switch back to ascending. You can also sort manually, and that allows you to drag individual items exactly where you want them. So I'll click these sort by control click manual, and I get the current order of the values in the visualization. And let's say that I drag Northeast up. I can also use the move up and move down controls on the right, but I prefer to drag, and then I'll move Southeast above North Central East and below Central East. There we go. And you can see the visualization changing in the background. I don't want to keep this for the next demonstration, so I'll click clear. And that clears the sort, and I'm back to datasource order. One final thing I'll demonstrate is how to sort by a field that is not actually in the visualization. And this is pretty neat. So I'll go to sort by click it again and then click field. I'll sort in ascending order, but rather than order total, I'll click that control and I'll scroll down. And I will sort by quantity. So rather than the total value of all orders is going to be the count of orders, or at least the count of items ordered. So I click there, and we've got the sum. And when I look at the visualization it doesn't look like much changed. But in fact it has. Rather than being sorted in ascending order, I have 601,000 for Southwest, appearing above Southeast. Everything else is in the original order. So that means that only Southwest violated the pattern of having a higher quantity of items ordered. As related to the total value of all of his sales. That information might be useful. It might not be, but I wanted to indicate that there is a change in the pattern. If you sort by quantity ordered, rather than just the sum of all totals. I'm done sorting for now, so I'll click clear. And close the sought dialog box and continue working with my data.
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
-
Sort based on a field’s values5m 10s
-
(Locked)
Create a nested sort2m 50s
-
(Locked)
Create a selection filter3m 10s
-
(Locked)
Create a wildcard filter5m 24s
-
(Locked)
Create a condition filter2m 34s
-
(Locked)
Create a top filter3m 15s
-
(Locked)
Edit, clear, and delete filters2m
-
(Locked)
Filter data using parameters4m 46s
-
(Locked)
Edit and delete parameters3m 3s
-
-
-
-
-
-
-
-