Create Custom Fields with Calculations
If your underlying data doesn't include all of the fields you need in order to answer your questions, you can create new fields in Tableau using calculations and then save them as part of your data source. These fields are called calculated fields.
This section provides all the documentation you need to get started with calculations in Tableau.