Session 3
Session 3
Session 3
2
Mastering Calculated Fields
Calculated Fields
Calculated fields in Tableau are custom fields created by using formulas or expressions to transform existing data or
generate new data points. They allow users to perform complex calculations, derive new metrics, and manipulate data
directly within Tableau without altering the original data source.
• Custom Formulas: Utilize Tableau’s rich formula language to perform calculations, including arithmetic operations,
logical conditions, and text manipulations.
• Dynamic Calculation: Calculated fields are recalculated automatically as the data context changes, such as when
filters are applied, or dimensions are adjusted.
• Versatile Use: Can be used in various places, including rows, columns, filters, marks, tooltips, and more.
• Enhance Analysis: Enable deeper insights by deriving new metrics, combining data fields, and creating conditional
outputs.
3
Mastering Calculated Fields
2. String Manipulations:
• Example: Combine ‘First Name’ and ‘Last Name’ into a full name using ‘First Name’ + ' ' + ‘Last Name’.
• Usage: Formatting and concatenating text fields, extracting parts of strings.
3. Date Calculations:
• Example: Calculate the age of a record using DATEDIFF('year', [Birth Date], TODAY()).
• Usage: Working with dates to calculate durations, age, or future/past dates.
4
Mastering Calculated Fields
4. Logical Calculations:
• Example: Create a field to categorize sales as ’IF [Sales] > 10000 THEN 'High' ELSE 'Low' END’.
• Usage: Conditional statements to create flags, segments, or categories based on data conditions.
5. Aggregate Calculations:
• Example: Calculate average sales per customer using ’SUM([Sales]) / COUNTD([Customer ID])’.
• Usage: Aggregating data to find averages, totals, or distinct counts.
5
Mastering Calculated Fields
Examples:
• Profitability Index:
• (SUM([Sales]) - SUM([Cost])) /
SUM([Cost])
6
Utilizing Parameters
Parameters
A parameter is a global placeholder value such as a number, text value, or Boolean value that can replace a
constant value in a flow.
Instead of building and maintaining multiple flows, you can now build one flow and use parameters to run the
flow with your different data sets.
7
Utilizing Parameters
Purpose of Parameters: Parameters act as placeholders that users can control to manipulate data views dynamically.
Case Study Example: A dashboard that allows users to select a region or period, updating visualizations such as sales data and
market trends.
8
Advanced Filter Actions
Filter Actions
Filter Actions in Tableau allow users to create interactive dashboards where selecting a data point in one view dynamically
filters data in other related views. This interaction enhances the dashboard experience by providing context-sensitive data
exploration and seamless navigation between different data perspectives.
• Interactivity: Users can click on a specific part of one visualization to filter data displayed in another.
• Contextual Filtering: Only data relevant to the selected item(s) is shown in connected views.
• Flexible Control: Filter actions can be customized to control which fields and views are affected.
• Intuitive Navigation: Provides a natural and intuitive way for users to drill down into details or change the focus of
analysis within a dashboard.
9
Advanced Filter Actions
10
Let's practice
11
Any Questions ?
12
Thank You
13