Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Tableau study group - 4

Tableau study group - 4

Alberto Lusoli

January 13, 2021
Tweet

More Decks by Alberto Lusoli

Other Decks in Education

Transcript

  1. Why using Calculations? Calculations allow you to create new data

    from data that already exists in your data source, as well as perform computations on your data. This allows you to perform complex analyzes and add fields to your data source on your own and on the fly. You want to quickly categorize data.
  2. Row calculations To create a new Calculated Field you can

    either right-click on the Data Panel in your Worksheet and select “Create Calculated Field”…
  3. Row calculations …Or create a new calculated field on the

    Data Source panel, by right clicking an existing field and selecting “Create Calculated Field”. In both cases your new calculated field is added to your Data Source and can be used across views.
  4. Functions Calculations are combinations of one or more Functions and

    one or more Dimensions/Measures. Functions are built-in formulas. They can be: Numerical Logical Textual (string) Date Conversions Aggregations Users Table
  5. Example Let’s create our first calculated field. We want to

    classify our “keywords” into 2 categories. Each category identifies the position of the keyword in the Book The 2 categories are: Beginning: If the keywords appears before page 200 End: if it appears after page 200
  6. Anatomy of a calculation In order to create this new

    calculation, we need to mix Numerical and Logical functions
  7. Anatomy of a calculation In order to create this new

    calculation, we need to mix Numerical and Logical functions
  8. The results If the calculation is correct, the new field

    can be found in the Data Panel and in the Data Source sheet.
  9. Doing more complex calculations Functions can be used in sequence,

    can be nested and combined. Based on the previous example, let’s try to classify our keywords into 3 groups: Beginning (1-100) Middle (101-400) End (401+)
  10. Calculating depth in Photoshop Let’s suppose we want to create

    a new field which indicates the “level” of each row in our dataset. Where: Keyword: Depth = 1 Sub keyword: Depth = 2 SubSub Keyword: Depth = 3
  11. Calculating depth in Photoshop Let’s suppose we want to create

    a new field which indicates the “level” of each row in our dataset. Where: Keyword: Depth = 1 Sub keyword: Depth = 2 SubSub Keyword: Depth = 3
  12. Calculating depth in Photoshop Let’s suppose we want to create

    a new field which indicates the “level” of each row in our dataset. Where: Keyword: Depth = 1 Sub keyword: Depth = 2 SubSub Keyword: Depth = 3
  13. Syntax It is not necessary to remember the syntax of

    all functions. Tableau function editor provides instructions and examples. In addition, you can find detailed explanations of all functions here: http://bit.ly/functions-explained
  14. Table Calculations A table calculation is a transformation you apply

    to the values of a single measure in your view, based on the dimensions in the level of detail.
  15. Table Calculations For any Tableau view, there is a virtual

    table that is determined by the dimensions in the view. This table is not to be confused with the tables in your data source. Specifically, the virtual table is determined by the dimensions within the “level of detail,” which means the dimensions on any of the following shelves or cards in a Tableau worksheet:
  16. Table Calculations To simplify: A table calculation is a calculation

    which cannot be executed with the information available in one row alone. It’s a calculation which depends on all the elements which compose our virtual table (i.e. the data table behind a specific view)
  17. An example We want to know how often the term

    “Filter” appears in the “Keyword” field. We want this “frequency” to be expressed in %.
  18. An example In order to calculate the frequency, we need

    to know the “context”. This context is the virtual data table which is behind each view.
  19. Create a table calculation We can quickly create a table

    calculation using the pre-set functions available in the pills drop down menu.
  20. Create a table calculation Why table calculations cannot have a

    definite value per each row (Go to Tableau sheet 0.5)
  21. Saving calculations If we have created a table calculation using

    the dropdown shortcut, we can save it by dragging and dropping it into the Data panel:
  22. Another table calculation example Let’s plot the number of keywords

    and subkeywords as they have been coded by the analyst.
  23. Another table calculation example Let’s suppose we want to track

    not just where (in which page) and how many times the terms have been coded. Let’s suppose we want to plot the distribution of terms throughout the book.
  24. Another table calculation example Let’s suppose we want to track

    not just where (in which page) and how many times the terms have been coded. Let’s suppose we want to plot the distribution of terms throughout the book.
  25. Another table calculation example Let’s suppose we want to track

    not just where (in which page) and how many times the terms have been coded. Let’s suppose we want to plot the distribution of terms throughout the book.
  26. Tentative outline 1. Intro to Tableau 1. Installing the software

    2. Data sources and reshaping CSV data 3. Tinkering 2. Fundamental concepts I 1. Data – Worksheet – Dashboards – Stories 2. Dimensions and Measures 3. File formats 4. Data manipulation: join, union, blend 5. Fields operations: split, pivot, filter, clean, calculated fields 6. Tinkering 3. Tableau in action 1. Basic visualizations 2. Calculations (Ad hoc calculations, Calculation editor, Table Calculations, ) 3. Data management: extract, live, refresh 4. Tinkering 4. … 5. Dashboards and Stories