From the course: Tableau 2024.1: Essential Training

Summarize data using a smart histogram - Tableau Tutorial

From the course: Tableau 2024.1: Essential Training

Summarize data using a smart histogram

Histograms summarize data using a vertical bar chart, where each bar represents the count of data points that occur within a given value range. For example, you could create a histogram to count the days with 0 to 20 walking customers 21 to 40, 41 to 60, and continuing on. Tableau also lets you edit the bin size with suggested values based on the program's analysis of your data. In this movie, I will show you how to create a histogram and also how to create a smart histogram by changing the bin size. My sample file is 08_07_Smart, and you can find it in the Chapter_08 folder of the Exercise Files collection. To create a histogram, which again is a distribution of values that are found in a particular field. I can drag a measure such as order total to the data area of the visualization, so there I get my sum total. If I want to create a histogram, then I can click show me, and go down near the bottom and click the histogram button. And then click show Me again, close that pane or panel and I get my distribution. So I see that overall I have a lot of very small orders, and because my x axis goes up to 36,000. If I move my mouse pointer down, then I see that I in fact do have one order of over 34,000. This state is interesting, but it's not very useful because it combines sales of very small things, such as light bulbs with very large and expensive things such as grid tie, inverters and a grid tie inverter. We'll take energy that is generated by a windmill or a solar panel, and take that onto the grid for distribution to other customers. So let's narrow what we have summarized in our histogram by creating a filter based on product category. Saw drag product category to the filters card, and then in the filter dialog box, I will click or check the Grid Tie Inverters box and click okay. And there we go. I have a much more usable histogram and I can see that there are quite a few small orders. There are 60 of them, perhaps for lower capacity elements. And then I have a few that are very large and expensive orders of about $14,000, and there are eight of those. So most likely these are business customers, and these are either small businesses or individuals. If, however, you want to control how the bins are created, that is their size. You can do that by going over to the sidebar and then right click Order Total because that is our measure name. Then point to create and click Bins. The Edit Bins dialog box appears and we'll have a new field name and this will be Order Total bin two. And I'm fine. I can just leave it with that. For the size of the bins rather than 1050. I'll change it to 2000. Just to see how it changes my visualization and click okay. And then I'll drag order total bin. After the viz and put order total bin two on the column shelf. And there we go. And this actually makes a lot of sense to me. I still have 60 orders from 0 to 2000. And then 34 just above that, and then an area where I have very few orders between 4 and 6000. And the others, as you see here. And what 4000 indicates to me is that there might be a cut off between individual customers and business customers. Individuals, as I said, would probably buy smaller items and those would be the lower cost where businesses would buy the larger ones. And you see the same trend starting with a lot of relatively small purchases going down to very large. So that's an interesting aspect of my data. And I don't know, it's true, but based on the histogram that I created here and the changes I made in order size or at least the bins that summarize the orders, I have a place to look.

Contents