From the course: Tableau 10: Mastering Calculations

Calculate the sum of a collection of values - Tableau Tutorial

From the course: Tableau 10: Mastering Calculations

Start my 1-month free trial

Calculate the sum of a collection of values

- Organizations collect data of all kinds, such as revenue generated by sales, the number of visitors to a museum, or the cost of goods sold. One of the most common ways to summarize that data is by finding the total, or sum, of every individual transaction listed in the column of data. In this movie I'll show you how to calculate the sum of a set of values. My sample file is the Sum Values Workbook and you can find it in the Chapter 2 folder of your Exercise Files collection. This workbook lists orders by product category and property city for a hotel chain. And then if we look in the data area we'll see that I have a quantity of items for each order, the price of each of the products, and then a total cost, which is the price multiplied by quantity for each item. To display the sum of all of the orders, which would be the sum of the total cost for each order, I can go to the Data area and drag the TotalCost pill to the Marks card and drop it on top of Text. Doing so puts the sum inside of my visualization and you can see here that for Furnishings in Arlington we had 11,840, they ordered 2484 of Housekeeping goods, and so on. Because finding the sum is the most common operation for most data, it's the default. When you add any of the measures, such as quantity, price, or total cost, to a visualization, it comes in as Sum. You can also change it. So, for example, if you want to change it to Average you could hover the mouse pointer over that pill, click the down arrow, and then point to Measure, which is about halfway down, and you see a bunch of other measures that you can use. So, for example, I could switch it to Average and I see the average order for each of those items, or the average total cost of those orders. If I want to switch it back, I can hover over the pill, click the down arrow, point to Measure, and click Sum. Also note that Sum appears to the left of the field name, in this case TotalCost, so it's easy to determine which summary is being applied to a particular field at a given time. Finding of a sum of a set of values is one of the most straightforward calculations that you can do in Tableau but because it's so important, I wanted to give it its own movie.

Contents