Types of calculations

There are several types of calculations that you can create, as listed previously. Some of them are common to other data management tools, but some, such as user calculations, are unique to Tableau Public.

When creating calculated fields, the functions that you can apply on a field depends on the type of that field. For instance, you can't perform multiplication functions on a string field (even if it contains only numbers) without first converting it to a numeric field. Similarly, you can't concatenate numeric values without first converting them to strings.

Basic mathematical functions, such as addition (+), subtraction (-), multiplication (*), division (/), and exponents (^), are created by typing the standard operators into the dialog box.

You can add functions by typing their names or filtering the list of functions to the appropriate group, or name, and then double-clicking on the best choice. The different types of functions that you can perform in Tableau Public are as follows:

  • Number: This includes geometric, trigonometric, and rounding functions, among others
  • Strings: This includes options to find characters, measure string length, split and parse fields, and match character strings
  • Date: This includes functions for duration, the addition and subtraction of dates, the truncation of dates, and the identification of date parts
  • Type conversion: This allows you to convert fields into different types without modifying the metadata of the source field
  • Logical: This includes the powerful IF, CASE, and ISNULL and allows you to tell Tableau Public how to group fields or relate them to parameters
  • Aggregate calculations: These are the most commonly used functions; they include sum, count, avg, min, max, and median
  • User functions: These are more commonly used for Tableau Server rather than Tableau Public; they allow you to create calculated fields that operate on usernames or groups
  • Table calculation: This will be detailed in the next chapter; it allows you to compute aggregations based on data points that are visible in the current window
..................Content has been hidden....................

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