Tableau includes many built-in functions, but you will probably need to define custom calculations. In this video, learn how to create a calculated field.
- [Instructor] When you analyze your data in Tableau, it's possible that your original data source might not contain all of the values you want. In this movie, I will show you how to create a calculated field so that you can derive the values that you need for your analysis. My sample file's 04_02 Calculated, and you can find it in the chapter four folder of the exercise files collection. The data set that I'm examining has a number of dimensions, and I have dragged Sales Region to the rows area. I don't have anything in the data area yet. Let's say that I don't realize that I already have Order Total, which is the total value of sales, and it is in fact price times quantity, which gives you the total for each order. If I don't realize I have order total already, I can calculate it. So I'll show you how to do that here. To create a calculated field, go to the analysis menu, and then about three-quarters of the way down, click Create Calculated Field. In the calculated field dialogue box, go ahead and give the field a name. I'll call it Total Sales, and then click in the editing area below, and you can create your calculation. We want to multiply the value in the price field by quantity, so we need to indicate that we're adding a field to the calculation. To do that, type a left square bracket, and then start typing the name of the field. So I'll type price, and that is the first one that pops up, so I'll go ahead and click that. And price appears in my calculation. We're multiplying, so I will use the asterisk. And we're going to be multiplying it by quantity. So I'll type left parenthesis, start with a Q, quantity is the one that appears, it's highlighted, so I'll press the tab key, and I have price times quantity. At the bottom left corner of my dialogue box, I see the calculation is valid. So I'll go ahead and click okay. Under Measures, you can see that I have a new pill, which is currently highlighted, called Total Sales. And if I drag that to the data area in my text table, then I get those values. So what are some things that you can do with a calculated field? Well, if you don't like the name you gave it, you can always rename it. So for example, you can go to Total Sales, click that pill's down arrow, click Rename, and you see that you have the text box available for you to use to rename your field. In this case, I won't. I'll just click away and stay with what I have. You can also edit a calculated field. To do that, move to the pill for the field, click it's down arrow, and then click Edit. And that takes you to the dialogue box again. And you have your existing calculation. In this case, I don't want to make any changes. So I'll click Okay. Finally, if you realize you no longer need to use a calculated field, you can delete it. To do that, go over to the field's pill, click it's down arrow, click Delete. You'll get a warning asking if you really want to do that. Say yes, and it goes away. And in this case, because we have Order Total, which did the same calculation, I can add it to the visualization, and I'm ready to go.
- Explain where a user would navigate to seek specific help in Tableau.
- Determine the best approach for using Excel in Tableau.
- Interpret how to use the features and functions of Tableau when creating charts.
- Describe how best to manage data in a worksheet or visualization.
- Explain how to create a selection filter for certain values.
- Explain how to manage data for different chart formats.
Skill Level Beginner
1. Introducing Tableau
2. Managing Data Sources and Visualizations
3. Managing Tableau Worksheets and Workbooks
4. Creating Custom Calculations and Fields
5. Analyzing Data
6. Sorting and Filtering Tableau Data
7. Defining Groups and Sets
8. Creating and Pivoting Crosstabs
9. Creating Basic Visualizations
10. Formatting Tableau Visualizations
11. Annotating and Formatting Visualizations
12. Mapping Geographic Data
13. Creating Dashboards and Actions
Next steps1m 17s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.