From the course: Tableau Essential Training

Calculate averages, medians, minimums, and maximums - Tableau Tutorial

From the course: Tableau Essential Training

Calculate averages, medians, minimums, and maximums

- [Presenter] When you analyze business data you will often want to discover what represents a typical value and also identify the maximum and minimum of the value range. There are a number of ways to calculate what are called measures of central tendency, but I'll focus on the average and the median. In this movie I will show you how to calculate those values and others. My sample file is 05_01_Averages and you can find it in the Chapter 5 folder of the Exercise Files collection. In this workbook, I have a single worksheet and I have summarized the total of sales by state in the US. I can also calculate other measures such as the average. To start, I will drag the Order Total field onto the Marks card. So I'll drag it under Sum of Order Total. And you can see that my new field has been added as detail instead of text. Before I change it to text I want to change the summary operation from sum to average. So I'll click my new pill's down arrow. Point to Measure and click Average. So it's average, but it's still detail. So I will click the icon next to the pill and from there I'll change it to text. And you can see that in the body of the summary in the text table I have total sales and also average sales. And having one above the other is okay except that they're not labeled. So I might guess that the larger number is the sum but I wouldn't know what the lower number is unless I happen to know it was the average. If I want to reposition average to the right of sum then I can drag it onto the data area of the text table. So I'll go ahead and drag that over. And when the Show Me button appears you know that it's in the right place. So I'll let go there. And I have average first and order total, or sum, second. Also, notice that the Marks card now has measure values shown as text, and then the measure values card appears below. And I have average of order total and sum of order total. If I want to reposition average I can drag it below sum and I have a little orange indicator telling me that it's in position. So I'll let go. And I have order total at the top and average order at the bottom. I'll add three other measures and the first will be the median. The median value in a data set is the middle value if you sort all the values into ascending or descending order. So if you have an odd number of values the one in the middle is the median. If you have an even number of values, then the average of the two in the middle is considered the median. So I will add Order Total again to the Marks card. It appears and I'll change the summary by clicking the pill's down arrow. Pointing to Measure and change to Median. And then I'll drag Median onto the data vis. And there I have the median value. One thing you can do when you analyze your business data is to compare the average to the median, in this case the average to the median order. If they're similar, that is, within a few percentage points of each other, that means that you don't have a lot of spread. In other words, you don't have any very large orders or any very small orders. On the other hand, if the median is either substantially higher or lower than the average, then that tells you that your orders, while the average is low, might tend toward one side or the other. So if your average and median are similar, no problem. If they are different, then you might want to look into your data and see what is causing that difference. Okay, so I have the median and average and sum. I can also display the minimum and maximum values. I'm going to drag Median of Order Total off of the Marks card. So I drag it to the left, but notice that I did not remove it from measure values. I'll drag Order Total to the Marks card again. I will change the measure to Minimum and then I'll drag Minimum onto the data area. And there I see that I have my smallest orders and I'll drag Minimum of Order Total off of the Marks card. I'm just keeping the clutter down. And then finally, I'll drag Order Total, again, to the Marks card. Click the down arrow. Change to Maximum. Drag it onto the vis. And it looks like I have Maximum to the left of Median. I actually want it below Minimum. So I'll drag down. And there we go. So what I've done is create a summary table for sales by state and the sum, average, median, minimum and maximum all provide excellent information. I can use these values to get important information about my business.

Contents