When you are creating your visualisations, you might want to summarize your data like the user can require the sum of the data, the number of products ordered to have some analysis. For example, the average number of items ordered, finding the average cost of orders. This article aims to show how to change the summary operation for a visualization.
Steps to perform:
- In the Tableau, connect to the databases.
- The data source has three data files – Product, OrderDetails, PropertyInfo. These are three different excel sheet present in one data file.
- Open Product data file.
- Add OrderDetails data file, it contains the information about each order.
- Now you can see there is a join in the two data files.
- If you’ll hover on the join then you can see that there is a inner join using the common key i.e. Product ID. Inner join simply means that there are two files have a field in common and it can be combined easily.
- Next, add the PropertyInfo file and it can be see that it is also joined.
- If you’ll hover the mouse pointer then it can be clearly seen that OrderDetails and PropertyInfo are inner joined using the key – PropertyID.
- Now, that data is completely ready for data visualisation.
- Click Quantity and then at the top right corner of the screen, at the right edge of the toolbar, there is the Show Me button. Visualisation can be obtained using the Show Me option.
- Drag a product category to the Columns area, for that go over to the Data area and drag Product Category to the Columns area, and then drag Property City to the Rows shelf here, which is available, and then put in my Quantity data in the body of the table. So, go down to the Measures group, drag Quantity in, and there you have all of my data.
- Now we have a pretty simple visualisation. It is a text table with product category in Columns area, Property City in Rows and we are finding the sum of the quantities ordered.
- And if you go over the marks card, you can see that you are finding the sum of the quantity of items ordered for each of those categories. If you want to change the summary operation, then hover your mouse pointer over the sum quantity pill, click the down arrow that appears, and then from the menu, point to measure, which currently is indicating sum.
- Click that. And when you do, you can see that you have a number of different summarization formulas available to me. There’s the sum, which is simply adding the values together, average finds the average, median finds the middle value.
- So Click the average, and you can see the average number of items in each order. And it looks like most of the orders have an average of somewhere between two and three items. If you want to go back to sum, you can either select sum from the quantity pill again or you can press control Z
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course. And to begin with your Machine Learning Journey, join the Machine Learning – Basic Level Course