๐Ÿ“Š
SKILL DEVELOPMENT COURSE โ€ข DATA VISUALIZATION

Data Visualization - Lab Manual

R Programming / Power BI โ€ข Lab Programs

๐Ÿ“Š Data Visualization ๐ŸŽ“ Skill Development Course ๐Ÿ“š Lab Program ๐Ÿ“Š R Programming / Power BI ๐Ÿงช Week 3
Week 3

Tableau Calculations, Overview of SUM, AVR, and Aggregate features, Creating custom calculations and fields.

โ† All Data Visualization Programs

Tableau offers a powerful set of calculation tools that allow you to manipulate, transform, and analyze your data in various ways. Here's an overview of some key concepts related to Tableau calculations, including SUM, AVG (average), and aggregate functions, as well as creating custom calculations and fields

SUM and AVG (Average) Functions

SUM Function

The SUM function in Tableau calculates the total sum of a numeric field. You can use it to find the sum of values in a column or as part of a more complex calculation. To use SUM, simply drag and drop a numeric field into the "SUM" shelf, or you can create a calculated field using the SUM function.

 

AVG (Average) Function

The AVG function calculates the average (mean) value of a numeric field. Like SUM, you can use it by dragging a numeric field into the "AVG" shelf or creating a calculated field with the AVG function.

 
 

Aggregate Functions:

Tableau provides a range of aggregate functions that allow you to perform calculations on groups of data. Common aggregate functions include SUM, AVG, COUNT, MIN (minimum value), and MAX (maximum value). These functions are particularly useful when you want to analyze data at different levels of granularity (e.g., by category, region, or time period).

 
 

Creating Custom Calculations

Tableau allows you to create custom calculations using calculated fields. Here's how to create a custom calculation:

1. Create a New Calculated Field

In the Data Source Pane, right-click on your data source and select "Create Calculated Field".

 

Alternatively, you can create a calculated field by right-clicking on a shelf in your worksheet and choosing "Create Calculated Field".

2. Enter Your Calculation:

In the calculated field editor, you can use functions, operators, and field references to define your calculation.

For example, you can create a calculated field to calculate profit margin as (SUM([Profit]) / SUM([Sales])) * 100.

3. Name and Save the Calculated Field:

Give your calculated field a meaningful name.

Click the "OK" or "Apply" button to save the calculated field.

 

4. Use the Calculated Field in Your Worksheet:

You can now use the calculated field like any other field in your worksheet. Drag it to the Rows or Columns shelf, use it in filters, or create visualizations based on it.

 
โ† Back to Data Visualization Programs ๐Ÿ“š All Lab Manuals