Data Visualization Lab Manual
Data Visualization Lab Manual
EXPERIMENT 1
Tableau workspace is where you interact with your data and create visualizations.
Understanding the elements of the workspace is crucial for effectively using Tableau.
• Menu Bar:
o The menu bar at the top of the screen contains standard options such as File,
Data, Worksheet, Dashboard, Analysis, Map, Format, Server, and Help. These
options allow you to perform various actions like connecting to data, formatting
your visualization, publishing to Tableau Server, and accessing help resources.
• Toolbar:
o Below the menu bar is the toolbar. It provides quick access to common actions
like undo, redo, save, add new worksheet, and export.
• Data Pane:
o Located on the left side, the Data Pane shows the data you've connected to and
allows you to drag dimensions and measures onto the workspace.
o Dimensions: Categorical fields like “Product Category” or “Year”.
o Measures: Quantitative fields like “Sales” or “Profit”.
• Shelves (Columns and Rows):
o Columns Shelf: Where you drag fields to define the columns in your
visualization (usually the x-axis).
o Rows Shelf: Where you drag fields to define the rows in your visualization
(usually the y-axis).
• Marks Card:
o This allows you to customize the appearance of your chart, such as colors, sizes,
labels, tooltips, and more. The Marks card is essential for controlling how data
is visually presented.
• View (Canvas):
o The main area where your charts and graphs are built. This is your Canvas where
the visualizations take shape as you drag and drop fields.
• Filters Shelf:
o Use the Filters Shelf to control which data is displayed in your visualizations by
limiting the view to specific values in a dimension or measure.
• Pages Shelf:
o Allows you to create a page-by-page view of your data, helpful for animating
data over time or across categories.
• Show Me Panel:
o Located in the top-right corner, the Show Me panel suggests different types of
visualizations based on the fields you’ve selected, like bar charts, line charts,
maps, and more.
• Status Bar:
o At the bottom of the workspace, the status bar shows information about the
current state of the visualization, including the number of rows and marks.
Tableau Terminologies
Understanding common Tableau terminology will help you work more efficiently.
Data Terminology:
• Workbook: The file that stores all your worksheets, dashboards, and stories. It’s the
Tableau equivalent of a file.
• Sheet: A single chart or graph, also referred to as a worksheet.
• Dashboard: A collection of multiple worksheets (visualizations) arranged together to
present an overview or tell a story.
• Story: A sequence of visualizations that work together to communicate insights or lead
to a conclusion. It is like a slideshow of dashboards and visualizations.
• Dimensions: Categorical data fields that usually describe data, such as names, dates, or
geographical data. They can be thought of as "descriptive" fields.
• Measures: Quantitative, numerical data fields that are used to measure something, such
as sales, profit, quantity, etc.
• Calculated Field: A new field that you create by applying formulas to existing data,
enabling you to extend your analysis beyond the raw data.
• Filters: A feature used to restrict the data in your visualization. You can apply filters
on dimensions or measures to focus on specific data points.
Visualization Terminology:
• Marks: The individual points, bars, or shapes that make up the chart. You can
customize marks by changing their color, size, or shape.
• Axes: These are the vertical (y-axis) and horizontal (x-axis) lines used to define the
scale of your chart.
• Tooltip: An informational box that appears when you hover over a mark. Tooltips can
show details about the data point.
• Legend: The guide that explains the colors, shapes, or sizes used in the chart.
• Table Calculation: A type of calculation performed on the result of a visualization,
such as a running total or percentage difference between points.
Connecting to Data
1. Open Tableau and click on “Connect” in the start page to import your data. Tableau
supports various data sources like Excel, CSV, SQL databases, Google Sheets, etc.
2. Once connected, Tableau automatically classifies your data into Dimensions
(categorical fields) and Measures (numerical fields).
Using Filters
1. Drag a field (e.g., Product Category) to the Color Shelf in the Marks Card to assign
different colors to categories.
2. Drag a Measure (e.g., Profit) to the Size Shelf to adjust the size of marks based on a
metric.
3. Drag a field to the Shape Shelf to customize the shapes of marks (for scatterplots or
bubble charts).
Creating a Dashboard
1. Click on the New Dashboard button at the bottom of the Tableau window.
2. Drag and drop different sheets from the left panel into the dashboard space.
3. Arrange and resize the sheets to create a cohesive dashboard. You can also add filters
to allow interactive exploration.
• Undo/Redo: Tableau allows easy undo/redo using the arrows in the toolbar, so you can
experiment without worrying about making mistakes.
• Sorting: You can sort data by clicking on axis headers or using the sort buttons in the
toolbar.
• Saving Your Work: Go to File > Save As to save your Tableau workbook. Workbooks
are saved with a .twb or .twbx extension. The .twbx file includes the data source in it.
• Exporting: You can export your visualizations by clicking on File > Export Image to
save them as images or export the data as CSVs.
EXPERIMENT 2
In Tableau, you can connect to a wide variety of data sources, including databases, cloud-based
sources, and flat files like Excel or CSV. Here's a step-by-step guide on how to connect to a
data source, followed by an overview of different types of joins in Tableau:
1. Launch Tableau Desktop: Open Tableau Desktop. The home screen allows you to
select the data source you want to connect to.
2. Select Data Source:
o On the left-hand side, under Connect, you can choose from the available
categories:
▪ File (e.g., Excel, CSV, JSON, PDF)
▪ Server (e.g., MySQL, SQL Server, Oracle, etc.)
▪ Saved Data Sources (if you have any previously saved sources)
3. Choose the Connection Type: Once you select a data source, you'll be prompted to
enter the necessary connection details, such as:
o File-based sources: Browse for the file and select it.
o Server-based sources: Provide database connection credentials (e.g.,
hostname, port, username, password).
4. Preview the Data: Tableau provides a preview of the data after the connection. You
can adjust the data import settings, rename columns, or filter unnecessary rows during
this stage.
5. Drag and Drop Tables: After connecting to your database, Tableau shows a list of
available tables or views. Drag the desired table into the canvas area to start working
with it.
Once you connect multiple tables from your data source, you can define the relationship
between them using joins. Tableau supports several types of joins:
Joins combine data from two or more tables into one. Here are the different types of joins
available in Tableau:
Inner Join:
o Definition: Returns only the rows that have matching values in both tables.
o Use Case: When you need data that exists in both tables.
o Example: You have two tables, Orders and Customers. An inner join returns
only the orders that have a matching customer record.
• Definition: Returns all rows from the right table, and the matched rows from the left
table. Unmatched rows from the left table will contain NULL.
• Use Case: When you need all data from the right table, regardless of whether there’s a
match in the left table.
• Example: You want to see all orders, even if some orders are not associated with any
customer.
• Definition: Returns all rows when there is a match in either the left or right table. Rows
with no match in either table will contain NULL.
• Use Case: When you need to combine all data from two tables, including non-matching
records.
• Example: You want to see all customers and orders, whether or not every customer
placed an order.
EXPERIMENT 3
After connecting to the data and preparing your joins, the next step is creating a visual
representation or view. A view can be a bar chart, line chart, pie chart, or any other visualization
type available in Tableau.
1. Open Tableau:
o Connect to your data source (e.g., Sample Superstore).
o Go to Sheet 1 to start building a view.
2. Drag and Drop Fields:
o On the left side, you will see Dimensions (categorical data) and Measures
(quantitative data).
o Drag fields to the Rows and Columns shelves to build the visualization. For
example:
▪ Drag Sales to Columns.
▪ Drag Category to Rows.
3. Change Chart Type:
o By default, Tableau might suggest a bar chart based on the data. If you want to
change the chart type, click on the Show Me pane and select a different
visualization, like a Line Chart or Pie Chart.
Chart formatting allows you to improve the visual appeal and readability of the data.
1. Format Axes:
o Right-click on the axis (e.g., the Sales axis), then select Format.
o You can change the font, color, and size of the axis labels.
o You can also customize the number format, such as displaying values as
currency or percentages.
2. Format Tooltips:
o Tooltips appear when you hover over a data point.
o To format them, click Tooltip in the Marks card.
o You can add custom text, highlight certain fields, or change the font and color.
3. Formatting Lines and Borders:
o Go to the Format menu at the top.
o Select options like Borders, Shading, and Lines to adjust the style of gridlines,
reference lines, and cell borders.
4. Color Formatting:
o Drag a field (like Region) to the Color shelf in the Marks card to apply different
colors to different regions.
o Click on the Color legend to adjust the color scheme.
Calculated fields allow you to create new data fields based on existing data.
[Profit] / [Sales]
Step-by-Step Guide
1. Formatting Charts:
o Open a new sheet, drag Sales to Rows and Category to Columns.
o Apply formatting to the axis by right-clicking the Sales axis and selecting
Format.
o Add a tooltip by clicking on the Tooltip in the Marks card, customize the text.
2. Adding Filters:
o Drag Category to the Filters shelf, select the categories to include.
o Show the filter by right-clicking and selecting Show Filter.
o Try adding a filter for Sales and set a custom range for filtering high-value sales.
3. Creating Calculated Fields:
o Create a calculated field for Profit Ratio:
[Profit] / [Sales]
o Drag this new field to Rows to analyze the profitability across different
categories.
4. Defining Parameters:
o Create a parameter named Top N with a range of 1 to 10.
o Use this parameter in a calculated field to show only the top N categories based
on sales.
o Drag the calculated field to Filters and test the parameter's interaction.
EXPERIMENT 4
Components of a Dashboard
Key Components:
1. Worksheets:
o Individual visualizations (e.g., bar charts, line graphs) that you create on
separate sheets.
o These worksheets are combined to form a dashboard.
2. Text:
o You can add text boxes to include titles, subtitles, or explanations to your
dashboard.
3. Images:
o Images such as logos or icons can be inserted to enhance visual appeal or
branding.
4. Web Pages:
o You can embed external web pages within a dashboard using a URL object.
5. Containers:
o Horizontal Containers: Align multiple items in a row.
o Vertical Containers: Stack multiple items in a column.
6. Filters:
o Add interactive filters to control what data is displayed in the dashboard.
7. Legends:
o Add legends to explain the color, size, or shape encodings in the visualization.
8. Parameter Controls:
o Allow users to interactively change parameter values, which in turn updates the
visualizations.
Types of Containers:
1. Horizontal Container:
o Allows you to place worksheets or other elements side by side (in a row).
o Elements will expand or shrink horizontally as the dashboard size changes.
2. Vertical Container:
o Allows you to stack worksheets or other elements one on top of another (in a
column).
o Elements will expand or shrink vertically as the dashboard size changes.
Action filters in Tableau allow you to add interactivity to your dashboards by triggering
specific actions when users interact with the data. There are several types of action filters you
can apply:
1. Filter Action:
o Filters the data displayed in a dashboard or worksheet based on user interaction
(e.g., clicking on a chart).
o For example, clicking on a specific region in a map might filter the other charts
on the dashboard to show data only for that region.
2. Highlight Action:
o Highlights related data in one or more visualizations when the user hovers over
or selects data points in another view.
o For instance, selecting a product category in a bar chart could highlight that
same category in other charts.
3. URL Action:
o Opens a URL (web page) based on the selected data point.
o You can use this to direct users to a website that provides more information
about a specific data point.
4. Go to Sheet Action:
o Navigates from one dashboard or worksheet to another when a user clicks on a
data point.
o This is useful for creating more detailed drill-down reports.
1. Create a Dashboard:
o Add at least two worksheets to the dashboard (e.g., Sales by Region and Sales
by Product).
2. Add a Filter Action:
o Go to Dashboard > Actions in the top menu.
o Click Add Action and select Filter.
o Choose which worksheet triggers the action (e.g., clicking on Sales by Region)
and which worksheets will be filtered.
o Test the interaction by clicking on a region. The other charts should now update
based on the selected region.
3. Add a Highlight Action:
o Go to Dashboard > Actions, and add a Highlight Action.
o Choose the source worksheet and the target worksheet(s).
o Test the interaction by hovering over data points, and see related data points
highlighted in other views.
4. Add a URL Action:
o Go to Dashboard > Actions, and add a URL Action.
o Specify a URL, and configure it to use field values (like region names) as part
of the URL.
o Test it by clicking a data point to open a relevant web page.
Power BI is a business analytics tool by Microsoft that allows users to visualize and share
insights from data. It integrates with numerous data sources and can produce a wide range of
interactive reports and dashboards.
Power BI Components:
1. Power BI Desktop:
o The desktop application where data professionals build and design reports.
o Used for data connection, transformation, modeling, and visualization.
2. Power BI Service:
o A cloud-based platform where users publish reports created in Power BI
Desktop and share them with others.
o Users can interact with reports and dashboards via a web interface.
3. Power BI Mobile:
o A mobile app for interacting with dashboards and reports on mobile devices
(iOS, Android, Windows).
4. Power BI Gateway:
o A gateway used to connect Power BI to on-premises data sources for continuous
data refreshes in reports.
5. Power BI Report Server:
o An on-premises solution for hosting and sharing Power BI reports.
6. Power BI Embedded:
o A service that allows developers to embed Power BI reports and dashboards
into applications.
1. Data Connection:
o Connect to multiple data sources like Excel, SQL Server, Azure, SharePoint, or
Web APIs.
2. Data Transformation:
o Use the Power Query Editor to clean, filter, and transform raw data into a usable
format.
3. Data Modeling:
o Build relationships between tables, create calculated columns, and measures
using DAX (Data Analysis Expressions).
4. Report Creation:
o Use the data model to create interactive visualizations like bar charts, line
graphs, pie charts, maps, and more.
5. Report Publishing:
o Publish the report to the Power BI Service for sharing and collaboration with
others.
6. Dashboard Creation:
o Create dashboards by pinning visuals from reports and organizing them for
quick insights.
7. Sharing & Collaboration:
o Share the dashboards and reports with team members or clients, allowing them
to view and interact with the data.
Power BI Desktop has a user-friendly interface divided into five main areas that help users
create and organize reports efficiently.
Power BI’s Query Editor is a powerful tool that allows you to clean, transform, and shape your
data before it’s loaded into the Power BI data model.
1. Download a sample CSV file with data (e.g., sales data, product information, etc.).
2. Follow the steps above to load the data into Power BI.
3. Use the Transform Data option to open the Query Editor and start exploring the data.
You can connect Power BI to Excel files and import data directly from sheets or tables.
1. Use an Excel file with multiple sheets, such as one containing sales data and product
data.
2. Connect Power BI to the Excel file and select the sheets or tables you want to use.
3. If needed, use the Transform Data option to clean or modify the data before loading it
into the model.
Once the data is loaded into the Power Query Editor, you can clean and transform it to prepare
it for analysis.
Power BI offers a variety of chart types that help visualize data effectively. Here’s an overview
of commonly used charts and when to use them.
Types of Charts:
1. Bar Chart:
o Displays data in horizontal bars.
o Use for comparing different categories, such as sales across regions or products.
2. Column Chart:
o Similar to a bar chart, but the bars are vertical.
o Use for comparing values across different categories or time periods (e.g., sales
by month).
3. Line Chart:
o Displays trends over time by connecting data points with a line.
o Ideal for showing time series data like stock prices or monthly revenue.
4. Pie Chart:
o Displays data as slices of a pie, where each slice represents a portion of the
whole.
o Use for showing percentage distribution of categories (e.g., market share by
product).
5. Donut Chart:
o Similar to a pie chart, but with a hole in the middle.
o It serves the same purpose but offers a slightly different visual style.
6. Area Chart:
o Similar to a line chart but with the area under the line filled in.
o Useful for showing trends over time while also emphasizing the volume of data.
7. Scatter Chart:
o Plots data points based on two numerical axes (X and Y).
o Useful for showing relationships or correlations between variables (e.g., sales
vs. customer satisfaction).
8. Map:
o Displays data geographically.
o Use for visualizing spatial data (e.g., sales by region or country).
9. Treemap:
o Displays data in nested rectangles, with size representing value.
o Ideal for visualizing hierarchical data like product categories or company
departments.
10. Matrix:
o A tabular visualization similar to pivot tables in Excel.
o Use for showing detailed data with multiple dimensions and hierarchies.
Once you’ve created the charts, it’s important to format them to make the data visually
appealing and easy to interpret.
1. Adding a Title:
o Select the chart.
o In the right-hand Visualizations pane, go to the Format section (the paint roller
icon).
o Expand the Title section.
o Toggle the title to On and enter a custom title in the text box (e.g., "Sales by
Region" or "Profit Over Time").
o You can also adjust the font size, color, and alignment of the title.
2. Changing Colors:
o Select the chart.
o In the Format pane, expand the Data Colors section.
o Choose custom colors for your bars, lines, or pie slices. This can be useful for
aligning with your company’s brand or highlighting specific data points.
o You can assign colors by value or category (e.g., making negative values red
and positive values green).
3. Legend Customization:
o If your chart has a Legend (e.g., in pie charts or bar charts), expand the Legend
section in the Format pane.
o Turn the legend On/Off as needed and adjust its position (e.g., Top, Bottom,
Left, Right).
o You can also format the font size and color of the legend.
4. Data Labels:
o To make the values more readable on the chart, add Data Labels.
o In the Format pane, expand the Data Labels section and toggle it to On.
o You can customize the font, size, and positioning of the labels to fit the chart
design.
5. Axis Formatting:
o For charts with axes (like bar or line charts), you can format the axes by
expanding the X-Axis and Y-Axis sections.
o Customize the scale, font size, axis titles, and whether gridlines are displayed.
o For example, you can set the Y-Axis to display numbers as thousands (K) or
millions (M) to make the data more readable.
6. Background and Border:
o To make charts stand out, you can add a background color or border.
o Expand the Background and Border sections in the Format pane to customize
these elements.
7. Tooltips:
o Tooltips appear when you hover over data points and provide additional details.
o Expand the Tooltips section in the Format pane and customize what information
is displayed.
Filters in Power BI are a powerful way to slice and dice data in your reports and dashboards,
enabling users to focus on specific information based on various criteria.
1. Visual-Level Filters:
o These filters apply to a specific visual (chart, table, or graph) on the report page.
o Example: If you have a bar chart showing sales by region, you can add a filter
to show only certain regions in that chart.
2. Page-Level Filters:
o These filters apply to all visuals on a single report page.
o Example: Filtering the entire page to show data only for a particular year, such
as sales for 2023.
3. Report-Level Filters:
o These filters apply to all report pages within a report.
o Example: Applying a filter that shows only data for the "Electronics" product
category throughout the entire report.
4. Slicers:
o Slicers are visual elements (interactive controls) that act as filters. Users can
select values from slicers to filter data across visuals.
o Example: A slicer that allows users to filter by region or time period.
5. Drill-Through Filters:
o Drill-through filters let users right-click on a data point and navigate to a
detailed report page focused on that specific data.
o Example: You can drill through from a regional sales summary to a detailed
report for a specific region.
Once you’ve added visuals and filters to your dashboard, it’s essential to format them for
readability, consistency, and better user experience.
1. Arrange Visuals:
o Select multiple visuals and go to the Format tab.
o Use the Align options to align them horizontally or vertically.
o Use Distribute to evenly space out the visuals.
2. Add a Background Color:
o Select a visual (e.g., a pie chart) and go to the Format pane.
o Expand the Background section and choose a light background color to make
the visual stand out.
3. Apply a Custom Theme:
o Go to the View tab, select Themes, and choose a theme that matches your report
style.
o If needed, customize the theme by selecting Customize Current Theme and
adjusting the color scheme.
4. Add Data Labels:
o Select a Column Chart or Pie Chart and go to the Format pane.
o Expand the Data Labels section, toggle it to On, and format the labels to display
the exact values on the chart.
5. Add a Border to Visuals:
o Select a visual, go to the Format pane, and expand the Border section.
o Toggle the border to On and choose a color that makes the visual distinct on the
dashboard.
6. Create Custom Tooltips:
o Select a chart, go to the Format pane, and expand the Tooltip section.
o Customize what information is shown when a user hovers over a data point in
the chart.
7. Add Interaction Between Visuals:
o Click on one visual (e.g., a bar chart), and then go to the Format tab and select
Edit Interactions.
o Choose whether clicking on a bar filters, highlights, or has no effect on other
visuals.
EXPERIMENT 9 – ANALYSIS OF REVENUE IN SALES DATASET
IN TABLEAU
Objective: Use a choropleth map to identify states with the highest revenue.
Steps:
1. Load Data:
o Open Tableau Desktop and connect to your sales dataset.
2. Create a Choropleth Map:
o Drag the State field to the Rows shelf.
o Drag the Revenue field to the Color shelf.
o Tableau will automatically generate a map if State has geographical data. If not,
manually set the geographic role by right-clicking the State field, selecting
Geographic Role, and choosing State/Province.
3. Configure Map Settings:
o Click on the Color shelf and choose a color gradient to reflect revenue values
(e.g., lighter shades for lower revenue, darker shades for higher revenue).
o Adjust Map Layers by clicking on the Map menu and selecting Map Layers to
customize map details like zoom level and style.
4. Analyze Trends:
o The map will visually highlight states based on revenue, making it easy to spot
which states have the highest and lowest revenue.
Steps:
Objective: Bin the age measure into groups of 10 years to analyze revenue distribution.
Steps:
Objective: Visualize the percentage of revenue by region using a donut chart with zero access.
Steps:
Zero Axis = 0
o
Drag this calculated field to the Rows shelf next to the revenue.
o
Convert the pie chart to a donut chart by adding Zero Access to the Detail shelf
and then adjusting the size of the pie chart.
3. Format the Donut Chart:
o Click on the Color shelf to customize colors.
o Click on the Size shelf to adjust the inner radius to create the donut shape.
o Add labels to show percentages by dragging Revenue to the Label shelf and
choosing the percentage format.
Steps:
o Replace the Revenue field with Adjusted Revenue in the Columns shelf.
4. Format the Chart:
o Adjust colors in the Color shelf and customize the axis in the Format pane to
ensure the chart is clear and easy to interpret.
o Add a title like “Revenue Comparison by Gender and Product Category”.
Objective: Calculate and display average revenue per state, highlighting profitable and non-
profitable states.
Steps:
2. Create a Visualization:
o Drag the State field to the Rows shelf.
o Drag the Avg Revenue per State field to the Columns shelf.
3. Highlight Profitable vs. Non-Profitable States:
o Use Conditional Formatting to color-code states based on revenue thresholds.
o Click on the Color shelf, select Edit Colors, and set different colors for
profitable and non-profitable states.
Build a Dashboard
Objective: Combine the created visuals into a cohesive and interactive dashboard.
Steps:
1. Create a New Dashboard:
o Click on the Dashboard menu and select New Dashboard.
2. Add Visuals:
o Drag and drop all the created worksheets (choropleth map, line chart, age bins
chart, donut chart, butterfly chart, and revenue table) onto the dashboard.
3. Configure Interactivity:
o Use Dashboard Actions to set up interactions between visuals (e.g., clicking on
a map to filter the line chart).
o Go to the Dashboard menu, select Actions, and set up filter actions.
4. Add Filters and Controls:
o Add Filters and Parameters as needed to allow users to interact with the
dashboard.
o Drag Filter or Parameter Control onto the dashboard and configure it to control
multiple visuals.
5. Format the Dashboard:
o Adjust layout and sizing to ensure all visuals fit well on the dashboard.
o Add titles, descriptions, and legends to enhance clarity.
6. Publish the Dashboard:
o Save your work and publish the dashboard to Tableau Server or Tableau Public.
IN POWERBI:
Objective: Use a choropleth map to identify states with the highest revenue.
Steps:
1. Load Data:
o Open Power BI Desktop and load your sales dataset.
2. Create a Choropleth Map:
o Go to the Visualizations pane and select the Map visual.
o Drag the State field to the Location field well.
o Drag the Revenue field to the Values field well.
3. Configure Map Settings:
o In the Format pane, expand the Data Colors section.
o Choose a color gradient to fill the map based on revenue values (e.g., lighter
colors for lower revenue, darker for higher).
o Adjust other settings like Zoom and Map Style as needed.
4. Analyze Trends:
o The map will visually display revenue distribution across states, with states
having higher revenue highlighted more prominently.
Steps:
1. Create a Line Chart:
o Select the Line Chart visual from the Visualizations pane.
o Drag the Order Date field to the Axis field well.
o Drag the Revenue field to the Values field well.
2. Configure the Axis:
o Ensure that the Order Date is set to display by month. This can be adjusted by
clicking on the Date Hierarchy and selecting Month.
3. Format the Chart:
o In the Format pane, adjust the X-Axis and Y-Axis settings for readability.
o Add a title like “Monthly Revenue Trends” in the Title section.
Objective: Bin the age measure into groups of 10 years to analyze revenue distribution.
Steps:
Objective: Visualize the percentage of revenue by region using a donut chart with zero access.
Steps:
o
Add this measure to the Values field well of the donut chart.
3. Format the Donut Chart:
o Set the Inner Radius to create a donut shape (adjust in the Format pane).
o Add a title and customize the Data Labels to display percentages.
Create a Butterfly Chart to Compare Female & Male Revenue
Objective: Compare revenue for female and male customers by product category using a
butterfly chart.
Steps:
Objective: Calculate and display average revenue per state, highlighting profitable and non-
profitable states.
Steps:
2. Create a Visualization:
o Create a table or chart visual.
o Drag the State field to the Rows field well.
o Add the Avg Revenue per State measure to the Values field well.
3. Highlight Profitable vs. Non-Profitable States:
o Use conditional formatting to highlight states with revenue above or below a
certain threshold.
o Customize the visual to display which states are profitable and which are not.
Build a Dashboard
Objective: Combine the created visuals into a cohesive and interactive dashboard.
Steps:
1. Arrange Visuals:
o Add all created visuals (choropleth map, line chart, age bins chart, donut chart,
butterfly chart, and revenue table) to the report canvas.
2. Configure Interactions:
o Ensure that interactions between visuals are set up correctly.
o Go to Format tab and select Edit Interactions to adjust how filtering one visual
affects others.
3. Add Filters and Slicers:
o Add slicers for key dimensions like Year, Region, and Product Category.
o Position them on the dashboard to allow users to interact with the data.
4. Format the Dashboard:
o Ensure consistent formatting for a professional look.
o Add titles and descriptions where needed to provide context for each visual.
5. Publish the Dashboard:
o Click the Publish button to share the dashboard with others via Power BI
Service.
Objective: Plot countries on a map using latitude and longitude, and label them with their
names.
Steps:
1. Load Data:
o Open Tableau Desktop and connect to your GDP dataset.
2. Create a Symbol Map:
o Drag Latitude to the Rows shelf.
o Drag Longitude to the Columns shelf.
o Tableau will automatically generate a map if the latitude and longitude fields
are recognized. If not, manually set geographic roles by right-clicking on
Latitude and Longitude fields and assigning them to Latitude and Longitude
roles.
3. Add Country Names:
o Drag the Country Name field to the Label shelf to display country names on the
map.
4. Format the Map:
o Click on the Map menu and select Map Layers to adjust map styles, zoom levels,
and other settings.
o Customize the symbol size and color as needed by adjusting the Size and Color
shelves.
Create a Bar Graph to Compare GDP of Belgium (2006 – 2026)
Objective: Create a bar graph to visualize Belgium's GDP over the specified years.
Steps:
Objective: Use a pie chart to show the GDP distribution for specific countries in the year 2010.
Steps:
Steps:
Objective: Compare GDP of Mexico, Algeria, Fiji, and Estonia from 2004 to 2006 using a
scatter plot or circle view.
Steps:
Steps:
IN POWER BI
Visualize Countries Data Using Symbol Maps
Objective: Plot countries on a map using latitude and longitude, and label them with their
names.
Steps:
1. Load Data:
o Open Power BI Desktop and import your GDP dataset.
2. Create a Symbol Map:
o In the Visualizations pane, select the Map visual.
o Drag the Latitude field to the Latitude field well.
o Drag the Longitude field to the Longitude field well.
o Drag the Country Name field to the Location field well.
3. Configure Map Settings:
o In the Format pane, expand the Data Colors section to choose colors for your
data points.
o Adjust the Bubble Size and Map Style to improve map readability.
4. Add Labels:
o Drag the Country Name field to the Tooltips field well to show country names
when hovering over data points.
Steps:
Steps:
Steps:
Objective: Compare the GDP of Mexico, Algeria, Fiji, and Estonia from 2004 to 2006.
Steps:
Steps:
Create KPIs: Employee Count, Attrition Count, Attrition Rate, Active Employees, and Average
Age
Steps:
1. Employee Count:
o Drag Employee ID (or Employee Count field if available) into Text on the
Marks Card.
o In the Data Pane, right-click on the field and choose Measure > Count.
o This will give you the total number of employees.
2. Attrition Count:
o Drag the Attrition field (assuming it has Yes/No values) into Filters and choose
Yes.
o Drag Employee ID to Text on the Marks Card.
o Change Measure to Count.
3. Attrition Rate:
o Create a Calculated Field by right-clicking the Data Pane and selecting Create
Calculated Field.
o Name it Attrition Rate and enter the following formula:
Steps:
Steps:
Steps:
Create a Highlight Table for Job Satisfaction Rating Based on Employee Count
Steps:
Steps:
Create Multiple Donut Charts for Attrition Rate by Gender for Different Age Groups
Steps:
1. Create an Age Group if it hasn't been done already (see step 4 for age bin creation).
2. Drag Gender to Columns.
3. Drag Attrition to Filters and select Yes.
4. Drag Age Group to Rows to display different donut charts for each age group.
5. To create the donut effect:
o Create two pie charts (duplicate the first one).
o Adjust the second pie chart by removing the inner part using Dual Axis and
reducing the size of the second circle (thus creating a hollow center for a donut).
6. Drag Attrition to Angle.
7. Drag Attrition to Label and show the Percent for each gender and age group
combination.
8. Format the charts:
o Synchronize axes, customize colors, and format labels to display attrition rates
clearly.
IN POWER BI:
Creating KPIs: Employee Count, Attrition Count, Attrition Rate, Active Employees, and
Average Age
Steps:
1. Employee Count:
o Go to the Report View in Power BI.
o Drag the Employee ID field into the Visualizations Pane and use the Card
Visualization to display the total count.
o The Card automatically displays the count of employees.
2. Attrition Count:
o Use the Attrition field (assuming it has Yes/No values) in the Visualizations
Pane.
o Apply a filter to show only Attrition = Yes.
o Drag Employee ID to the Card Visualization to count how many employees
have left (attrition count).
3. Attrition Rate:
o Create a New Measure by right-clicking on the dataset in the Fields Pane and
selecting New Measure.
o Use the following DAX formula:
Note: Power BI doesn't have a native lollipop chart, but you can approximate it with a
combination of bar and scatter charts.
Steps:
Steps:
Steps:
Steps:
Steps:
Create Multiple Donut Charts for Attrition Rate by Gender and Age Group
Steps:
1. Load Data:
o Open Tableau and connect to the Amazon Prime dataset.
2. Create a Donut Chart:
o Drag the Type field (i.e., Movie or TV Show) to the Rows shelf.
o Drag Type to the Columns shelf as well to create the first pie chart.
o Drag the Number of Records field to the Angle shelf.
o Convert the chart to a Pie Chart from the Marks dropdown.
3. Create the Donut Effect:
o Duplicate the Number of Records pill on the Rows shelf to create two identical
pie charts.
o Right-click on the SUM(Number of Records) in the Marks card for one of the
pie charts and change it to Circle.
o Reduce the size of the circle to create a hole, forming the donut chart.
4. Add Labels:
o Drag the Type field to the Label shelf and the Number of Records to show the
percentages.
o Set the percentage calculation by clicking on the Number of Records pill and
selecting Quick Table Calculation -> Percent of Total.
5. Format the Donut Chart:
o Customize the colors by dragging Type to the Color shelf.
o Adjust the Labels to display both the percentage and the type (Movies or TV
Shows).
Objective: Display the number of movies and TV shows released each year, broken down by
type.
Steps:
Objective: Display the top 10 most frequent genres on Amazon Prime as a horizontal bar chart.
Steps:
1. Create a Bar Chart:
o Drag the Genre field to the Rows shelf.
o Drag Number of Records to the Columns shelf.
2. Sort the Data:
o Right-click on the Number of Records axis and select Sort -> Descending.
3. Filter for Top 10:
o Click on the Genre field, choose Filter, then select Top. Choose to show the Top
10 genres by Sum(Number of Records).
4. Format the Horizontal Bar Chart:
o Adjust the Bars in the Format pane for better visualization.
o Add a title like “Top 10 Genres on Amazon Prime.”
o Drag the Genre field to the Color shelf for better distinction between genres.
Objective: Use a map to visualize the total number of movies and TV shows produced in each
country.
Steps:
1. Create a Map:
o Drag the Country field to the Rows shelf.
o Tableau will automatically generate a map. If the geographic roles for Country
are not recognized, right-click on Country and assign the geographic role of
Country.
2. Add the Total Number of Shows:
o Drag the Number of Records field to the Size shelf to adjust the size of the data
points on the map.
o Drag the Number of Records field to the Color shelf to color the map by the
number of shows.
3. Format the Map:
o In the Format pane, adjust the Map Layers (found in the Map menu) for map
styling.
o Add a title like “Total Movies and TV Shows by Country.”
Objective: Create a text visualization that displays the description of a selected movie.
Steps:
Steps:
IN POWER BI:
Steps:
1. Load Data:
o Open Power BI Desktop and import your Amazon Prime dataset.
2. Create a Donut Chart:
o In the Visualizations pane, select the Donut Chart.
o Drag the Type field (containing “Movie” and “TV Show”) to the Legend.
o Drag the Count of Type to the Values.
3. Format the Donut Chart:
o Use the Format pane to adjust the Data Labels to show both the count and
percentage of total.
o Customize the Colors to differentiate Movies and TV Shows.
o Add a title like “Percentage of Movies and TV Shows.”
Objective: Visualize the number of Movies and TV Shows released each year, broken down
by type.
Steps:
Steps:
Objective: Use a map to visualize the total number of movies and TV shows produced by each
country.
Steps:
1. Create a Map:
o In the Visualizations pane, select the Map visual.
o Drag the Country field to the Location bucket.
o Drag the Number of Records to the Size and Color buckets to size and color the
data points based on the number of shows.
2. Format the Map:
o Adjust the map styling in the Format pane (like Map Styles and Data Colors).
o Add a title like “Total Shows by Country.”
Steps:
Steps: