Histograms - Transcript

s1201 Histograms

I. Introduction to Histogram Charts

*0:00** Hey, thanks for joining me. Today we're going to look at histogram charts.

*0:05** We're actually going to make three different ones and I'm going to follow along with this overview.

*0:10** This is a PDF and I'll put the link to this down below along with the actual Tableau starter file and then the finished Tableau will be out on Tableau public also.

*0:15** We're going to do three different histograms: percent profit, days to ship, and order size.

*0:20** If you haven't worked with histograms before, the idea is that you create bins, and then you can see how things move over time.

---

II. Creating the "Days to Ship" Histogram

Calculated Fields and Bins

*0:30** The first one that we're going to make is the days to ship.

*0:35** You create bins from continuous measure fields—that's something to remember. If you don't see the choice to make a bin, that's why.

*0:40** The first one I want to make is a days to ship calculation.

*0:45** It's a date diff calculation where I'm looking at the order date compared to the ship date and I'm returning the number of days.

*0:50** I like to keep all of my fields in a folder called "my calculated fields".

*0:55** Now, it is green indicating that it is continuous, so I should be able to make a bin from it.

*1:00** I have a size of the bin that I can specify. For this one, I wanted to demonstrate it as a one.

Building and Formatting the View

*1:10** I'm going to take days to ship bin and drag it over to columns and I actually want to change it to be a continuous field.

*1:15** I'm going to drag the order date field to the row shelf—by default, it picked years, which is what I want.

*1:20** I'm going to drag "orders count" (which Tableau creates for you automatically) up to my row shelf and drop it.

*1:25** I want to add a little pop of color, so I'm going to take the order date and drop it onto color.

*1:30** I'm going to take order date to filter shelf and uncheck 2022 because I only want to see the last 3 years.

*1:35** If you go up to analysis, you can see I've checked "show mark labels".

*1:40** On the marks card, you check label, go into font, and choose "match mark color".

*1:45** I'm going to edit the axis and just change it to say "orders" and "days to ship".

---

III. Creating the "Percent Profit" Histogram

Profit Ratio Logic

*2:00** Now I want to go do my percent profit.

*2:05** For this, I'm going to need a profit ratio field—it's going to be just profit divided by sales.

*2:10** I want to create a bin for that. I'm going to go with 0.1 for this.

Chart Setup and Axis Tuning

*2:20** I'm going to drag it up to the column shelf and then I'm going to put the order date field onto the row shelf.

*2:25** Instead of using the default orders count, I'm going to actually drag the order ID field up to the order shelf and change it to "measure distinct count".

*2:30** I also need to fix the profit ratio and make it continuous.

*2:35** I do not like the way it looks in terms of the spread, so I'm going to edit the axis and do a custom... let's try .5.

*2:40** I'll right-click on "order date" and choose "hide field labels for columns".

*2:45** I'll drag the year order date onto color just to add a little pop

s1201