When to use calculations

Before we dive into calculations and how to create them, it is equally important to understand when to create calculations. Some examples of when calculations are useful are as follows:

  • Changing datatypes: For example, you have data that is being represented as a string value.
  • Performing mathematical calculations: For example, you want to divide two fields to obtain ratios or percentages or subtract fields.
  • To create logical groupings/labels: For example, if you want to group people in those who can drive or not, you can create a calculation saying: if you are older than 18 and have a valid driving license, you can drive.
  • To create new fields from existing data: For example, you want to create a country field by extracting a part of the address or a new date field from another date field.
  • Aggregating data: For example, you want to view the sum, average, and median of distribution or subtotals and totals at the country and city levels for sales.

Now that we understand when to use calculations, we can discuss the three types of calculations available in Tableau.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.225.55.151