0% found this document useful (0 votes)
127 views

8499 Ecap794 Advance Data Visualization

The document is an educational resource on Advanced Data Visualization, edited by Dr. Ajay Bansal, covering various aspects of data visualization including tools like Tableau, types of data, and effective visualization techniques. It emphasizes the importance of data visualization in making data accessible and understandable for decision-making across different fields. The content is structured into units that guide readers through the fundamentals and advanced concepts of data visualization.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
127 views

8499 Ecap794 Advance Data Visualization

The document is an educational resource on Advanced Data Visualization, edited by Dr. Ajay Bansal, covering various aspects of data visualization including tools like Tableau, types of data, and effective visualization techniques. It emphasizes the importance of data visualization in making data accessible and understandable for decision-making across different fields. The content is structured into units that guide readers through the fundamentals and advanced concepts of data visualization.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 256

Advance Data Visualization

ECAP794

Edited by
Dr. Ajay Bansal
Advance Data Visualization
Edited By:
Dr. Ajay Bansal
Content

Unit 1: Introduction to Data Visualization 1


Dr. Pritpal Singh, Lovely Professional University
Unit 2: Introduction to Tableau 13
Dr. Pritpal Singh, Lovely Professional University
Unit 3: Tableau Data Sources 28
Dr. Pritpal Singh, Lovely Professional University
Unit 4: Basic Visualizations 46
Dr. Pritpal Singh, Lovely Professional University
Unit 5: Creation of Hierarchies 68
Dr. Pritpal Singh, Lovely Professional University
Unit 6: Advance Data Visualization/Graph 85
Dr. Pritpal Singh, Lovely Professional University
Unit 7: Building View Advance Map Option 104
Dr. Pritpal Singh, Lovely Professional University
Unit 8: Tableau Calculations & Filters 128
Dr. Pritpal Singh, Lovely Professional University
Unit 9: Advance Data Visualization 145
Dr. Pritpal Singh, Lovely Professional University
Unit 10: Making Comparisons and Basic Calculation 161
Dr. Pritpal Singh, Lovely Professional University
Unit 11: Advance Calculation 177
Dr. Pritpal Singh, Lovely Professional University
Unit 12: Analytical Topic/Capability 193
Dr. Pritpal Singh, Lovely Professional University
Unit 13: Interactive Dashboard Tableau 219
Dr. Pritpal Singh, Lovely Professional University
Unit 14: Sharing your Dashboard 237
Dr. Pritpal Singh, Lovely Professional University
Notes
Dr. Pritpal Singh, Lovely Professional University Unit 01: Introduction to Data Visualization

Unit 01: Introduction to Data Visualization


CONTENTS
Objectives
Introduction
1.1 Data Visualization
1.2 Keys Factors of Data Visualization
1.3 Data Visualization Tools and Type Of Data
Summary
Keywords
Self Assessment
Answers for Self Assessment
Review Questions
Further Readings

Objectives
After studying this unit, you will be able to:

 Understand data visualization.


 Analyze tools of data visualization.
 Analyze data using tableau.

Introduction
In our increasingly data-driven world, it’s more important than ever to have accessible ways to
view and understand data. After all, the demand for data skills in employees is steadily increasing
each year. Employees and business owners at every level need to have an understanding of data
and of its impact.
That’s where data visualization comes in handy. With the goal of making data more accessible and
understandable, data visualization in the form of dashboards is the go-to tool for many businesses
to analyze and share information.

1.1 Data Visualization


Data visualization is the graphical representation of information and data. By using visual elements
like charts, graphs, and maps, data visualization tools provide an accessible way to see and
understand trends, outliers, and patterns in data. Additionally, it provides an excellent way for
employees or business owners to present data to non-technical audiences without confusion.
Data visualization is the practice of translating information into a visual context, such as a map or
graph, to make data easier for the human brain to understand and pull insights from. The main
goal of data visualization is to make it easier to identify patterns, trends and outliers in large data
sets. The term is often used interchangeably with others, including information graphics,
information visualization and statistical graphics.
Data visualization is one of the steps of the data science process, which states that after data has
been collected, processed, and modeled, it must be visualized for conclusions to be made. Data
visualization is also an element of the broader data presentation architecture (DPA) discipline,

LOVELY PROFESSIONAL UNIVERSITY 1


Notes

Advance Data Visualization

which aims to identify, locate, manipulate, format and deliver data in the most efficient way
possible.
Data visualization is important for almost every career. It can be used by teachers to display
student test results, by computer scientists exploring advancements in artificial intelligence (AI) or
by executives looking to share information with stakeholders. It also plays an important role in big
data projects. As businesses accumulated massive collections of data during the early years of the
big data trend, they needed a way to get an overview of their data quickly and easily. Visualization
tools were a natural fit.
Visualization is central to advanced analytics for similar reasons. When a data scientist is writing
advanced predictive analytics or machine learning (ML) algorithms, it becomes important to
visualize the outputs to monitor results and ensure that models are performing as intended. This is
because visualizations of complex algorithms are generally easier to interpret than numerical
outputs.

Why is data visualization important?


Data visualization provides a quick and effective way to communicate information in a universal
manner using visual information. The practice can also help businesses identify which factors affect
customer behavior; pinpoint areas that need to be improved or need more attention; make data
more memorable for stakeholders; understand when and where to place specific products; and
predict sales volumes.

Other benefits of data visualization include the following:

 the ability to absorb information quickly, improve insights and make faster decisions.
 an increased understanding of the next steps that must be taken to improve the
organization.
 an improved ability to maintain the audience's interest with information they can
understand.
 an easy distribution of information that increases the opportunity to share insights with
everyone involved.
 eliminate the need for data scientists since data is more accessible and understandable; and
 an increased ability to act on findings quickly and, therefore, achieve success with greater
speed and less mistakes.

1.2 Keys Factors of Data Visualization


Data visualization is a crucial part of data analytics that helps you visualize your data and uncover
significant trends and patterns that would otherwise have been lost. Effective data visualization
depends on your software as nobody has the time to code the visualizations themselves with loads
of data involved in the process.
Several data visualization tools, such as Oracle Visual Builder Cloud Service (VBCS), Tableau,
Power BI, etc., have comparable features and capabilities, making selecting the right tool for your
needs even more challenging. So, what are the factors to be considered in choosing the right data
visualization solution for your use case?

Let us talk deep on it. Here are the main specifics.

1. Dashboard Design
It is important to check on the right balance between the simplicity and complexity of a dashboard
when it comes to enterprise reporting. While simpler designs may be easy to use, they may not be
able to pack in much helpful information. However, complex dashboards could clutter your screen
and make it difficult to understand the data right in front of your eyes. If you’re not an expert and

2 LOVELY PROFESSIONAL UNIVERSITY


Notes
Unit 01: Introduction to Data Visualization

don’t know much about dashboard design, know that the dashboard must have balanced colors
naturally appealing to the eye. It is intuitive to have colorful highlights between appropriate white
spaces. Too much white space could over-simplify the design, while too much color could affect
usability. Modern tools like Oracle Visual Builder Cloud Service strike a balance between simplicity
and complexity and avoid highly complex designs even if they could deliver much more
information in a compact setting.

2. Use Case
Different use cases demand different types of dashboards. For example, a simple use-case like the
real-time analytics of a store will be very different from a more complex use-case like viewing stock
market reports. It’s a great way to personalize your data visualization, and several modern
Analytics & BI Applications like Oracle Visual Builder Cloud Service offer this feature. Not only is
the solution tailored to your needs, but it also provides an enhanced user experience.

3. Data Connectivity
Data is key to your visualization; poor data integration or missing data can have a considerable
impact. Business data is the primary input for a data visualization tool, so ensuring that the right
data sources are connected to the tool is of paramount importance. Data is often pulled from
multiple dynamic sources, so it needs to be up-to-date for your visualizations to stay relevant. The
ability to connect and integrate with other data sources is a critical factor in enabling effective data
visualization.

4. Target Audience
Data visualizations often convey information to users who don’t fully understand the application
or the process. They could include line-of-business users, external users, and other stakeholders.
They only need access to the data relevant to their role in the organization. The ability of data
visualization tools like Oracle VBCS to adapt according to the audience plays a key role. So, ensure
the tool is specific to the target audience and provides role-based user access.

5. Functionality
Keeping the data visualization tool’s functionality aligned with your organization’s needs is crucial.
Business leaders often consider going for the software packed with the most number of features or
with greater functionality, when in reality, they only require a fraction of these capabilities. Not
only does it increase complexity, but it also drives up costs and impacts your ability to use it for its
true purpose. Ultimately, you’re left with too many features you don’t need and will never use.
Focus on acquiring the functionality your organization truly needs instead of fancy features, and
you can keep adding more functionality as your business grows. Oracle VBCS allows you to add
features based on your evolving needs.

1.3 Data Visualization Tools and Type Of Data


Data visualization tools are cloud-based applications that help you to represent raw data in easy to
understand graphical formats. You can use these programs to produce customizable bar charts, pie
charts, column charts, and more.
Following is a handpicked list of Top Data Visualization Tool with their popular features and
website links. The list contains both open-source(free) and commercial(paid) software.
Followings are some popular data visualization tools
1) Zoho Analytics
Zoho Analytics is a robust and versatile data visualization tool. It allows users to create insightful
reports and dashboards, and visually analyze any data in minutes. It features an AI powered
assistant that enables users to ask questions and get intelligent answers in the form of meaningful
reports.

LOVELY PROFESSIONAL UNIVERSITY 3


Notes

Advance Data Visualization

2) Power BI
Power BI is a Business Intelligence and Data Visualization tool which helps you to convert data
from various data sources into interactive dashboards and reports. It provides multiple software
connectors and services.

3) Whatagraph
Whatagraph is a data visualization tool that enables you to monitor and compare the performance
of multiple campaigns. This application allows you to transfer custom data from Google sheet and
API.

4) Tableau
Tableau is a robust tool for visualizing data in a better way. You can connect any database to create
understandable visuals. It is one of the best visualization tools that enables you to share
visualization with other people.

5) Qlik
Qlik is a data visualization software which is used for converting raw data into knowledge. This
software acts like a human brain which works on “association” and can go into any direction to
search the answers.

6) Adaptive Insights
Adaptive Insights is a data visualization tool built to boost your business. It is one of the best data
visualisation tools that helps you to plan, budget, as well as forecast to make better decisions.

4 LOVELY PROFESSIONAL UNIVERSITY


Notes
Unit 01: Introduction to Data Visualization

7) Dundas BI
Dundas BI is an enterprise-ready Business Intelligence platform. You can deploy it as the central
data portal for your company or integrate into any website.

8) Domo
Domo is a cloud platform that helps you to conduct analysis and create interactive visualization. It
enables you to examine important data using graphs and pie charts. This app helps you to simplify
administration data.

9) Cluvio
Cluvio is a platform that enables you to run SQL queries for your database. It allows you to
visualize the result in a better and understandable way.

10) Datawrapper
Datawrapper is an open-source tool that enables you to create interactive charts. You can load CSV
(Comma-separated Values data files into this app and embed maps onto your website.

Types of Data
The data is classified into majorly four categories:

LOVELY PROFESSIONAL UNIVERSITY 5


Notes

Advance Data Visualization

1. Nominal data
2. Ordinal data
3. Discrete data
4. Continuous data
Further, we can classify these data as follows:

Qualitative or Categorical Data


Qualitative data, also known as the categorical data, describes the data that fits into the categories.
Qualitative data are not numerical. The categorical information involves categorical variables that
describe the features such as a person’s gender, home town etc. Categorical measures are defined in
terms of natural language specifications, but not in terms of numbers.
Sometimes categorical data can hold numerical values (quantitative value), but those values do not
have a mathematical sense. Examples of the categorical data are birthdate, favourite sport, school
postcode. Here, the birthdate and school postcode hold the quantitative value, but it does not give
numerical meaning.

Nominal Data
Nominal data is one of the types of qualitative information which helps to label the variables
without providing the numerical value. Nominal data is also called the nominal scale. It cannot be
ordered and measured. But sometimes, the data can be qualitative and quantitative. Examples of
nominal data are letters, symbols, words, gender etc.
The nominal data are examined using the grouping method. In this method, the data are grouped
into categories, and then the frequency or the percentage of the data can be calculated. These data
are visually represented using the pie charts.

Ordinal Data
Ordinal data/variable is a type of data that follows a natural order. The significant feature of the
nominal data is that the difference between the data values is not determined. This variable is
mostly found in surveys, finance, economics, questionnaires, and so on.
The ordinal data is commonly represented using a bar chart. These data are investigated and
interpreted through many visualisation tools. The information may be expressed using tables in
which each row in the table shows a distinct category.

Quantitative or Numerical Data


Quantitative data is also known as numerical data which represents the numerical value (i.e., how
much, how often, how many). Numerical data gives information about the quantities of a specific
thing. Some examples of numerical data are height, length, size, weight, and so on. Quantitative

6 LOVELY PROFESSIONAL UNIVERSITY


Notes
Unit 01: Introduction to Data Visualization

data can be classified into two different types based on the data sets. The two different
classifications of numerical data are discrete data and continuous data.

Discrete Data
Discrete data can take only discrete values. Discrete information contains only a finite number of
possible values. Those values cannot be subdivided meaningfully. Here, things can be counted in
whole numbers.

Example: Number of students in the class

Continuous Data
Continuous data is data that can be calculated. It has an infinite number of probable values that can
be selected within a given specific range.

Example: Temperature range

Summary
 Data visualization is the representation of data through use of common graphics, such as
charts, plots, infographics, and even animations. These visual displays of information
communicate complex data relationships and data-driven insights in a way that is easy to
understand.
 Data visualizations are used to discover unknown facts and trends. You can see
visualizations in the form of line charts to display change over time. Bar and column charts
are useful for observing relationships and making comparisons. A pie chart is a great way to
show parts of a whole. And maps are the best way to share geographical data visually.
 To craft an effective data visualization, you need to start with clean data that is well-sourced
and complete. After the data is ready to visualize, you need to pick the right chart.

Keywords
Data: In computing, data is information that has been translated into a form that is efficient for
movement or processing.
Data Visualization: Data and information visualization is an interdisciplinary field that deals with
the graphic representation of data and information.
Charts: A data chart is a type of diagram or graph, that organizes and represents a set of numerical
or qualitative data. Maps that are adorned with extra information (map surround) for a specific
purpose are often known as charts, such as a nautical chart or aeronautical chart, typically spread
over several map sheets.
Data analysis: Data Analysis. Data Analysis is the process of systematically applying statistical
and/or logical techniques to describe and illustrate, condense and recap, and evaluate data.

SelfAssessment
1. What is true about Data Visualization?
A. Data Visualization is used to communicate information clearly and efficiently to users by the
usage of information graphics such as tables and charts.
B. Data Visualization helps users in analyzing a large amount of data in a simpler way.
C. Data Visualization makes complex data more accessible, understandable, and usable.

LOVELY PROFESSIONAL UNIVERSITY 7


Notes

Advance Data Visualization

D. All of the above

2. Which are pros of data visualization?


A. It can be accessed quickly by a wider audience.
B. It can misrepresent information
C. It can be distracting
D. None Of the above

3. Data can be visualized using?


A. graphs
B. charts
C. maps
D. All of the above

4. Which are cons of data visualization?


A. It conveys a lot of information in a small space.
B. It makes your report more visually appealing.
C. visual data is distorted or excessively used.
D. None Of the above

5. Which of the following is not a data visualization tool?


A. Tablue
B. Cluvio
C. Microsoft Word
D. Domo

6. Data visualization is also an element of the broader _____________.


A. deliver presentation architecture
B. data presentation architecture
C. dataset presentation architecture
D. data process architecture

7. Which of the intricate techniques is not used for data visualization?


A. Bullet Graphs
B. Bubble Clouds
C. Fever Maps
D. Heat Maps

8. Which method shows hierarchical data in a nested format?


A. Treemaps
B. Scatter plots
C. Population pyramids
D. Area charts

9. Which one of the following is most basic and commonly used techniques?
A. Line charts
B. Scatter plots
C. Population pyramids
D. Area charts

10. The best feature Tableau are except_____________-


A. Collaboration of data

8 LOVELY PROFESSIONAL UNIVERSITY


Notes
Unit 01: Introduction to Data Visualization

B. Data Blending
C. Real time analysis
D. Data is more small and fit

11. Where can we apply global filters?


A. Dashboards
B. Stories
C. Sheets
D. All of the above

12. __________ is the representation of data through use of common graphics, such as charts,
plots, infographics, and even animations.
A. Data visualization
B. Data
C. Tablue
D. None of above

13. Who is the parent company of Tableau?


A. Salesforce
B. Workday
C. Microsoft
D. Google

14. What are the file extensions in Tableau ?


A. Tableau Packaged Workbook (.twbx)
B. Tableau Data Source(.tds)
C. Tableau Workbook (.twb)
D. All of the above

15. Power BI is a product of_______________


A. Facebook
B. Oracle
C. Microsoft
D. SAP

Answers for SelfAssessment


l. D 2. A 3. D 4. C 5. A

6. B 7. C 8. A 9. A 10. D

11. D 12. A 13. A 14. D 15. C

Review Questions
1. What do you mean by data visualization?
2. Explain the need for data visualization tools in now’s industry.
3. What is the difference between data and data visualization?
4. Explain Types of Data Visualizations Elements.
5. What do you mean by data visualization tools? Explain with an example.

LOVELY PROFESSIONAL UNIVERSITY 9


Notes

Advance Data Visualization

Further Readings
Communication Data with Tableau, Ben Jones, O’ Reilly Publications

Web Links
https://www.tableau.com/
https://www.datacamp.com/tutorial/data-visualisation-tableau

10 LOVELY PROFESSIONAL UNIVERSITY


Notes
Unit 01: Introduction to Data Visualization

LOVELY PROFESSIONAL UNIVERSITY 11


Notes

Advance Data Visualization

12 LOVELY PROFESSIONAL UNIVERSITY


Notes

Dr. Pritpal Singh, Lovely Professional University Unit 02: Introduction to TABLEAU

Unit 02: Introduction to TABLEAU


CONTENTS
Objectives
Introduction
2.1 Usage of Tableau Software
2.2 Why Tableau?
2.3 Features of Tableau
2.4 Tableau Product Suite
2.5 Installation Steps
2.6 Configure Tableau Server for a Forward Proxy
Summary
Keywords
Self Assessment
Answers for Self Assessment
Review Question
Further Readings

Objectives
After studying this unit, you will be able to:

• Understand concept of data visualization.


• install software for data visualization.
• Understandreal time analysis.
• Collaboration with data.

Introduction
Tableau is an excellent data visualization and business intelligence tool used for reporting and
analyzing vast volumes of data. It is an American company that started in 2003—in June 2019,
Salesforce acquired Tableau. It helps users create different charts, graphs, maps, dashboards, and
stories for visualizing and analyzing data, to help in making business decisions. Tableau has a lot of
unique, exciting features that make it one of the most popular tools in business intelligence (BI).
Let’s learn more about some of the essential Tableau Desktop features. Now that we know what is
tableau exactly, let us understand some of its salient features.
Tableau is capable of connecting with a wide range of data sources. It can connect to files present in
your system, such as Microsoft Excel, text files, JSON, PDF, etc. It can also work on data present on
a database server, such as Microsoft SQL Server, MySQL, Oracle, Teradata, etc. There are other
saved data sources that Tableau can connect with. It also can connect and fetch data from cloud
sources, like AWS, Azure SQL Data Warehouse, and Google Cloud SQL.
Tableau Uses:

2.1 Usage of Tableau Software


The best features of Tableau software are

LOVELY PROFESSIONAL UNIVERSITY 13


Notes
Advance Data Visualisation

Data Blending
Real time analysis
Collaboration of data
The great thing about Tableau software is that it doesn’t require any technical or any kind of
programming skills to operate. The tool has garnered interest among the people from all sectors
such as business, research.
Tableau is a powerful and fastest growing data visualization tool used in the Business Intelligence
Industry. It helps in simplifying raw data in a very easily understandable format. Tableau helps
create the data that can be understood by professionals at any level in an organization. It also
allows non-technical users to create customized dashboards.
Data analysis is very fast with Tableau tool and the visualizations created are in the form of
dashboards archers, different industries, etc.

Business Intelligence
Data Visualization
Data Blending
Data Collaboration
Query translation into visualization
To create no-code data queries
Real-time data analysis
To manage large size metadata
To import large size of data

2.2 Why Tableau?


Why use Tableau software when there are a whole lot of tools available to perform data
visualization?
Tableau is greatly used because data can be analyzed very quickly with it. Also, visualizations are
generated as dashboards and worksheets. Tableau allows one to create dashboards that provide
actionable insights and drive the business forward. Tableau products always operate in virtualized
environments when they are configured with the proper underlying operating system and
hardware. Tableau is used by data scientists to explore data with limitless visual analytics.

2.3 Features of Tableau


• Tableau Dashboard
• Collaboration and Sharing

14 LOVELY PROFESSIONAL UNIVERSITY


Notes

Unit 02: Introduction to TABLEAU

• Live and In-memory Data


• Data Sources in Tableau
• Advanced Visualizations
• Mobile View
• Revision History
• Licensing Views
• Subscribe others
• ETL Refresh and many more make Tableau one of the most famous Data Visualization
tools.

What is Data Visualization in Tableau?


Data Visualization is a pictorial representation of a dataset or information using maps, graphs,
charts, and other visual elements. Data Visualization helps in easy understanding of the trend,
insights, patterns, and other connections in a Dataset. Tableau is one of the most popular Data
Visualization tools used by many enterprises and businesses to gain better insights into their data
to offer the best customer experience.

How does Tableau work?


The major work of Tableau software is to connect and extract the data stored in various places. It
can pull data from any platform. Tableau can extract data from any database, be it Excel, PDF,
Oracle, or even Amazon Web Services.
Once Tableau is launched, ready data connectors are available which allow you to connect to any
database.
The data extracted can be connected live to the Tableau data engine, Tableau Desktop. This is
where a Data Analyst or a Data Engineer works with the data that was pulled up and develop
visualization. The created dashboards are shared with users in the form of static files. The users
receiving dashboards view the files using Tableau Reader.
The data extracted from Tableau Desktop can be published to Tableau Server, which is an
enterprise platform where collaboration, distribution, governance, security model, and automation
features are supported. Using Tableau Server, end users can access the files from all locations, be it
a desktop or a mobile phone.

How Does Tableau Work How Does Tableau Work


Gartner Magic Quadrant for Business Intelligence and Analytics Platforms

Following are the two ways in which Data Analytics of Tableau can be described:
Developer Tools: Tools used in development, like designing charts, dashboards, reports, and
visualizations, come under this category. The major Tableau products in this category are Tableau
Public and Tableau Desktop.
Sharing Tools: By the name, you would have understood what these tools do. Well, they are used
for sharing reports, visualizations, and dashboards which are created using the developer tools.
The main products that fall in this category are Tableau Online, Tableau Reader, and Tableau
Server.

LOVELY PROFESSIONAL UNIVERSITY 15


Notes
Advance Data Visualisation

2.4 Tableau Product Suite

What is Tableau Desktop?


This product allows one to code and modifies the reports. Starting from creating reports and charts
to combining them to form a dashboard, all this work is done in Tableau Desktop.
Tableau Desktop is classified into the following according to connectivity and data sources:

Tableau Desktop Personal


The development features of the Tableau Desktop Personal version are close enough to that of the
Tableau Desktop. In this particular version, the workbook is in private mode and the access is
limited. That means, these workbooks can’t be posted and are for personal use only. Therefore, they
have to be divided either on Tableau Public or Offline.
Tableau Desktop Professional
This version is very much like Tableau Desktop, only that the work generated or created in Tableau
Desktop is published on the Tableau Server. In this version, there would be full access to all sorts of
data types. It is great for people who wish to publish their work on the Tableau Server.

What is Tableau Reader?


It is a tool that allows one to view visualizations and workbooks generated using Tableau Public or
Tableau Desktop. This data can easily be filtered, yet modifications are limited. Since anyone
getting the workbook can view it using Tableau Reader, there is no security.

What is Tableau Server?


This is mainly used to share visualizations and workbooks which get generated in the Tableau
Desktop application throughout the organization. The work will become accessible once it is
uploaded to the respective servers.
To increase sharing of dashboards in Tableau Server, you should publish your work beforehand in
Tableau Desktop. Though, it’s not completely mandatory for licensed users to have an installed
Tableau Server. They just need the login credentials using which they can verify these reports.

Tableau Online
As the term ‘online’ suggests, Tableau Online is a sharing tool. It has a similar usage as Tableau
Server, but the data is saved on servers that are provided in the cloud maintained by the Tableau
group.

16 LOVELY PROFESSIONAL UNIVERSITY


Notes

Unit 02: Introduction to TABLEAU

The data that can be published on Tableau Online has no storage limit. Tableau Online and Server,
both need workbooks that are created by Tableau Desktop to broadcast the data. Data streamed
from web applications, be it Salesforce or Google Analytics, are supported by both, Tableau Online
and Tableau Server.

Tableau Public
Tableau Public is specially built for money-saving users. As the word ‘public’ suggests, the created
workbooks can’t be locally saved, rather it is sent to Tableau’s public cloud which can be accessed
by the general public. This is an economical version which is very good for people wanting to learn
and share their data with people.

TableauvsExcel

Excel and Tableau, are data analysis tools, but both of them have a unique approach to data

exploration. Where Excel works with columns and rows in spreadsheets, Tableau explores the Excel

data using its drag-and-drop feature. It formats the data in graphs and pictures that are easy to

understand.
Tableau MS Excel

Tableau is basically a data visualization tool which Excel is basically a spreadsheet for
provides pictorial and graphical representations of data. working with data in rows and columns.
You need to first represent your data into
a tabular format and then you can apply
visualizations on top of it.
In Tableau, you can gain insights that you never When it comes to Excel, you need to have
thought possible. You can play with interactive a prior knowledge of the insight that you
visualizations, deploy data drilling tools, and explore want and then work with various
various data that is available, and you don’t need to formulae in order to get there, along with
have any specific knowledge of the insight you are that tabulation is also needed.
looking for.
With Tableau, it is all about an easy and interactive In Excel, you need to have some
approach. programming in order to come up with
real-time data visualization.

Advantages of Tableau

LOVELY PROFESSIONAL UNIVERSITY 17


Notes
Advance Data Visualisation

Fantastic Visualizations
You can now work with a lot of data that doesn’t have any order to it and create a range of
visualizations. Well, thanks to the in-built features of Tableau which help you create visualizations
that surely stand out of the crowd. You also have the option of switching between different
visualizations to bring about a greater context, ways of drilling down data, and exploring the data
at a minute level.

In-depth Insights
Tableau can help enterprises futuristically to analyze data without any specific goals in mind. You
can explore visualizations and have a look at the same data from different angles. You can frame
‘what if’ queries and work with data by hypothetically visualizing it in a different manner and
dynamically adding components for comparison and analysis. When you are working with real-
time data, then these capabilities are highlighted in a huge manner.

User-friendly Approach
This is the greatest strength of Tableau. It is built from the ground level for people who don’t have
any technical skills or coding experience. So, everything can be done with this tool by anybody
without any prior set of skills. Since most of the features are in a drag-and-drop format, each
visualization is so intuitive and self-depicting

.
Working with Disparate Data Sources
Tableau has a powerful reason to be included by various organizations in today’s data-driven
world where data can come from any point and any disparate sources. Tableau has an edge over
other Business Intelligence and Analytics tools as it lets you work by connecting to various Tableau
data sources, data warehouses, and files that exist in the cloud, big data that exists in spreadsheets,
and non-relational data, among other types of data. Tableau effortlessly blends all different types of
data to help organizations come up with compelling visualizations.

Adding Datasets
Be it a database or an Excel workbook, with Tableau, one can easily add new datasets which get
automatically blended with Tableau using common fields.

Switching Between Visualizations


You also have the option of switching between different visualizations to bring about a greater
context, with ways of drilling down data and exploring it at a minute level.
Tableau is one of the top Business Intelligence and Data Visualization tools available today. It is
being used by most of the Fortune Global 500 list of companies in order to derive valuable insights
from their data.

18 LOVELY PROFESSIONAL UNIVERSITY


Notes

Unit 02: Introduction to TABLEAU

2.5 Installation Steps


Running Setup
After you download the Tableau Server installation file, follow the instructions below to install the
server.
Important: Do not install a beta version of Tableau Server in your production environment. You
should also never restore a production Tableau Server installation using a backup of a beta version.

• Sign in as a user with administrator access to the computer where you want to install
Tableau Server and double-click the installation file.
• Follow the on-screen instructions to complete Setup and install the application.

The default installation path is C:\Program Files\Tableau\Tableau Server\<version>. The Setup


program displays the install path without the version, like this: C:\Program Files\Tableau\Tableau
Server. You can choose a different location, including a different drive, either by browsing to or
typing in a new path. Be aware that if you browse to a location, the Setup program
appends \Tableau Server to the end of the path. You can remove this if it is not the location you
want.
If you are upgrading from Tableau Server version 2018.1 or earlier and Tableau was installed to a
non-default location, you need to specify the location of your existing version. Upgrade steps vary
depending on your target version and install location. See Upgrade Tableau Server Overview for
information on how to choose your upgrade steps.
Note: If you are prompted by Windows Defender Firewall, click Allow access. You may need to do
this multiple times for the installation to complete.

3. Click Next.

LOVELY PROFESSIONAL UNIVERSITY 19


Notes
Advance Data Visualisation

On the Server installation type page, you can specify whether you are installing the first node of a
Server installation, or additional nodes in a multi-node installation. You do not need to change this
from the default (Create new Tableau Server installation.) unless you are installing a multi-node
Tableau Server. If you are installing a multi-node Tableau Server, see Install and Configure
Additional Nodes.

4. Click Next.

On the Product activation type page, select whether you want to use the Tableau authorization-to-
run (ATR) service to activate Tableau Server (the default), and then click Install. For more
information about the Tableau authorization-to-run (ATR) service, see Activate Tableau Server
using the authorization-to-run (ATR) service(Link opens in a new window).

20 LOVELY PROFESSIONAL UNIVERSITY


Notes

Unit 02: Introduction to TABLEAU

5. After the installation completes, click Finish. Setup will then open the TSM configuration
web page on the computer where you are installing Tableau Server.

If you need to support characters that are not the Latin-1 set, install the Windows Language Packs
via Control Panel > Regional and Language Options. The language packs will need to be installed
on the initial server as well as any additional nodes.

2.6 Configure Tableau Server for a Forward Proxy


If your organization uses a forward proxy solution to access the internet, then configure Tableau
Server to use the proxy server. Tableau Server must access the internet for map data and for default
licensing functionality.
We recommend configuring Tableau Server for a forward proxy solution at this point of the
installation process. See Configuring Tableau Server on Windows to work with a forward proxy.

Activate and Register Tableau Server

Tableau Server requires at least one product key that both activates the server and specifies the
number of license levels you can assign to users. You can access your product keys from the
Customer Portal.
If you need to activate Tableau Server on a computer that is offline, see Activate Tableau Server
Offline - Adding a License. If you need to activate additional product keys to add capacity to an
existing Tableau Server installation, see Add Capacity to Tableau Server.

Prerequisite
Prerequisite
Before proceeding with the procedures in this topic, complete the following prerequisites as
outlined in Install and Configure Tableau Server:

Install TSM
TSM uses port 8850. If you are running a local firewall, open port 8850.

Configure Product Key Operations with Forward Proxy

1. If the computer where you are installing Tableau Server has been configured to connect to
the internet through a forward proxy, follow the procedure in the topic, Configure Product
Key Operations with Forward Proxy, before continuing.

2. Sign in to Tableau Services Manager Web UI.

The account you use must have administrative privileges on the computer where TSM is
installed.

3. On the Activate page, Enter or paste your product key and click Activate Product Key.

After your product key is activated, it appears under Activated Product Keys.

LOVELY PROFESSIONAL UNIVERSITY 21


Notes
Advance Data Visualisation

4. To activate another product key, type over they key you just entered to add the new
product key, and then click Activate Product Key. After your product key is activated, it
appears under Activated Product Keys. Continue adding product keys in this manner
until you're done.

5. When you’re finished activating product keys, click Next.

Note: If the product keys you have activated don’t have the necessary capacity, such as not
enough cores or only a Viewer role product key, Tableau Services Manager displays
the Insufficient licenses applied dialog box. Click Activate Another Product Key to add another
product key and increase capacity on your Tableau Server installation.

6. On the Register page, enter your information into the fields and click Register.

22 LOVELY PROFESSIONAL UNIVERSITY


Notes

Unit 02: Introduction to TABLEAU

If you have a product key for Data Management or Advanced Management, you must activate that
key to use the additional functionality. Product keys for these licenses should only be activated
after at least one capacity product key has been activated on the server.

• For license information on Tableau Data Management, see License Data Management.
• For license information on Tableau Advanced Management, see About Tableau Advanced
Management on Tableau Server.

LOVELY PROFESSIONAL UNIVERSITY 23


Notes
Advance Data Visualisation

Summary
• Tableau Desktop has a rich feature set and allows you to code and customize reports. Right
from creating the charts, reports, to blending them all together to form a dashboard, all the
necessary work is created in Tableau Desktop.
• For live data analysis, Tableau Desktop provides connectivity to Data Warehouse, as well as
other various types of files. The workbooks and the dashboards created here can be either
shared locally or publicly.
• Based on the connectivity to the data sources and publishing option, Tableau Desktop is
classified into
• Tableau Desktop Personal: The development features are similar to Tableau Desktop. Personal
version keeps the workbook private, and the access is limited. The workbooks cannot be
published online. Therefore, it should be distributed either Offline or in Tableau Public.
• Tableau Desktop Professional: It is pretty much similar to Tableau Desktop. The difference is
that the work created in the Tableau Desktop can be published online or in Tableau Server.
Also, in Professional version, there is full access to all sorts of the datatype. It is best suitable for
those who wish to publish their work in Tableau Server.

Keywords
 Tableau connects and extracts the data stored in various places. It can pull data from any
platform imaginable. A simple database such as an excel, pdf, to a complex database like
Oracle, a database in the cloud such as Amazon webs services, Microsoft Azure SQL database,
Google Cloud SQL and various other data sources can be extracted by Tableau.
 When Tableau is launched, ready data connectors are available which allows you to connect
to any database.
 Depending on the version of Tableau that you have purchased the number of data connectors
supported by Tableau will vary.
 The pulled data can be either connected live or extracted to the Tableau’s data engine, Tableau
Desktop. This is where the Data analyst, data engineer work with the data that was pulled up
and develop visualizations.
 The created dashboards are shared with the users as a static file. The users who receive the
dashboards views the file using Tableau Reader.
 The data from the Tableau Desktop can be published to the Tableau server. This is an
enterprise platform where collaboration, distribution, governance, security model, automation
features are supported.
 With the Tableau server, the end users have a better experience in accessing the files from all
locations be it a desktop, mobile or email.

Self Assessment
1. Default aggregation used for tree map__________

A. Avg
B. Count
C. Sum
D. None of these

24 LOVELY PROFESSIONAL UNIVERSITY


Notes

Unit 02: Introduction to TABLEAU

2. The best feature Tableau are except_____________-

A. Collaboration of data
B. Data Blending
C. Real time analysis
D. Data is smaller and more fit

3. How do you find the field is discrete in Tableau ?

A. Green color
B. # symbol
C. Blue color
D. None

4. What percent of total profits do the top 10 customer by Sales represent in sample superstore
dataset ?

A. 5.03%
B. 17.54%
C. 16.26%
D. 3.50%

5. Which of the following is not a Trend Line model ?

A. Linear Trend Line


B. Binomial Trend Line
C. Exponential Trend Line
D. Logarithmic Trend Line

6. Where can we apply global filters?

A. Dashboards
B. Stories
C. Sheets
D. All of the above

7. The Tableau Product Suite consists of____________-

A. Tableau Desktop, Tableau Public, Tableau Online, Tableau Server, Tableau Measure
B. Tableau Desktop, Tableau Public, TableauOnline, TableauServer, Tableau Reader
C. Tableau Desktop, TableauPublic, TableauDimension, Tableau Server, Tableau Reader
D. Tableau Desktop, TableauPublic, Tableau Online, Tableau Server, TableauOrganics

8. Tableau File Extension is_______________

A. twbx
B. twby
C. twbw
D. twbz

LOVELY PROFESSIONAL UNIVERSITY 25


Notes
Advance Data Visualisation

9. What is the possible cause of the data not being updated?

A. Data Extrac needs an update


B. The data source configuration of Data Extract needs to be refreshed
C. Services on Data Extrac are not running
D. The workers of Data Extrac are taking a timeout

10. What type of join is used in blending?

A. Left join
B. Full join
C. Right join
D. Inner join

11. A justifiable reason to utilize a projectile chart.

A. Looking at the genuine against the objective deals


B. Examining the pattern for an era
C. Showing the business development for a specific year
D. Adding information and ascertaining tally measure

12. What insight will the Link Utilization Hourly Trend give you?

A. This will allow us to identify the specific times during the day the bandwidth utilization is
the highest
B. This will allow us to identify the critical links that don’t need attention
C. This will allow us to correlate bandwidth usage to user traffic
D. This will allow us to identify and set the optimum bandwidth thresholds in Tableau

13. Data Values available for the visualization_______________

A. Basic Expression
B. Table Calculation
C. None of the above
D. LoD Expression

14. In which Region do all Product Categories fall beneath the overall average profit in sample
superstore dataset?

A. East
B. West
C. Central
D. South

15. Which of these is not a datatype in Tableau?

A. Integer
B. Character
C. Float

26 LOVELY PROFESSIONAL UNIVERSITY


Notes

Unit 02: Introduction to TABLEAU

D. String

Answers for Self Assessment


1. C 2. D 3. C 4. A 5. B

6. D 7. B 8. A 9. C 10. A

11. A 12. A 13. B 14. D 15. B

Review Question
1. What Are the Data Types Supported in Tableau?
2. How Will You Understand Dimensions and Measures?
3. What is Meant by ‘discrete’ and ‘continuous’ in Tableau?
4. What Are the Filters? Name the Different Filters in Tableau.
5. What Are the Different Joins in Tableau?

Further Readings
"Information Dashboard Design: Displaying Data for At-a-glance Monitoring” by
Stephen Few
"Beautiful Visualization, Looking at Data Through the Eyes of Experts by Julie Steele,
Noah Iliinsky"

Web Links
https://www.tableau.com/
https://intellipaat.com/blog/what-is-tableau/

LOVELY PROFESSIONAL UNIVERSITY 27


Notes

Dr. Pritpal Singh, Lovely Professional University Unit 03: Tableau Data Sources

Unit 03 : Tableau Data Sources


CONTENTS
Objectives
Introduction
3.1 Data Sources in Tableau
3.2 Combining Data Sources
3.3 Tableau Sets & Parameters
Summary
Keywords
Self Assessment
Answers for Self Assessment
Review Questions
Further Readings

Objectives
After studying this unit, you will be able to:

 Understand sets and parameters


 Analyze data using the tableau parameter
 Understand data sources

Introduction
In order to master any Business Intelligence tool, the most basic operation we need to learn is to
connect to a data source. Once we establish a successful connection with a data source, we can
access all its data, bring some part of it in Tableau’s repository (extract) and use it for our analysis.
Tableau offers a myriad of data sources such as local text files, MS Excel, PDFs, JSON or databases
and servers like Tableau Server, MySQL Server, Microsoft SQL Server, etc.
A data source is made up of fields and groups. In the same way that folders on your hard disk
contain and organize your files, fields contain the data that users enter into forms that are based on
your form template, and groups contain and organize those fields.

3.1 Data Sources in Tableau


Tableau can connect to all the popular data sources which are widely used. Tableau’s native
connectors can connect to the following types of data sources.

 File Systems such as CSV, Excel, etc.


 Relational Systems such as Oracle, Sql Server, DB2, etc.
 Cloud Systems such as Windows Azure, Google BigQuery, etc.
 Other Sources using ODBC

The following picture shows most of the data sources available through Tableau’s native data
connectors.

28 LOVELY PROFESSIONAL UNIVERSITY


Notes

Advance Data Visualisation

Connect Live
The Connect Live feature is used for real-time data analysis. In this case, Tableau connects to real-
time data source and keeps reading the data. Thus, the result of the analysis is up to the second,
and the latest changes are reflected in the result. However, on the downside, it burdens the source
system as it has to keep sending the data to Tableau.

In-Memory
Tableau can also process data in-memory by caching them in memory and not being connected to
the source anymore while analyzing the data. Of course, there will be a limit to the amount of data
cached depending on the availability of memory.

Combine Data Sources


Tableau can connect to different data sources at the same time. For example, in a single workbook
you can connect to a flat file and a relational source by defining multiple connections. This is used
in data blending, which is a very unique feature in Tableau.

How to Establish a Connection?


Moving on, let us see how do we connect to a data source from Tableau Desktop. We will show you
how to establish a connection to an MS Excel file and use its data for analysis in Tableau.
Open Tableau Desktop in your system. As soon as it opens, you will get the Tableau welcome page.
On this page, you will find a blue pane on the left with the heading Connect. In this pane, you will
find a list of data connectors for file-based and server-based sources. You can click on the data
connector name, select a file or establish a connection.

To fetch a Microsoft
Excel file, we click on
the option Microsoft
Excel from the list.

LOVELY PROFESSIONAL UNIVERSITY 29


Notes

Unit 03: Tableau Data Sources

It will open a new dialog box from where you can access files from your system. We have a sample
Excel file which we are going to select and click Open.

This will open the contents of the Excel file in a Data Source tab in a Tableau workbook.

30 LOVELY PROFESSIONAL UNIVERSITY


Notes

Advance Data Visualisation

This tab has a Connections pane at its left which shows the name of the data source and its
contents; that is, the number of sheets in the case of an Excel file.
We can manage and view the contents of a data source by dragging and dropping sheets to the
central pane. It will display the entire table with proper rows and columns of the respective sheet.

In addition to this, you can also add a new data source here by clicking on the Add option and then
selecting the data file or connector of your choice.

LOVELY PROFESSIONAL UNIVERSITY 31


Notes

Unit 03: Tableau Data Sources

Or, by clicking on the Data tab present on the top-left bar and then selecting New Data
Source option from there.

From here, we can sort fields and manage metadata where you can see the names of all the columns
present in their concerning tables. In this way, we can also manage multiple linked data sources.

32 LOVELY PROFESSIONAL UNIVERSITY


Notes

Advance Data Visualisation

Once we load our data source, we can move on to create a worksheet in Tableau. Open the tab
called Sheet1 just next to the Data Source tab and you will find a list of available data sources and
fields within it. On the left, there is an organized list of available dimensions and measures from
where you can select and use them to create charts and graphs. Just drag and drop dimensions and
measures to the Columns and Rows section to start making visualizations.

Every data source, especially server-based sources have different steps to follow in order to
establish a connection with. Follow the steps, provide the necessary information and start working
with your data in Tableau to carry out the analysis.

3.2 Combining Data Sources


There are several ways to combine data, each with their own strengths and weaknesses.

LOVELY PROFESSIONAL UNIVERSITY 33


Notes

Unit 03: Tableau Data Sources

Relationships are the default method and can be used in most instances, including across tables
with different levels of detail. Relationships are flexible and adapt to the structure of the analysis on
a sheet by sheet basis. However, you can't create relationships between tables from published data
sources.
Joins combine tables by adding more columns of data across similar row structures. This can cause
data loss or duplication if tables are at different levels of detail, and joins must be established before
analysis can begin. You can't use a published data source in a join.
Blends, unlike relationships or joins, never combine the data directly. Instead, blends query each
data source independently, aggregate the results to the appropriate level, then present the results
together visually in the view. Because of this, blends can handle different levels of detail and also
work with published data sources. Blends don't create a new, blended data source (and therefore
can't be published as a "blended data source"). Instead, they are simply blended results visualized
per sheet.

3.3 Tableau Sets & Parameters


Sets
You can use sets to compare and ask questions about a subset of data. Sets are custom fields that
define a subset of data based on some conditions.
You can make sets more dynamic and interactive by using them in Set Actions. Set actions let your
audience interact directly with a viz or dashboard to control aspects of their analysis. When
someone selects marks in the view, set actions can change the values in a set.

Create a dynamic set


There are two types of sets: dynamic sets and fixed sets. The members of a dynamic set change
when the underlying data changes. Dynamic sets can only be based on a single dimension.
To create a dynamic set:

1. In the Data pane, right-click a dimension and select Create > Set.
2. In the Create Set dialog box, configure your set. You can configure your set using the
following tabs:

o General: Use the General tab to select one or more values that will be considered when
computing the set.

You can alternatively select the Use all option to always consider all members even when new
members are added or removed.

34 LOVELY PROFESSIONAL UNIVERSITY


Notes

Advance Data Visualisation

o Condition: Use the Condition tab to define rules that determine which members to include
in the set.

For example, you might specify a condition that is based on total sales that only includes products
with sales over $100,000.

LOVELY PROFESSIONAL UNIVERSITY 35


Notes

Unit 03: Tableau Data Sources

o Top: Use the Top tab to define limits on what members to include in the set.

For example, you might specify a limit that is based on total sales that only includes the top 5
products based on their sales.

36 LOVELY PROFESSIONAL UNIVERSITY


Notes

Advance Data Visualisation

3. When finished, click OK.

The new set is added to the bottom of the Data pane, under the Sets section. A set icon
indicates the field is a set.

Parameters
A parameter is a workbook variable such as a number, date, or string that can replace a constant
value in a calculation, filter, or reference line.

LOVELY PROFESSIONAL UNIVERSITY 37


Notes

Unit 03: Tableau Data Sources

Example: you may create a calculated field that returns True if Sales is greater than $500,000
and otherwise returns False. You can replace the constant value of “500000” in the formula with a
parameter. Then, using the parameter control, you can dynamically change the threshold in your
calculation.
You can even create a dynamic parameter that’s set to automatically refresh its current value (to the
result of a single-value, view-independent calculation), list of values (based on a data source
column), or range of values. This will happen each time the workbook is opened and Tableau
connects to the data source referenced by the parameter, or whenever you select Refresh from the
data source’s context menu..
You can make your parameters more dynamic and interactive by using them in Parameter Actions.
Parameter actions let your audience change a parameter value through direct interaction with a viz,
such as clicking or selecting a mark.

Create a parameter
Follow the instructions below to create a new parameter from the Data pane.

1. In the Data pane, click the drop-down arrow in the upper right corner and select Create
Parameter.

2. In the Create Parameter dialog box, give the field a Name.

3. Specify the data type for the values it will accept:

38 LOVELY PROFESSIONAL UNIVERSITY


Notes

Advance Data Visualisation

4. Specify a current value. This is the default value for the parameter. In this case, let’s leave
the field as is because we’ll be using the latest data, which we’ll configure in the next step.

5. Specify a value when the workbook opens. In this case, let’s create a dynamic parameter
by setting the parameter’s default value to the result of a single-value, view-independent
calculation.

Notes: If there is more than one value, the workbook would not be able to choose a
default value. The calculation must also be view-independent so that the value won’t
change as the viz changes. To do this, you can use a FIXED level of detail (LOD)
expression that is not dependent on the structure of the viz. All parts of the calculation
must be inside the FIXED LOD expression. If you use a FIXED LOD expression as the
default value and are using context filters, the dynamic parameter will not reflect any
context filters. For more information on LOD expressions, see Create Level of Detail
Expressions in Tableau.

For this dynamic parameter, let's use Latest Month. This means that if the connected data
source is updated and the workbook is opened, the parameter will automatically update
when the workbook is opened.

6. Specify the display format to use in the parameter control (Tableau Desktop only).

LOVELY PROFESSIONAL UNIVERSITY 39


Notes

Unit 03: Tableau Data Sources

7. Specify how the parameter will accept values. You can select from the following options:

o All - The parameter control is a simple text field.

o List - The parameter control provides a list of possible values for you to select
from.

o Range - The parameter control lets you select values within a specified range.

The availability of these options is determined by the data type. For example, a string
parameter can only accept all values or a list. It does not support a range.

If you select List, you must specify the list of values. Click in the left column to type your
list of values, or you can add members of a field by selecting Add values from.

If you select Range, you must specify a minimum, maximum, and step size. For example,
you can define a date range between January 1, 2019 and December 31, 2019, with the step
size set to 1 month to create a parameter control that lets you select each month in 2019.

40 LOVELY PROFESSIONAL UNIVERSITY


Notes

Advance Data Visualisation

In this case, to refresh the parameter’s list of values (or domain) whenever the workbook
opens, select List, and then select When workbook opens. Notice that the list of values on
the left is grayed out because the workbook is dynamically pulling values from the data
source.

8. When finished, click OK.

The parameter is now listed in the Parameters section at the bottom of the Data pane.

The parameter is also available everywhere else you can use a parameter—for example, on
the Top tab in the Filter dialog box, or in the Reference Line dialog box. Parameters are
global across the workbook and can be used in any worksheet.

LOVELY PROFESSIONAL UNIVERSITY 41


Notes

Unit 03: Tableau Data Sources

Summary
 Tableau is a popular Business Intelligence tool used by thousands of companies around the
world. It helps businesses generate valuable insights by connecting and analyzing the raw
data from different sources. It offers various tools and techniques that a business can use to
establish relationships between different data sources.
 Parameters in Tableau are the container of values used to calculate and dynamically enter
the values that are otherwise not present in the original dataset. You can add conditions and
select the range of the values for which you want to create a parameter. After that, you can
incorporate these values into reports and dashboards and see their effect on different
visualizations.
 Parameters are a method that transfers the control on datasets from the author of the report
to the user.
 Parameters or container values in Tableau are mainly used to dynamically enter the values
in the dataset that would otherwise not be present in it. With tableau parameters, you can
set the range for any dataset and only focus on specific data variables/dimensions for
performing data analysis.

Keywords
Parameters: Parameters are useful when you want to add interactivity and flexibility to a report, or
to experiment with what-if scenarios. Suppose you are unsure which fields to include in your view
or which layout would work best for your viewers.
Data Source: DataSource is a name given to the connection set up to a database from a server. The
name is commonly used when creating a query to the database. The data source name need not be
the same as the filename for the database.
Sets: Sets are custom fields that define a subset of data based on some conditions. A set can be
based on a computed condition, for example, a set may contain customers with sales over a certain
threshold. Computed sets update as your data changes. Alternatively, a set can be based on specific
data point in your view.

SelfAssessment
1. What are the different Tableau files?

A. Workbooks

B. Bookmarks

C. Packaged Workbooks

D. All of these

2. What are the characteristics to distinguish data source?

A. Icon/Name

B. Connection Type

C. Connects to

42 LOVELY PROFESSIONAL UNIVERSITY


Notes

Advance Data Visualisation

D. All of these

3. Tableau was founded by

A. Chris Stoltecorrect

B. Chris Jordan

C. Alexander Fleming

D. None

4. How do you identify a continuous field in Tableau?

A. It is identified by a blue pill in the visualizationwrong

B.It is identified by a green pill in a visualizationcorrect

C. It is preceded by a # symbol in the data window

D. When added to the visualization, it produces distinct values

5. The icon associated with the field that has been grouped is a _____________

A. Paper Clipcorrect

B. Set

C. Hashwrong

D. Equal To

6. What are the file extensions in Tableau?

A. Tableau Bookmark (.tdm)

B. Tableau Map Source (.tms)

C. Tableau Preferences (.tps)

D. All of the abovecorrect

7. How do you identify a discrete field in Tableau?


A. It is identified by a blue pill in the visualization
B. It is identified by a green pill in a visualization
C. It is preceded by a # symbol in the data window
D. When added to the visualization, it produces distinct values

LOVELY PROFESSIONAL UNIVERSITY 43


Notes

Unit 03: Tableau Data Sources

8. It contains qualitative values……………


A. Dimensions
B. Measures
C. Show me
D. Calculated fields

9. It contains quantitative values…………….


A. Dimensions
B. Measures
C. Show me
D. Calculated fields

10. It contains options to create graphs


A. Dimensions
B. Measures
C. Show me
D. Calculated fields

11. It contains option to apply all formulas


A. Dimensions
B. Measures
C. Show me
D. Calculated fields

12. It can be used to define the level of detail to perform an aggregation on


A. Dimensions
B. Measures
C. Show me
D. Calculated fields

13. In which type of graph geographical role is defined


A. Bar graph
B. Map charts
C. Scatter plot
D. Dimensions

14. In which type of graph spatial data is required


A. Bar graph
B. Map charts
C. Scatter plot
D. Dimensions

44 LOVELY PROFESSIONAL UNIVERSITY


Notes

Advance Data Visualisation

15. Tableau takes at least one measure in the Rows shelf and one measure in the Columns shelf
to create a _____________
A. Bar graph
B. Map charts
C. Scatter plot
D. Dimensions

Answers for SelfAssessment


l. D 2. D 3. A 4. A 5. C

6. D 7. A 8. A 9. B 10. C

11. D 12. A 13. B 14. B 15. C

Review Questions
1. Why Tableau is preferred by the business community?
2. What do you mean by data source? How it is important for tableau.
3. What is a parameter? Write the steps to implement parameters using tableau.
4. What are the different responsibilities of a Tableau professional?
5. What are sets?

Further Readings
Communication Data With Tablue, Ben Jones, O’ Reilly Publications

Web Links
https://www.tableau.com/
https://www.datacamp.com/tutorial/data-visualisation-tableau

LOVELY PROFESSIONAL UNIVERSITY 45


Notes

Dr. Pritpal Singh, Lovely Professional University Unit 04: Basic Visualizations

Unit 04: Basic Visualizations


CONTENTS
Objectives
Introduction
4.1 What is Tableau?
4.2 Installation
4.3 Data Visualizations
4.4 Various Graphs and Charts
4.5 Filters
Summary
Keywords
Self Assessment
Answers for Self Assessment
Review Questions
Further Readings

Objectives
After studying this unit, you will be able to:

• Understand concept of different graphs.


• install software for data visualization.
• Understand dimensions and measures.
• Understand continuous and discrete data.

Introduction
Data Visualization with tableau is the process of presenting information through visual rendering.
From centuries back, people have used to visualizations such as charts and maps to understand
information more quickly and easily. As far as the human brain is concerned, it recognizes visual
data more quickly than text data.

4.1 What is Tableau?


Tableau is a Data Visualisation tool that is widely used for Business Intelligence but is not limited
to it. It helps create interactive graphs and charts in the form of dashboards and worksheets to gain
business insights. And all of this is made possible with gestures as simple as drag and drop!
What Products does Tableau offer?

46 LOVELY PROFESSIONAL UNIVERSITY


Notes

Advance Data Visualization

4.2 Installation
To work on Tableau, you need Tableau, right?

Out of the five above mentioned products, Tableau Desktop, Public and Online offer Data Visual
Creation.

Tableau Desktop
It is available in the following three formats:

1. Free trial for 14 days


2. If you are a student or a teacher, you get free access to the Desktop for a full year.
3. Purchase Tableau

Tableau Public
Tableau Public is purely free of all costs and does not require any license. But it comes with a
limitation that all of your data and workbooks are made public to all Tableau users.

Tableau Online
Tableau Online is the best option for you, if you wish to make your Workbooks on the Cloud and
be able to access them from anywhere.

Connect to the Data

LOVELY PROFESSIONAL UNIVERSITY 47


Notes

Unit 04: Basic Visualizations

You should see a screen similar to the one above. This is where you import your data. As is visible,
there are multiple formats that your data can be in. It can be in a flat-file such as Excel, CSV or you
can directly load it from data servers too.

You can see that Tableau itself offers some Sample Workbooks, with pre-drawn charts, graphs, and
other visuals. I would suggest going through these later for further exploration.

The best way to learn is to get your hands dirty. Let us start with our Data, which can be
found here. The data is that of a United States’ Superstore which is deliberating over its expansion.
It wishes to know the prospective regions of the country where it could and hence requires your
help.

The first thing that you will obviously need to do is import the data onto Tableau. So quickly follow
the below steps:

1. Since the data is in an Excel File, click on Excel and choose the Sample – Superstore.xls file
to get :

48 LOVELY PROFESSIONAL UNIVERSITY


Notes

Advance Data Visualization

2. You can see three sheets on the screen, but we are only going to be dealing with Orders
here, so go ahead and drag the same on Drag sheets here :

Uh oh, the imported data looks a bit different for the first few rows. Don’t worry, the solution lies
right ahead.

Data Interpreter

3. You see the option of Use Data Interpreter? Click on it to get the following clean view :

LOVELY PROFESSIONAL UNIVERSITY 49


Notes

Unit 04: Basic Visualizations

All that messy data magically disappeared!

If you open the Excel data file, you will see some metadata in it, i.e. information about data :

Tableau imports the entire data file as is, but anticipating such discrepancies, explicitly provides a
solution in the form of a Data Interpreter. If you wish to view the exact changes that it made, click
on Review the results, and choose the Orders tab in the opened Excel sheet.

As it will show, it simply removed the erroneous data.

4.3 Data Visualizations


As soon as you had imported your dataset, next to the Data Source tab near the bottom of the
screen, you immediately must have seen Go to Worksheet. A Worksheet is where you make all of
your graphs, so click on that tab to reach the following screen:

50 LOVELY PROFESSIONAL UNIVERSITY


Notes

Advance Data Visualization

Don’t get overwhelmed by the various elements that you see here, we will cover them all one by
one.

Dimensions and Measures:

Moving onto Shelves :

Visualization in Tableau is possible through dragging and dropping Measures and Dimensions
onto these different Shelves.

LOVELY PROFESSIONAL UNIVERSITY 51


Notes

Unit 04: Basic Visualizations

Rows and Columns: Represent the x and y-axis of your graphs / charts.

Filter: Filters help you view a strained version of your data. For example, instead of seeing the
combined Sales of all the Categories, you can look at a specific one, such as just Furniture.

Pages:Pages work on the same principle as Filters, with the difference that you can actually see the
changes as you shift between the Paged values. Remember that Rosling chart? You can easily make
one of your own using Pages.

Marks: The Marks property is used to control the mark types of your data. You may choose to
represent your data using different shapes, sizes or text.

And finally, there is Show Me, the brain of Tableau!

When you drag and drop fields onto the visualization area, Tableau makes default graphs for you,
as we shall see soon, but you can change these by referring to the Show Me option.

Note: Not every graph can be made with any combination of Dimensions or Measures. Each graph
has its own conditions for the number and types of fields that can be used, which we shall discuss
next.

4.4 Various Graphs and Charts


Using Superstore Sales and Profit Statistics. That would include the Net Sales, the Net Profit and
the growth of the two measures, to name a few. Here is a gist of what we will be making:

52 LOVELY PROFESSIONAL UNIVERSITY


Notes

Advance Data Visualization

From what can be observed, the net sales are on the rise, but the Profit is creeping up slowly. We
can also quite clearly see the peak Sales Months, which could be attributed to various reasons. We
can only know more as we explore more.

Before we start, there is one thing that I would like to recommend and that is you name
your Worksheets as being done here.

Let’s begin with the simplest visualization, and that is displaying theNet
Statisticsnumbers.Tableau, being as smart as it is, automatically computes such
valuesunderMeasure Names and Measure Values. Follow these steps to make what is called aText
Table :

1. Drag Measure Names from Dimensions onto the central empty area so that you see a Text
Table.
2. Measure Names will be displayed automatically onto Rows, so drag it from Rows to
Columns.
3. Since we don’t really need Measures like the Row ID, Discount, etc, you can drag them off
from below the Marks Pane, to get something like this :

LOVELY PROFESSIONAL UNIVERSITY 53


Notes

Unit 04: Basic Visualizations

Note: Don’t get confused by the different colors of the fields that you see. Just remember one
small trick: Blue means Discrete and Green, Continuous.

So we have the net Sales and Profit values, let’s delve a little deeper by getting the Sales and Profit
Values over the years. Let’s make another, but a more detailed, Text Table :

1. Drag Order Date from Dimensions and Sales from Measures to Rows.
2. Right-click on the green Sales Pill, and select Discrete, in place of Continuous, since we
want the explicit values and not the bar graphs.
3. Finally, drag Profit on the ‘abc’ column to get :

4. Do the same thing for Monthly Sales and Profit Values, but this time changes the format
of Order Date, from Year to Month, by right-clicking on Order Date in the Rows, and
choosing Month, to get something like this :

We have just covered the numeric part of the Dashboard, but that is not its selling point. It’s
theLine Charts.Lets quickly learn how to make one :

54 LOVELY PROFESSIONAL UNIVERSITY


Notes

Advance Data Visualization

1. To create the chart ofSales and Profit Growth, dragOrder Dateover


theColumns,SalesoverRowsand thenProfitover the formedSalesaxis – so that you see an
equals sign – to get the following :

2. Repeat the same to find the Peak Sales and Profit Months, but again change the format
of Order Date, from Year to Month, and get :

If you were to click on Show Me, you will see the different types of Line Charts that you can make,
and if you were to hover over each of them, you will get to see their Dimension and Measure
requirements too. In case you ever feel lost, I recommend referring to Show Me.

With the previous visualizations, we had gotten a brief overview of the Superstore. Let’s dig a little
deeper now. The next thing that I can think of exploring is the demographic of the Sales and Profit.

LOVELY PROFESSIONAL UNIVERSITY 55


Notes

Unit 04: Basic Visualizations

What are the States that have the highest Sales Revenue, which ones are generating the maximum
Profits:

Before discussing the inferences, let’s first create the Pie Chart of Region Sales :

1. Drag Regions onto Rows and Sales onto Columns.


2. Go to Show Me, and select the Pie Chart.
3. And finally, drag Sales over the Label in the Marks Pane to get :

From the visual, it’s pretty evident that the two opposite ends, East and West are leading in the
Sales game. Let’s dissect this a bit more.

Note: Whenever you have some geographical data, it is always advisable to plot and see it on
a Map to gain better insights.

56 LOVELY PROFESSIONAL UNIVERSITY


Notes

Advance Data Visualization

So, we are now going to make the Map Chart of State Sales Distribution:

1. Since its the States that we wish to analyze, drag States onto the empty area, so that you
automatically see a Map, with small Circles. Follow this step by dragging Profits next. You
will notice the size of these circles changing to represent the varying values of Profits. This
is called a Symbol Map. But we are going to convert this into a Filled one, by going to
Show Me, and selecting the Filled Map.
2. Drag Profits again, but this time onto Label in the Marks Pane, to view the Profit Values
mapped as well, like so :

California and New York are the top most sellers from the West and East region, but unfortunately,
there are other states such as Texas, Colorado which even after having good Sales, have negative
Profits! This is certainly not good news for the Superstore. You can perceive a good analysis for the
other States as well.

And lastly, here are the steps for making the Scatter Plot of Sales and Profit Analysis :

1. Drag Sales onto Rows, and Profit onto Columns. You will see one tiny circle, which
actually represents the Total Sales and Profit Values.
2. To get more information, drag States onto the graph created, so that these circles/bubbles
scatter to represent the individual States.
3. To better understand the central tendency of the data, we have also added a Median
axis as Reference Line. This can be easily done by right-clicking on the Sales / Profit Axis –
> Adding Reference Line and choosing Median over the default Average Reference.
4. Finally, for some more insight, drag States again, but this time onto Label in the Marks
Pane, and get:

LOVELY PROFESSIONAL UNIVERSITY 57


Notes

Unit 04: Basic Visualizations

The findings from the Map chart become more prominent with the following Scatter
plot inferences :

 The states in the top right, with high Sales and high Profits, mean good business for the
organization.
 States with positive Sales and Profits, but near the two respective axis are the ones where
there is some scope of improvement.
 Whereas the states that belong to the 2nd or 3rd quarter are the ones which are not
generating much revenue.

One of the great things about Tableau is that it lets you interact with the visuals. Have a look at an
example :

When we clicked on the Central Region, it highlighted and showed the Central States of the US,
along with their respective Sales and Profit scatter. Here we used the chart as a Filter itself which is
a feature of a Dashboard. We shall learn how to make one at a later stage.

58 LOVELY PROFESSIONAL UNIVERSITY


Notes

Advance Data Visualization

There is one pretty important analysis that we have yet to touch, and that is Product Statistics. High
Sales could be easily attributed to the high cost of the products being sold. Also, when you are
considering expansion, you will want to know the Sales distribution of the Products too:

Here we have visualized not just the Sales but also the Profits.

Its quite surprising to see Categories that have high Sales, generating negative profits, like
Technology in November 2015, or Furniture in October 2016 and this is inferred from the first chart,
which is also called a Highlight Table. As the name suggests, it highlights the relative proportion
of the Measure Values of our data. So let’s learn how to make one :

1. Drag Category and Order Date ( Year ) in Rows.


2. Drag Order Date (Month ) over Columns, and Sales over the empty ‘abc’ fields
3. Select Highlight Table from Show Me, and drag Order Date ( Year ) back to Rows, in case
it got re-shuffled.
4. Finally drag Profits over Colour in the Marks Pane, to get :

LOVELY PROFESSIONAL UNIVERSITY 59


Notes

Unit 04: Basic Visualizations

The Product Sub Category Sales is a Bar Chart, which is also quite easy to make :

1. Just drag Sub – Category over to the Rows


2. Drag Profit onto the Columns.
3. Go to Show Me and choose the Horizontal Bars
4. For some customization, drag Sales over Colour in the Marks Pane to attain this final
visualization:

From the above graph, we are getting a good idea of the Net Sales and Profit margins of the various
products. Notice that even though Tables’ Sales are quite high on the scale, it’s the only product
with the least profit.

Now, just like before, consider interaction with the visualization:

60 LOVELY PROFESSIONAL UNIVERSITY


Notes

Advance Data Visualization

We are now able to view each Category’s Products’ Sales and Profits, at a low-level granularity of
Year and Month!

4.5 Filters
Till now we have only made simple charts, that actually provide cumulative data, which is
combined data over the lifetime of the Superstore. To look at Sales of a particular Year, a Month, for
a certain Product, or to basically view the distinct aspects of the data, Filters are the way to go.

Let’s head back to the first-ever Chart that we had made, of Peak Sales and Profit Months :

LOVELY PROFESSIONAL UNIVERSITY 61


Notes

Unit 04: Basic Visualizations

The visual here is an accumulation of all 4 years of data, for all Regions, States, Categories and Sub
Categories.

The steps of turning any Dimension into a Filter are the same. Let’s first experiment with the Order
Date ( formatted to Year ) :

1. Drag the Dimension to the Filters’ Shelf, to see the following pop up. Here we will be
choosing Years :

2. Choose the values that you want to be a part of your Filter :

62 LOVELY PROFESSIONAL UNIVERSITY


Notes

Advance Data Visualization

3. Right-click on the newly generated Filter, and then choose Show Filter :

4. You can also change the format of your Filter, for example, whether you wish for a
Dropdown list, a Slider, a Single Value List, etc :

5. If you feel that some of your filters can be applied to other sheets as well, then rather
than repeating the steps, you can simply Apply the Filter to all other relevant Worksheets
:

LOVELY PROFESSIONAL UNIVERSITY 63


Notes

Unit 04: Basic Visualizations

Summary
• Tableau Public Server. Tableau Public server is a free server in the internet. ...
• Tableau Public Desktop. Tableau Public Desktop is a free desktop application. ...
• Tableau Mobile. Tableau mobile is a mobile application.
• Tableau can handle millions of rows of data with ease. Different types of visualization can
be created with a large amount of data without impacting the performance of the
dashboards.
• Also, there is an option in Tableau where the user can make “live” to connections to
different data sources like SQL etc.

Keywords
• Visualization helps people to understand things clearly and have a better insight into the
topic.
• Visualization helps to predict the future easily and take better decisions
• Data of large volumes can also be spotted easily and quickly
• Data visualization conveys the information in a universal manner
• It makes it simple to share ideas with others

Self Assessment
1. How do you identify a continuous field in Tableau?
A. It is identified by a blue pill in the visualization
B. It is identified by a green pill in a visualization
C. It is preceded by a # symbol in the data window
D. When added to the visualization, it produces distinct values

64 LOVELY PROFESSIONAL UNIVERSITY


Notes

Advance Data Visualization

2. How do you identify a discrete field in Tableau?


A. It is identified by a blue pill in the visualization
B. It is identified by a green pill in a visualization
C. It is preceded by a # symbol in the data window
D. When added to the visualization, it produces distinct values

3.The icon associated with the field that has been grouped is a _____________
A. Paper Clip
B. Set
C. Hash
D. Equal To

4. What are the file extensions in Tableau?


A. Tableau Bookmark (.tdm)
B. Tableau Map Source (.tms)
C. Tableau Preferences (.tps)
D. All of the above

5. How to view underlying SQL Queries in Tableau?


A. Create a Performance Recording
B. Reviewing the Tableau Desktop Logs
C. Both A and B
D. None

6. Tableau was introduced in the year of


A. 2000
B. 2002
C. 2003
D. 2005

7. What different products Tableau provide?


A. Tableau Server
B. Tableau Desktop
C. Tableau Reader
D. All of these

8. ____________is an online platform that allows you to host and manage Tableau data sources.
A. Tableau Server

LOVELY PROFESSIONAL UNIVERSITY 65


Notes

Unit 04: Basic Visualizations

B. Tableau Desktop
C. Tableau Reader
D. All of these

9. ________________helps to create reports, dashboards, and stories using different charts and
graphs.

A. Tableau Server
B. Tableau Desktop
C. Tableau Reader
D. All of these

10. ______________does not need to connect to any source, but it can read reports built on top of
any and all of the listed data sources that Tableau Supports.

A. Tableau Server
B. Tableau Desktop
C. Tableau Reader
D. All of these

11. Your data is out in the public once your report is published on to the ___________.
A. Tableau Public Server
B. Tableau Desktop
C. Tableau Reader
D. All of these

12. ___________is for somebody that only needs to monitor the analytics
A. Tableau Public Server
B. Tableau Desktop
C. Tableau Reader
D. All of these

13. For creating variable size bins we use ____________


A. Sets
B. Groups
C. Calculated fields
D. Table Calculations

14. For writing own calculation we use________


A. Sets
B. Groups

66 LOVELY PROFESSIONAL UNIVERSITY


Notes

Advance Data Visualization

C. Calculated fields
D. Table Calculations

15. For writing separation of two categories we use________


A. Sets
B. Dimensions
C. Show me
D. Table Calculations

Answers for Self Assessment


1. B 2. A 3. A 4. D 5. C

6. C 7. D 8. A 9. B 10. C

11. A 12. C 13. C 14. C 15. A

Review Questions
1. What makes data visualization good?
2. How can you visualize more than three dimensions in a single chart?
3. Is Tableau good for data visualization?
4. What are the strengths and limitations of Tableau when it comes to data visualization?
5. What Are the Data Types Supported in Tableau?
6. How Will You Understand Dimensions and Measures?
7. What is Meant by 'discrete' and 'continuous' in Tableau?

Further Readings
"Information Dashboard Design: Displaying Data for At-a-glance Monitoring” by
Stephen Few
"Beautiful Visualization, Looking at Data Through the Eyes of Experts by Julie Steele,
Noah Iliinsky"

Web Links
https://www.tableau.com/
https://intellipaat.com/blog/what-is-tableau/

LOVELY PROFESSIONAL UNIVERSITY 67


Notes

Dr. Pritpal Singh, Lovely Professional University Unit 05: Creation of Hierarchies

Unit 05: Creation of Hierarchies


CONTENTS
Objectives
Introduction
5.1 Hierarchies in Tableau
5.2 Basics Calculated Fields
5.3 Conditional Calculated Fields
5.4 Live and Extract in tableau
Summary
Keywords
Self Assessment
Answers for Self Assessment
Review Questions
Further Readings

Objectives
After studying this unit, you will be able to:

 Understand Hierarchies in tableau


 Analyze data using filters
 Understand data sources

Introduction
Testing the logical scenarios of variables is a common task in data science and business intelligence.
This allows us to determine if a certain condition is true or false (Boolean logic), thereby providing
useful insights. In this unit, you will learn how to create conditional calculations with built-in
functions in Tableau.

5.1 Hierarchies in Tableau


The term hierarchy is not specific to Tableau and you might have heard and used it in many places
before.
In the context of data, hierarchies are a logical arrangement of relevant unique attributes in a data
set. Hierarchies arrange data fields in a level, for instance, a Geography hierarchy would have a
region, country, state, city, area levels. Or, a Time hierarchy has a year, month, week, day as its
levels.
By creating hierarchies in Tableau, we set our data on different levels of detail and organize it.
Tableau can automatically create hierarchies by detecting relevant fields or you can create custom
hierarchies.

Creating Hierarchies in Tableau


Follow the steps given below to create hierarchies in Tableau.

68 LOVELY PROFESSIONAL UNIVERSITY


Notes
Advance Data Visualisation

Step 1: Drag a Field in Tableau Hierarchy


To start with creating a hierarchy in your data set, select a field from the list of dimensions and
measures. Select and hold the field and drag it on to or on top of another field. By doing this, we
add a field at a sub-level in the hierarchy.

Another way of adding a field in an existing hierarchy is to right-click on a field name, then
select Hierarchy from the list. Then select Add to hierarchy option and select the name of the
hierarchy in which you wish to add the field.

Step 2: Name the Hierarchies in Tableau

As soon as you add a field on the top of another field, a window pops up where you need to enter
the name of the hierarchy. Enter a suitable name for the hierarchy and click on OK.

Step 3: Add More Fields in Tableau Hierarchy


Once you enter a name, your hierarchy can be seen on the left Data panel as shown in the
screenshot below. We put the Sub-category field under the Category field. That is, Category is on the
first level of the hierarchy and Sub-category is on the second level. Following step 1, you can add
more fields under a field in a hierarchy.

LOVELY PROFESSIONAL UNIVERSITY 69


Notes

Unit 05: Creation of Hierarchies

Step 4: Drill Down Hierarchy in Tableau


Now, you can use this hierarchy into visualization by putting it in a Rows or Columns section. To
drill down in a hierarchy, click on the plus + sign given right next to a field name. As you can see
in the screenshot below, our field Category is on the top of the hierarchy. When we click on the +
sign near the field name, the field on a lower level in the hierarchy will be shown.

Step 5: Analyze Data in Tableau Hierarchy


As shown in the screenshot below, the field Sub-category and its contents are also visible in the bar
chart now. This is after drilling-down the hierarchy by one level. To go back to the top or a
preceding field in the hierarchy, click on the minus – sign present near a field name. In this way,
you can easily drill up or down a hierarchy to see and analyze data at different levels of detail.

70 LOVELY PROFESSIONAL UNIVERSITY


Notes
Advance Data Visualisation

Step 6: Geo Hierarchy in Tableau


The screenshot below shows a geo hierarchy where hierarchy with the name Geography is created.
Under it, there are fields at sub-level such as Region, Country, State, City, etc.

How to Remove a Hierarchy in Tableau?


To remove a hierarchy in Tableau all you need to do is right-click on the hierarchy name (present in
the Data pane) and select the option Remove Hierarchy. This will remove all the fields from that
hierarchy and its name will no longer show in the Data pane.

5.2 Basics Calculated Fields


Calculated fields allow you to create new data from data that already exists in your data source.
When you create a calculated field, you are essentially creating a new field (or column) in your data
source, the values or members of which are determined by a calculation that you control. This new

LOVELY PROFESSIONAL UNIVERSITY 71


Notes

Unit 05: Creation of Hierarchies

calculated field is saved to your data source in Tableau, and can be used to create more robust
visualizations. But don't worry: your original data remains untouched.
You can use calculated fields for many, many reasons. Some examples might include:
To segment data
To convert the data type of a field, such as converting a string to a date.
To aggregate data
To filter results
To calculate ratios

Types of calculations
You create calculated fields using calculations. There are three main types of calculations you can
use to create calculated fields in Tableau:
Basic calculations - Basic calculations allow you to transform values or members at the data source
level of detail (a row-level calculation) or at the visualization level of detail (an aggregate
calculation).
Level of Detail (LOD) expressions - Just like basic calculations, LOD calculations allow you to
compute values at the data source level and the visualization level. However, LOD calculations
give you even more control on the level of granularity you want to compute. They can be
performed at a more granular level (INCLUDE), a less granular level (EXCLUDE), or an entirely
independent level (FIXED) with respect to the granularity of the visualization.
Table calculations - Table calculations allow you to transform values at the level of detail of the
visualization only. For more information, see Transform Values with Table Calculations.
The type of calculation you choose depends on the needs of your analysis and the question you
want to answer.

Create a calculated field


Once you have determined the type of calculation you want to use, it's time to create a calculated
field. This example uses a basic calculation.
Note: The example in this article uses the Sample-Superstore data source that comes with Tableau
Desktop. To follow along with the steps in this article, connect to the Sample-Superstore saved
data source and navigate to Sheet 1.
In Tableau, select Analysis > Create Calculated Field.
In the Calculation Editor that opens, do the following:
Enter a name for the calculated field. In this example, the field is called, Discount Ratio.
Enter a formula. This example uses the following formula:
IIF([Sales] !=0, [Discount]/[Sales],0)
This formula checks if sales is not equal to zero. If true, it returns the discount ratio
(Discount/Sales); if false, it returns zero.

To see a list of available functions, click the triangle icon on the right-side of the Calculation Editor.

72 LOVELY PROFESSIONAL UNIVERSITY


Notes
Advance Data Visualisation

Each function includes syntax, a description, and an example for your reference.
Double-click a function in the list to add it to the formula.

When finished, click OK.


The new calculated field is added to Measures in the Data pane because it returns a number. An
equal sign (=) appears next to the data type icon. All calculated fields have equal signs (=) next to
them in the Data pane.

5.3 Conditional Calculated Fields


Data
Conditional calculations can be applied to both dimensions and measures. This guide will be using
the Sample Superstore data source available in the Tableau repository.
In the subsequent sections, you will implement several built-in functions including IF, IFELSE,
CASE, and ISDATE.

ISDATE
The ISDATE function is used to check whether the string value passed in the function is a date or
not. This function is useful in scenarios where the data source has fields in string format. The syntax
of the function is ISDATE(String value), and the output is a Boolean expression—TRUE or FALSE.
The first step is to go to the Analysis tab and select the Create Calculated Field option, as shown
below.

LOVELY PROFESSIONAL UNIVERSITY 73


Notes

Unit 05: Creation of Hierarchies

The next step is to name the calculated field ISDATE False E.g. Next, write the expression as shown
below, and click Ok. The calculation is valid because the datatype is string for the category.

Drag this calculated field into the view and check the output. The result will
be False because Category is not a date type variable.

74 LOVELY PROFESSIONAL UNIVERSITY


Notes
Advance Data Visualisation

If the variable was a date type, the result would have been True. To illustrate this, create another
calculated field as above and name it ISDATE True E.g.. Next, write the calculation as shown
below.

Click on OK and drag the calculation into the view. The output will be True as the condition has
been satisfied.

IIF
The IIF function is used to return the true output if the expression is met, otherwise it returns false
or null as the output. The first step is to create a calculated field and name it IIF example. Enter the
logic in the calculated field as shown below.

LOVELY PROFESSIONAL UNIVERSITY 75


Notes

Unit 05: Creation of Hierarchies

Next, drag Sub-Category into the Columns shelf and Sales into the Rows shelf. Turn on the label to
display the values.

Next, drag the calculated field IIF Example into the Color option of the Marks card.

The output above shows that the bar chart is demonstrating the color as specified in the logic.

IF THEN
The IF function allows the user to construct only one condition, and if the condition is satisfied, the
function returns the output. The extended argument THEN is used to return the result, given the
expression in the IF part is satisfied.
To start, create a calculated field named IF example, and write the logical expression as shown
below. This expression will return the Sales amount only if the Category condition is satisfied.

76 LOVELY PROFESSIONAL UNIVERSITY


Notes
Advance Data Visualisation

Drag the Category into the Rows shelf and the calculated field, IF example, into the Text option of
the Marks shelf.

The output above shows that the other two categories are blank, and sales is displayed only for
the Technology category.

IF ELSE
This is an upgraded version of the previous IF THEN function. You can create two conditions using
this function. To start, create a calculated field named IF ELSE eg, and write the logical expression
as shown below. This expression returns the sales value when the condition is met, otherwise it
returns a value of zero.

LOVELY PROFESSIONAL UNIVERSITY 77


Notes

Unit 05: Creation of Hierarchies

Next, drag the Category into the Rows shelf and the calculated field into the Text option of
the Marks shelf.

The output above shows that the sales value is displayed only for the Technology category.

CASE
The CASE function evaluates the expression mentioned in the conditions, scans through the values,
and returns the value that matches the expression. To start, create a calculated field named Case
E.g., and write the logical expression as shown below.

The next step is to drag the Category and the calculated field, Case E.g., into the Rows shelf. Also,
place the Case E.g. variable into the Text option of the Marks shelf. This will generate the required
output.

78 LOVELY PROFESSIONAL UNIVERSITY


Notes
Advance Data Visualisation

5.4 Live and Extract in tableau


Tableau Filters benefit organizations because they help them present insightful data to clients and
business stakeholders. This data is presented in the form of a worksheet or a dashboard. This
facilitates better decision-making in business. The tableau filters can filter out sensitive data and
share it only with those with access authority.
Live allows you real-time data while extracts are kind of batch which needs to be refreshed from
time to time to get the updated data. So, in the case of live connection whatever changes will be
done at the Datasource end that will be directly available to the tableau desktop.

LIVE DATA SOURCE


By default, when you connect to data in Tableau, whether it’s a file stored locally on your computer
or in a cloud database, a live data connection is created, This means that every change you make in
Tableau Desktop will cause a new query to be sent to the data source.

Refreshing a Live Data Source

LOVELY PROFESSIONAL UNIVERSITY 79


Notes

Unit 05: Creation of Hierarchies

With a live data source your visualizations will be updated every time you open your workbook or
if you manually refresh the data source

EXTRACT DATA
When you swap your Data Connection from ‘Live’ to ‘Extract, a static snapshot of the data is taken.
The extract is embedded in the workbook and becomes available offline. This means any queries
sent to the data source can happen much faster.

Refreshing an Extract
Once you have created an extract there are now two places where you can Refresh:

80 LOVELY PROFESSIONAL UNIVERSITY


Notes
Advance Data Visualisation

1. The first option is the same as for the Live Data Connection. This will not update the data
in your workbook if any changes are made tothe original data.

2. The second option refreshes the extract, specifically. This will create a new extract (aka:
a new snapshot of the original data) and therefore it will update the data in your workbook.

Summary
 Sometimes, during data analysis, we only require certain values of a particular field. This
can be implemented by creating a Tableau conditional calculated field. Using these fields
you can create conditional data labels on a custom field that includes only values of interest.
 Live allows you real-time data while extracts are kind of batch which needs to be refreshed
from time to time to get the updated data.
 Extract filter is used to filter the extracted data from the data source. This filter is utilized if
the user extracts the data from the data source. After connecting the text file to Tableau, you
can see the two options, Live and Extract in the top right corner of the data source tab.
 Filtering is the process of removing certain values or range of values from a result set.
Tableau filtering feature allows both simple scenarios using field values as well as advanced
calculation or context-based filters. In this chapter, you will learn about the basic filters
available in Tableau.

Keywords
 Data Filtering: Data filtering is the process of examining a dataset to exclude, rearrange, or
apportion data according to certain criteria.
 Tableau: Tableau Software is an American interactive data visualization software company
focused on business intelligence.
 Tableau Hierarchy: The Hierarchy in Tableau is an arrangement where the entities are
presented at various levels.

LOVELY PROFESSIONAL UNIVERSITY 81


Notes

Unit 05: Creation of Hierarchies

SelfAssessment
1. A justifiable reason to utilize a projectile chart.
A. Looking at the genuine against the objective deals
B. Examining the pattern for an era
C. Showing the business development for a specific year
D. Adding information and ascertaining tally measure

2. What insight will the Link Utilization Hourly Trend give you?
A. This will allow us to identify the specific times during the day the bandwidth
utilization is the highest
B. This will allow us to identify the critical links that don't need attention
C. This will allow us to correlate bandwidth usage to user traffic
D. This will allow us to identify and set the optimum bandwidth thresholds in Tableau

3. Data Values available for the visualization_______________


A. Basic Expression
B. Table Calculation
C. None of the above
D. LoD Expression

4. Which of these is not a datatype in Tableau?


A. Integer
B. Character
C. Float
D. String

5. Who is the parent company of Tableau?


A. Salesforce
B. Workday
C. Microsoft
D. Google

6. What are the file extensions in Tableau ?


A. Tableau Packaged Workbook (.twbx)
B. Tableau Data Source(.tds)
C. Tableau Workbook (.twb)
D. All of the above

7. Which of these is NOT a tableau file format?


A. tde
B. tdb
C. twb

82 LOVELY PROFESSIONAL UNIVERSITY


Notes
Advance Data Visualisation

D. twbx

8. Which of the following files types contains a Tableau Workbook along with local
data?

A. .hyper
B. .twbx
C. .tde
D. .twb

9. How do you find the field is continuous in tableau?


A. # symbol
B. Blue color
C. Green color
D. None of the above

10. Which of the following Data Pane items cannot be dragged onto the Filters Shelf?
A. Measures
B. Dimensions
C. Parameters
D. Sets

11. What is Tableau?


A. Tableau is a new alternative for data programming
B. Tableau is suitable for factory industry only
C. Tableau is a people in Business Intelligence Industry
D. Tableau is a powerful and fastest growing data visualization tool used in the Business
Intelligence Industry

12. Views in Tableau_____


A. Dashboard
B. Story
C. Sheet
D. All of above

13. How many maximum tables can you join in Tableau?


A. 16
B. 8
C. 32
D. 2

LOVELY PROFESSIONAL UNIVERSITY 83


Notes

Unit 05: Creation of Hierarchies

14. Which of the following is NOT a Tableau Field data type?


A. String
B. Number (whole)
C. Boolean
D. Float

15. . What are the components of a Dashboard?


A. Vertical
B. Horizontal
C. Image Extract
D. All of the above

Answers for SelfAssessment


l. A 2. A 3. B 4. 5. B

6. A 7. D 8. B 9. C 10. C

11. D 12. D 13. C 14. D 15. D

Review Questions
1. Why Tableau?
2. What is data visualization?
3. What is the latest version of Tableau Desktop?
4. How to create a calculated field in Tableau?
5. What do you mean by conditions in tableau? Explain using example.

Further Readings
Communication Data With Tablue, Ben Jones, O’ Reilly Publications

Web Links
https://www.tableau.com/

84 LOVELY PROFESSIONAL UNIVERSITY


Notes

Dr. Pritpal Singh, Lovely Professional University Unit 06: Advance Data Visualization/Graph

Unit 06: Advance Data Visualization/ Graph


CONTENTS
Objectives
Introduction
6.1 What is Data Visualization?
6.2 Identify the Purpose of the Visualization
6.3 What are the common challenges?
6.4 Interactive Representation of Data
6.5 What are its major processes?
6.6 What are the best tools?
6.7 What is the purpose of Big-Data Visualization tools?
6.8 Top 5 Data Visualization Techniques and Strategies
6.9 Tableau Pareto Chart
6.10 Mapping Concepts in Tableau
Summary
Keywords
Self Assessment
Answers for Self Assessment
Review Questions
Further Readings

Objectives
After studying this unit, you will be able to:

• Understand concept of Advance tableau graphs.


• install software for data visualization.
• Understand Show me tab of tableau.
• Understand concept of green and yellow pills (discrete data and continuous data).

Introduction
Tableau Desktop is a part of the tableau suite for Business Intelligence used for data analytics and
visualization. It’s a visual analytics solution that allows the user to explore complex datasets from
varied sources and perform various operations to drive valuable insights out of them.
On Tableau Desktop, even a non-programmer can connect with a myriad of data sources and
transform the data into dashboards. These dashboards can then be shared with multiple users
through Tableau Server to make data-driven decisions.

Advanced Charts in Tableau

LOVELY PROFESSIONAL UNIVERSITY 85


Notes

Advance Data Visualization

Tableau is a powerful Business Intelligence tool and thus, provides a number of visualizations to
represent different business scenarios. It also features the Visualization Query Language or VIZQL
that enables you to run queries and interact with the SQL database
Tableau features more than 25 different types of visualizations in terms of charts, maps, and
graphs. From a simple bar chart to advanced stacked bar and gauge charts, tableau has it all.

6.1 What is Data Visualization?

It uses charts and graphs to visualize large amounts of complex data. Visualization provides a
quick, easy way to convey concepts and summarize and present large data in easy-to-understand
and straightforward displays, which enables readers insightful information. With the help of its
techniques, enterprises are able to see the overview of their unstructured enterprise data in a better
way.
What are its key features?

 Identify areas that need attention or improvement.


 Clarify which factors influence customer behavior.
 Decision-making Ability.
 Integration Capability.
 Predict sales volumes.

What are the best techniques?


For growing companies, it is the essential part of the business to make business strategies. They
follow various visualization techniques listed below:
Understanding the motive of the Visualization
Know your data.
Getting to know the structure of your data.
Which Variables are we trying to plot?
How x-axis and y-axis will be used for the representation.
How different colors symbolize visualization.

6.2 Identify the Purpose of the Visualization


1. Identifying the purpose of creating a chart is necessary as this helps define the structure of
the process.
2. Select the right chart type.
3. Selecting the right type of chart is very crucial as this defines the overall functionality of the
chart.
4. Attention to Detail using colors, shapes, and sizes.
5. Choosing the correct type of color, shape, and size is essential for representing the chart.

86 LOVELY PROFESSIONAL UNIVERSITY


Notes

Unit 06: Advance Data Visualization/Graph

6.3 What are the common challenges?


Big Data is a large volume, complex dataset. So, such data cannot visualize with the traditional
method as the traditional method has many limitations.

• Perceptual Scalability: Human eyes cannot extract all relevant information from a large
volume of data. Even sometimes desktop screen has its limitations if the dataset is large. Too
many visualizations are not always possible to fit on a single screen.
• Real-time Scalability: It is always expected that all information should be real-time
information, but it is hardly possible as processing the dataset needs time.
• Interactive scalability: Interactive help to understand what is inside the datasets, but as big
data volume increases exponentially, visualizing the datasets take a long time. But the
challenge is that sometimes the system may freeze or crash while trying to visualize the
datasets.

What are the Data Visualization techniques and strategies?


It strategy is another on the rundown. You may have the information scrubbed and the bits of
knowledge removed, yet you ought to likewise make sense of how to manage all the fortune.

Better Preparation and Investigation


Information system guesses numerous means, from examining the business sector and industry,
picking and organizing information streams — constant or heritage, inner or outer, or both, and so
on., to choosing apparatuses and hotspots for information preparing and investigation — manual
information researcher examination, front line AI calculations.

Identify Areas that need Attention.


As indicated by an Experian report, 95% of U.S. associations state that they use the data to control
business openings. Another 84 percent accept information is an essential piece of shaping a
business system. With an exponentially developing volume of data, chiefs might appear wealthy
and ought to get ready to receive liberal rewards from their increasing resources. Nonetheless,
more isn't, in every case, better.

Quick Action
Managing much information can be overpowering and bring about "suffocating" if the
organizations don't settle specific difficulties before venturing into an information-driven period.

LOVELY PROFESSIONAL UNIVERSITY 87


Notes

Advance Data Visualization

6.4 Interactive Representation of Data


The way we presented information significantly impacts information investigation and deciphers a
large amount of information in a continuous structure by using complex arrangements of numerical
or verifiable figures. With the vast surges of information promptly accessible to the present
organizations across ventures, the test lies in information understanding, essential to the individual
association, just as its points, objectives, and long-term targets. Best use of Data The information is
essential for the accompanied performance of your business and to help you get the most
imaginable incentive. From this, I attempted and tried methods for dissecting and introducing
crucial data.

What are the key components?


Its component helps to give more details and alternative views to look after the data. Listed below
are the components of it.

Line Charts
Line Charts involves Creating a graph in which data is represented as a line or a set of data points
joined by a line.

Area chart
Area chart structure is a filled-in area that requires at least two groups of data along an axis.

88 LOVELY PROFESSIONAL UNIVERSITY


Notes

Unit 06: Advance Data Visualization/Graph

Pie Charts
Pie charts represent a graph in the shape of a circle. The whole chart is divided into subparts, which
look like a sliced pie.

Donut Chart
Doughnut Charts are pie charts that do not contain any data inside the circle.

Drill Down Pie charts

Drill down Pie charts are used for representing detailed description for a particularcategory.

LOVELY PROFESSIONAL UNIVERSITY 89


Notes

Advance Data Visualization

Bar Charts
A bar chart is the type of chart in which data is represented in vertical series and used to compare
trends over time.

Stacked Bar
In a stacked bar chart, parts of the data are adjacent to each bar and display a total amount, broken
down into sub-amounts.

Gauges
The gauge (gauge) component renders graphical representations of data.

90 LOVELY PROFESSIONAL UNIVERSITY


Notes

Unit 06: Advance Data Visualization/Graph

Solid Gauge
Creates a gauge that indicates its metric value along a 180-degree arc.

Activity Gauge
Creates a gauge that shows the development of a task. The inner rectangle shows the current level
of a measure against the ranges marked on an outer rectangle.

Heat and Tree maps


Heatmaps are useful for presenting variation across different variables, revealing any patterns,
displaying whether any variables are related to each other, and identifying if any associations exist
in-between them

LOVELY PROFESSIONAL UNIVERSITY 91


Notes

Advance Data Visualization

.
Treemap with Levels
The treemap component displays quantitative hierarchical data across two dimensions, represented
visually by size and color. Treemaps use a shape called a node to reference the data in the

hierarchy.
Scatter and Bubble Charts
Creates a chart in which the position and size of bubbles represent data. Use to show similarities
among types of values, mainly when you have multiple data objects, and you require to see the
general relations.

92 LOVELY PROFESSIONAL UNIVERSITY


Notes

Unit 06: Advance Data Visualization/Graph

Combinations
Creates a graph that uses various kinds of data labels (bars, lines, or areas) to represent different
sets of data items.

3D Charts
Creating a 3D chart helps rotate and view a chart from different angles, which supports in
representing data.

3D Column
A 3D chart of type columns will draw each column as a cuboid and create a 3D effect

LOVELY PROFESSIONAL UNIVERSITY 93


Notes

Advance Data Visualization

6.5 What are its major processes?


Each and every data has its particular need to illustrate data. Listed below are the stages and
process flow for it.

Acquire
Obtaining the correct data type is a crucial part as the data can be collected from various sources
and can be unstructured.

Parse
Provide some structure for the data's meaning by restructuring the received data into different
categories, which helps better visualize and understand data.

Filter
Filtering out the data that cannot serve the purpose is essential as filtering out will remove the
unnecessary data, further enhancing the chart visualization.

Mining
Building charts from statistics in a way that scientific context is discrete. It helps viewers seek
insights that cannot be gained from raw data or statistics.

Represent
One of the most significant challenges for users is deciding which chart suites best and represents
the right information. The data exploration capability is necessary to statisticians as this reduces the
need for duplicated sampling to determine which data is relevant for each model.

Refine
Refining and Improving the essential representation helps in user engagement.

Interact

Add methods for handling the data or managing what features are visible.

6.6 What are the best tools?


Nowadays, there are many tools. Some of them are:

• Google Chart: Google Chart is one of the easiest tools for visualization. With the help of
google charts, you can analyze small datasets to complex unstructured datasets.We can

94 LOVELY PROFESSIONAL UNIVERSITY


Notes

Unit 06: Advance Data Visualization/Graph

implement simple charts as well as complex tree diagrams. Google Chart is available cross-
platform as well.
• Tableau: The tableau desktop is a very easy-to-use its tool. Two more versions are available
of Tableau. One is "Tableau Server," and the other is cloud-based "Tableau Online." Here we
can perform visualization operations by applying drag and drop methods for creating visual
diagrams. In Tableau, we can create dashboards very efficiently.
• Microsoft Power BI: This tool is mainly used for business analysis. Microsoft Power BI can
be run from desktops, smartphones, and even tablets. This tool also provides analysis results
very quickly.
D3: D3 is one of the best tools. D3.js is an open-source visualization tool.

• Datawrapper:Data wrapper is a simple tool. Even non-technical persons can use the
Datawrapper tool. Data representation in a table format or responsive graphs like a bar
chart, line chart, or map draws quickly in the Datawrapper.
• Databox: Databox is another visualization tool. It is an open-source tool. The whole data set
can store in one location in the Databox tool. Then discover the insight data and perform
visualization operations. In dashboard can view or match data from different datasets.
Many more tools are available per requirements and based on datasets, and visualization tools are
chosen.

6.7 What is the purpose of Big-Data Visualization tools?


Its tools' purpose is to read complex unstructured data with the help of visual diagrams to benefit
our business. One relevant example is the covid 19 affected report. That is a large dataset. Only data
scientists can read and find out the pattern and predict the percentage of affected patients.

Approach to Visualize Big Data


Big data is unstructured, and such data can be very easily stored on a NoSql database like
MongoDB or relevant information needed to extract from the data and stored on a SQL database.
Then from that dataset, with the help of its tools, some charts like bar charts, pie charts, etc., need to
plot. Then from those visual chart analyses can be performed.

6.8 Top 5 Data Visualization Techniques and Strategies


This section will list 5 basic techniques and strategies you should know to manage and analyze a
large amount of data in a simple manner. So, let's get started

Design your Visualization keeping the Audience in Mind


When it's all said and done, the World Wide Web and Information Technology as an idea are in
their early stages – and information perception is a significantly more active part of advanced
development. So, the absolute most cultivated business people and officials think that it is hard to
process more than a pie diagram, bar chart, or a neatly introduced visual, nor do they have the
opportunity to dig profound into information. Hence, guaranteeing that your substance is both
moving and custom-fitted to your crowd is one of the most basic information perception methods
possible. A few partners inside your association or customers and accomplices content with a
straightforward pie diagram. However, others are looking to you to dig further into the bits of
knowledge you've assembled, and this is one of the best strategies. For the most significant effect
and achievement, you ought to consistently examine those you're introducing. Before a gathering,
and ordering your report to guarantee your visuals and level of detail address their issues
precisely.

LOVELY PROFESSIONAL UNIVERSITY 95


Notes

Advance Data Visualization

Have Clear Goals for the Visualization Strategy

• Like any business-based interest, from the brand narrating directly through to computerized
selling in the past – with the representation of your information, your endeavors are
convincing as the methodology behind them.
• To structure your perception endeavors, make a legitimate story, and drill down into the
bits of knowledge that issue the most. It's critical to set a distinct arrangement of points,
targets, and objectives preceding the structure of your administration reports, diagrams,
outlines, and extra visuals.
• By building up your focuses on a particular crusade of interest. You ought to plunk down in
a synergistic situation with others. Put resources into the extend and Define your endpoints
regardless of the type of information that helps you reach them.
• One of the advanced Data Visualization techniques to direct your endeavors is by utilizing a
foreordained arrangement of applicable KPIs for your undertaking, efforts, or continuous
business endeavors and utilizing these bits of knowledge to create your perceptions.

Number charts
Real-time number diagrams are exceptionally viable when you're looking to grandstand a quick
and intuitive review of a specific key presentation marker, regardless of whether it's a business KPI,
site appearances, commitment levels, or a level of advancement.

Maps
Most importantly, maps look incredible, which implies they move commitment in an executive
gathering or introduction. Besides, a guide is a snappy, simple, and absorbable approach to
introducing vast or complex geological data arrangements for various purposes.

Pie charts
While pie graphs have received a terrible rep lately, we feel that they structure a valuable
perception device. That presents essential measurements in a simple-to-follow group. Pie diagrams
are especially useful while showing the relative arrangement of a specific variable over a static
period. What's more, pie diagrams make an essential thing of your representation.

Gauge Charts

• This model shows the working cost proportion, firmly identified with the benefit and
misfortune territory of your fund division's critical exercises, and this shading-coded
wellbeing measure causes you to access the data you need, even at a quick look.
• Gauge charts can be successfully utilized with a solitary worth or information point.
Regardless of whether they're being used in money-related or official dashboard reports to
show progress against key execution markers. Check outlines are an astounding guide to
feature a quick pattern sign.

Colors Matter

• The clearest of our chose information representation procedures. Selecting the right shading
plan for your presentational resources is one of the best Techniques and Strategies. That will
help improve your endeavors fundamentally.

96 LOVELY PROFESSIONAL UNIVERSITY


Notes

Unit 06: Advance Data Visualization/Graph

• The standards of shading hypothesis will notably affect the general accomplishment of your
perception model. You ought to consistently attempt to keep your shading plan steady
through your information perceptions, utilizing clear differentiation. To recognize
components (for example, positive patterns in green and negative trends in red).
• As a guide, individuals utilize yellow as it can be perceived and deciphered easily.

Keep visualizations dashboards Simple and appropriate

• To assist you with taking care of your enormous information and separate it. For the most
engaged, legitimate, and absorbable representations conceivable, here are some essential
hints:
• Find which information is accessible to you and your association, conclude which is the most
significant, and mark each part of data obviously. To make it simple to isolate, break down,
and interpret.
• Guarantee that the entirety of your partners, staff, and colleagues comprehend where your
information originates from and how to get to it. To guarantee the smooth treatment of bits of
knowledge across offices.
• Keep your information ensured and your information taking care of frameworks basic,
absorbable, and refreshed. To make the representation procedure as direct and natural as
humanly conceivable.
• Guarantee that you use business dashboards that present your most significant bits of
knowledge in a straightforward. To-get to deep space – quickening the perception procedure
while likewise crushing the most considerable incentive from your data.

Tell a Data Story

• Like substance showcasing, when you're introducing your information in a visual


configuration. With the point of conveying an important message or objective, recounting
your story draws. In your crowd and make it simple for individuals to comprehend with
negligible exertion.
• Scientific studies affirm that people, in huge, react better to an all-around recounted story and
by adopting this strategy. To your representation interests, you won't just astonish your
associates, accomplices, and customers with your reports and introductions. However, you
build your odds of passing on your most basic messages, getting the upfront investment and
reaction. As per best techniques and Strategies, you have to make the sort of changes. That
brings about long-haul development, advancement, and achievement.
• To do as such, you ought to order your data, thinking as far as an essayist. Setting up an
obvious start, center, and end, just as contention and goals. Building pressure during your
account to add the most extreme effect on your different representations.

What are the common use cases?

 Sports Analysis: Based on previous datasets with the help of visualization tools, a
winning percentage prediction is possible. Graph plotting for both teams or players is
possible, and analysis can be performed.
 Fraud Detection: Fraud detection is a famous use case of big data. With the help of
visualization tools after analyzing data, a message can be generated to others, and
they will be careful about such fraud incidents.

LOVELY PROFESSIONAL UNIVERSITY 97


Notes

Advance Data Visualization

 Price Optimization: In any business product, price set is a significant issue with
visualizing tools and all the components used; price can be analyzed and finally
compared with market price, and then a relevant price can be set.
 Security Intelligence: Visualizing criminals' records can predict how much threat
they are to society. Each country has its security intelligence, and its task is to
visualize information and inform others about a security threat.

6.9 Tableau Pareto Chart


Named after Vilfredo Pareto, it’s a type of chart that contains both a line graph and a bar chart.
Here, the cumulative total is represented by the line graph and other data values with a bar chart in
descending order.
There is a principle developed in the year 1906 called Pareto or 80-20 rule used to check the
efficiency of your business plans. Below is a step-by-step guide for creating a Pareto chart in
tableau:
Load the Sample Superstore or any other dataset on the Tableau Desktop software.
Add the Sub-Category and Sales dimension from the Data panels to the Columns and Rows
sections.
Select the sort option from the drop-down menu of the Sub-Category column.
A dialog box will appear where you have to select the sort order to Descending and other options
as mentioned below screenshot.

Tableau Maps
Maps have a long history and remain a staple in our daily lives—to navigate on road trips or
understand proximity of one location to another. Until recently, maps were static and printed,
which limited the potential for business use cases. With technology advancements, content on maps
and the maps themselves became digital, interactive, and more appealing as they’re incorporated in
data analysis and reporting. Seeing location data mapped and included in visualizations has both
enhanced understanding by more audiences and offered a valuable, new context. Several best-in-
class interactive maps exist, but these ten notable examples cover different topics, span the globe,
and demonstrate the power of location data when paired with business intelligence.
Here in tableau, we have different types of maps, which are:
Tableau Proportional symbol maps
Tableau Choropleth maps (filled maps)
Tableau Point distribution maps
Tableau Heatmaps (density maps)
Tableau Flow maps (path maps)
Tableau Spider maps (origin-destination maps)

98 LOVELY PROFESSIONAL UNIVERSITY


Notes

Unit 06: Advance Data Visualization/Graph

6.10 Mapping Concepts in Tableau


It is very difficult to understand the insights of data even though the data is clearly processed and
arranged in tables. To tackle this issue or to have a clear understanding of data you must use
“Maps” which have occupied an important role in data visualization. We have multiple maps
available in the table which plays a unique role in visualizing the data.
There may be several reasons to use maps or plot your data on the map. Maybe you have some
location data or do you think plotting data on a map could help you in making your data pop?
These two reasons are good enough to create a map visualization. In Tableau each type of map
comes with unique features to cater to the specific needs of data mapping requirements.
Tableau maps answer your spatial questions and need to understand the trends in the data.
But you may have popped up with the question “what is the spatial question”?
The below-mentioned list is some of the spatial questions:

• Which state has the highest literacy rate in India?


• Which regions in the U.S. have the highest obesity rates?
• Where did storms move over a period of time?
• Which metro station is highly crowded with people in my city?
• Which state has more farmer’s markets in the U.S?

These are some of the Spatial questions, and the map is the best possible way to answer all your
questions.

Circumstances to use maps:


Till now we have come to know that if you have spatial question maps would be the perfect way to
answer your questions but there may be some exceptions in which you can answer the spatial
questions better with other types of charts instead of maps.

Let’s consider one of the spatial questions we have asked above.

Take, for example, the last question from the list above: Which state has more farmers markets in
the U.S?

Let us assume that you have entire data about the number of farmers markets across the U.S and
you wish to know which state has the highest number of farmer markets. The obvious thing that
would come to your mind is “Maps” to visualize this data. If you plot the given data related to the
US farmers market you will get an image like below.

LOVELY PROFESSIONAL UNIVERSITY 99


Notes

Advance Data Visualization

Summary
 While data visualization often conjures thoughts of business intelligence with button-down
analysts, it’s usually a lot more creative and colorful than you might think.
 There are many wide-ranging applications from business dashboards to public health
visualizations to pop culture trend breakdowns.
 Great and beautiful data visualization requires graphic design and storytelling skills in
addition to great analysis skills.
 Data visualization is the graphical representation of different pieces of information or data,
using visual elements such as charts, graphs, or maps

Keywords
 Tableau is a powerful data visualization tool that helps you in simplifying the data
visualization process.
 Tableau uses a different type of charts which includes Bar Chart, Line Chart, Pie Chart,
Maps, Scatter Plot, Gantt Chart, Bubble Chart, etc. Each Chart is unique and preferable for
specific purposes.
 Maps are among the few frequently used charts in Tableau. Let's get to know more about
Maps.

Self Assessment
1. 1 dimension and 1 measure required in which type of graph

A. Heat map
B. Scatter plot
C. Maps
D. Text chart

2. Geo dimension required in which type of graph

A. Heat map

100 LOVELY PROFESSIONAL UNIVERSITY


Notes

Unit 06: Advance Data Visualization/Graph

B. Scatter plot
C. Maps
D. Text chart

3. Geo dimension required in which type of graph

A. Symbol maps
B. Scatter plot
C. Maps
D. Both A and C

4. 2 to 4 measures s required in which type of graph

A. Heat map
B. Scatter plot
C. Maps
D. Text chart

5.Dimensions contain___________ values

A. Qualitative
B. Quantitative
C. Both
D. None of these

6.Measures contain___________ values

A. Qualitative
B. Quantitative
C. Both
D. None of these

7.Individually separate and distinct is

A. Continuous data
B. Discrete data
C. Random Data
D. None of these

8.___________ data means "forming an unbroken whole, without interruption"

A. Continuous data
B. Discrete data
C. Random Data
D. None of these

9. Green pills in tableau means

LOVELY PROFESSIONAL UNIVERSITY 101


Notes

Advance Data Visualization

A. Continuous data
B. Discrete data
C. Random Data
D. None of these

10. Blue pills in tableau means

A. Continuous data
B. Discrete data
C. Random Data
D. None of these

11.Creating graph options are available in

A. Measures
B. Dimensions
C. Show me
D. All of these

12. ________________helps to create reports, dashboards, and stories using different charts and
graphs.
A. Tableau Server
B. Tableau Desktop
C. Tableau Reader
D. All of these

13. ______________does not need to connect to any source, but it can read reports built on top of
any and all of the listed data sources that Tableau Supports.
A. Tableau Server
B. Tableau Desktop
C. Tableau Reader
D. All of these

14. Your data is out in the public once your report is published on to the ___________.
A. Tableau Public Server
B. Tableau Desktop
C. Tableau Reader
D. All of these

15. ___________is for somebody that only needs to monitor the analytics
A. Tableau Public Server
B. Tableau Desktop
C. Tableau Reader
D. All of these

102 LOVELY PROFESSIONAL UNIVERSITY


Notes

Unit 06: Advance Data Visualization/Graph

Answers for Self Assessment


1. D 2. C 3. D 4. B 5. A

6. B 7. B 8. A 9. A 10. B

11. C 12. B 13. C 14. A 15. C

Review Questions
1. Explain any 5 types of charts available in Tableau?
2. What is the difference between dual axis and blended axis in Tableau?
3. What is process to create scatter plot in Tableau?
4. Explain process to create maps in tableau using geographical data?
5. Explain difference between green and blue pills description?

Further Readings
"Information Dashboard Design: Displaying Data for At-a-glance Monitoring” by Stephen
Few
"Beautiful Visualization, Looking at Data Through the Eyes of Experts by Julie Steele, Noah
Iliinsky"

Web Links
https://www.tableau.com/
https://intellipaat.com/blog/what-is-tableau/

LOVELY PROFESSIONAL UNIVERSITY 103


Notes

Dr. Pritpal Singh, Lovely Professional University Unit 07: Building View Advance Map Option

Unit 07: Building View Advance Map Option


CONTENTS
Objectives
Introduction
7.1 Different Types of Maps
7.2 Building a Simple Tableau Custom Map
7.3 Building Different Types of Tableau Custom Maps
7.4 Point Distribution Tableau Custom Maps
Summary
Keywords
Self Assessment
Answers for Self Assessment
Review Questions
Further Readings

Objectives
After studying this unit, you will be able to:

• Understand concept of Tableau Maps.


• define geographical role.
• Understand Show me tab of tableau.
• Understand concept of different symbol maps.

Introduction
Understanding the Key Features of Tableau
Some of the key features of Tableau are as follows:
Data Sources: Tableau offers seamless integration with a large number of widely used platforms for
data storage such as File Systems like Microsoft Excel, CSV, etc., Relational Databases like Microsoft
SQL Server, Oracle, IBM DB2, etc., Cloud-based Systems such as Google Big Query, Windows
Azure, etc., or other sources such as ODBC/JDBC.
Attractive Visualizations: Tableau gives users the ability to create different types of data
visualizations. For example, users can easily create the simplest visualizations such as a Pie Chart
or Bar Chart or some of the most complex visualizations such as Bullet Chart, Gantt Chart, Boxplot,
etc. Tableau also comes with information on geographical data such as Countries, Cities, Postal
Codes, etc. that allows users to build visualizations using informative maps.
Wildcard Union and Cross-Data Join: Users have the ability to perform Cross-Data Join and Union
in Tableau. This helps in removing the barriers and time-consuming workarounds that were
required due to the massive use of numerous data sources.
Cross-Data Source Filtering: For data with common dimensions, Tableau gives users the ability to
perform the filter operation across multiple data sources at the same time. This also results in all
necessary edits or changes being made to all worksheets with the same data sources using the same
set of filters automatically.

104 LOVELY PROFESSIONAL UNIVERSITY


Notes
Advance Data Visualization

Mobile Dashboards: Tableau allows users to format all their Reports and Dashboards in such a
manner that it is compatible with mobile devices as well. It lets users create custom mobile layouts
for their Reports or Dashboard specific to their device.
Maps are one of the best ways to represent the data in Tableau. Data visualizations using maps look
very attractive and appealing. Map charts suites better when you want to show the demographic
data such as Population census, income, housing, household rates, etc. Maps give an easy-to-infer
advantage over the other charts available in Tableau and are highly interactive when you want to
plot demographic or geographical data on a plot.

7.1 Different Types of Maps


Tableau Proportional symbol maps
Tableau Choropleth maps (filled maps)
Tableau Point distribution maps
Tableau Heatmaps (density maps)
Tableau Flow maps (path maps)
Tableau Spider maps (origin-destination maps)

7.2 Building a Simple Tableau Custom Map

To build a Simple Tableau Custom Map, you need a data source, like Sample-Superstore data,
consisting of location data, location names, latitude, longitude coordinates. Without geographical
coordinates, you can’t prepare map visualization in Tableau. A simple Tableau Custom Map can be
created by implementing the following steps:

 Step 1: Open Tableau Desktop, connect to the Sample-Superstore data source, and the
worksheet will open in front of your screen.

 Step 2: Move your cursor to the Location option, select the Country & State parameter
under it, drag both of them to the worksheet.

LOVELY PROFESSIONAL UNIVERSITY 105


Notes

Unit 07: Building View Advance Map Option

 Step 3: Right-click over the State and select the Dimension from the drop-down list.

 Step 4: Drag the Sales table to the Mark sheet as shown below.

Step 5: Move your cursor to the Maps tab and choose Map Layers from the drop-down list.

106 LOVELY PROFESSIONAL UNIVERSITY


Notes
Advance Data Visualization

 Step 6: On the Map Layers pane, unselect the Country/Region Names and
select Normal from the drop-down list of style.

This is how you can design simple Tableau Custom Maps to perform a basic geographical analysis
of your data.

Creating a Polygon Tableau Custom Map

A simple Polygon or Filled Tableau Custom Map helps you understand the basic mapping concepts
in Tableau. The following steps can be implemented to create a Polygon Tableau Custom Map:

 Step 1: Drag the State parameter from the Data pane to the worksheet.

 Step 2: Move your cursor to the Marks pane, choose the Map option from the drop-down
list.

LOVELY PROFESSIONAL UNIVERSITY 107


Notes

Unit 07: Building View Advance Map Option

 Step 3: The worksheet will show the following visualization of the map.

 Step 4: Select the Sales parameter from the Data pane and place it over the map.

You can see the Number of Sales from the polygons in the updated map.

108 LOVELY PROFESSIONAL UNIVERSITY


Notes
Advance Data Visualization

7.3 Building Different Types of Tableau Custom Maps


Tableau Desktop enables you to design the following types of maps depending upon your business
needs and visualization requirements. The different kind of custom maps that can be created on
Tableau are as follows:

• Choropleth or Filled Tableau Custom Maps


• Flow or Path Tableau Custom Maps
• Proportional Symbol Tableau Custom Maps
• Point Distribution Tableau Custom Maps
• Heat or Density Tableau Custom Maps
• Spider or Origin-Destination Tableau Custom Maps

1) Choropleth or Filled Tableau Custom Maps

Choropleth Maps, also known as Filled Maps, are perfect to represent ratio and aggregated data.
Users can use ratio or aggregated data for polygons that can be related to locations, such as
countries, regions, states, or any area.

For simplicity, download Tableau Example Workbook and implement the following steps to show
ratio or combined data in Tableau Desktop:

 Step 1: Go to Worksheet Tab and select the New Worksheet from the drop-down list or
press CTRL+M. A New Sheet will open.

 Step 2: Under the State, Country dimension, select the State option and move to the sheet.

LOVELY PROFESSIONAL UNIVERSITY 109


Notes

Unit 07: Building View Advance Map Option

 Step 3: Now select the Datapoint of Alaska, United States.


 Step 4: Click over it and choose the Exclude option.
 Step 5: Repeat the same steps for Hawaii.

You’ll see a better version of the map.

110 LOVELY PROFESSIONAL UNIVERSITY


Notes
Advance Data Visualization

 Step 6: Click on the plus symbol of State to get details of all countries, as shown below.

 Step 7: Place your cursor over Percent- 2012 and drop it over the color option.

 Step 8: To get the obesity percentage range, select the Edit Colors option from
the Color icon.
 Step 9: Select the Purple color and click Apply.

LOVELY PROFESSIONAL UNIVERSITY 111


Notes

Unit 07: Building View Advance Map Option

 Step 10: Open the Effect option from the Color icon.
 Step 11: Select the None option from the Border list.

The output of the Choropleth will appear in front of your screen.

 Step 12: In the above map, Tableau selected the default color distribution. However, if you
want to change it, go to the Edit Color menu again. Mark the Stepped color and enter 8.
Click on the Apply button and close it.

112 LOVELY PROFESSIONAL UNIVERSITY


Notes
Advance Data Visualization

 Step 13: Repeat the same steps, but this time select 5.

 Step 14: The map view for 4 Stepped Color might look like this.

By selecting 4 instead of 5, you will understand that obesity rates are higher in the South. However,
prior maps were showing even distribution of colors or obesity rates in the United States (US). All

LOVELY PROFESSIONAL UNIVERSITY 113


Notes

Unit 07: Building View Advance Map Option

the maps are great to show aggregate data, yet each is giving you prominent information on obesity
rates in different countries.

Similarly, if you want to plot the map for a State Level detail, remove the County from
the Marks chart. You can analyze that Texas has higher obesity rates, followed by Georgia.

2) Flow or Path Tableau Custom Maps


Tableau Business Intelligence tool allows users to determine the flow of path over time, e.g., the
path of the storm, through Flow or Path Maps. To create Flow Maps in Tableau, download Example
Workbook and implement the following steps:

 Step 1: Open the downloaded example in Tableau Desktop.


 Step 2: Open a New Worksheet.
 Step 3: Move Latitude and Longitude coordinates using the drag-and-drop method.
 Step 4: Choose the Storm Name and place it over the Details icon in the Marks pane.

 Step 5: To apply filters, select the Date from the Data pane and place it over the Filters area.
 Step 6: Choose Year, such as 2012.
 Step 7: Click on Apply and close the screen.

114 LOVELY PROFESSIONAL UNIVERSITY


Notes
Advance Data Visualization

• Step 8: Repeat the same steps for Bhasin and select the West Pacific region.
• Step 9: Select Normal Background from the Map tab. The final map might look like this.

LOVELY PROFESSIONAL UNIVERSITY 115


Notes

Unit 07: Building View Advance Map Option

 Step 10: Select a Line from the Marks pane.

Step 11: Drag the Date from the Data pane and place it over the Path icon. This will remove the line
due to the absence of an exact date.

 Step 12: Click on the Date parameter, select an Exact Date option.

116 LOVELY PROFESSIONAL UNIVERSITY


Notes
Advance Data Visualization

 Step 13: Drag the Wind Speed (kt) from the Data pane and place it over the Size icon.
 Step 14: Right-click over the Wind Speed (kt) and choose the Average parameter.

 Step 15: Place Storm Name over the Colors icon to complete the Flow Map.

3) Proportional Symbol Tableau Custom Maps


A Proportional Symbol Map is a great start to acquire quantitative values for individual locations.
Nevertheless, your data source should contain quantitative values, longitude and latitude
coordinates to create Proportional Symbol Maps. Download Example Workbook to learn more in
detail.

• Step 1: Download Example Workbook.


• Step 2: Open the downloaded file on Tableau Desktop.
• Step 3: Open a New Worksheet.
• Step 4: Drag Latitude and Longitude to the sheet.

LOVELY PROFESSIONAL UNIVERSITY 117


Notes

Unit 07: Building View Advance Map Option

 Step 5: Select the ID from the Data pane and place it over the Details icon.
 Step 6: A dialog box will appear, select Add All Members.

 Step 7: Select Magnitude^10 and place it over Size in Marks.

118 LOVELY PROFESSIONAL UNIVERSITY


Notes
Advance Data Visualization

 Step 8: Grab the Magnitude to Color option.

• Step 9: Click on Edit Colors from the Color icon.


• Step 10: Select your preferred color, opacity (70%), and Border.
• Step 11: Click on Stepped Color and choose 8.
• Step 12: Click the Reversed checkbox.
• Step 13: Click on Advanced, click Center, and enter 7.

LOVELY PROFESSIONAL UNIVERSITY 119


Notes

Unit 07: Building View Advance Map Option

• Step 14: Right-click over the ID and select the Sort option.
• Step 15: Choose Descending for Sort Order option.

• Step 16: Choose Fields for Sort By option and then choose Magnitude.
• Step 17: Click OK.

Step 18: Select any appropriate background for your map. The final image of the map might look
like this.

120 LOVELY PROFESSIONAL UNIVERSITY


Notes
Advance Data Visualization

7.4 Point Distribution Tableau Custom Maps


Everyone loves to spot visual clusters, and Tableau Desktop makes this process super easy through
Point Distribution Maps. But your data source should have longitude and latitude coordinates to
map visual clusters. Download the Example Workbook right now and implement the following
steps:

• Step 1: Open Tableau Desktop and select a New Worksheet.


• Step 2: Click on the Latitude dimension.
• Step 3: Select the Geographic Role.
• Step 4: Choose the Latitude parameter.

• Step 5: Click on the Longitude dimension.

LOVELY PROFESSIONAL UNIVERSITY 121


Notes

Unit 07: Building View Advance Map Option

• Step 6: Select the Geographic role.


• Step 7: Choose the Longitude parameter.
• Step 8: Double-click over both Longitude and Latitude dimensions.

• Step 9: Click on the AVG(Longitude) and select Dimension.


• Step 10: Click on the AVG(Latitude) and select Dimension.

The map might look like something as follows:

122 LOVELY PROFESSIONAL UNIVERSITY


Notes
Advance Data Visualization

To make it clearer, move your cursor to the Marks card.

 Step 11: Click on the Size.


 Step 12: Move the bar to the left edge.

 Step 13: Zoom the graph to get the entire picture.

LOVELY PROFESSIONAL UNIVERSITY 123


Notes

Unit 07: Building View Advance Map Option

Maps are one of the most inherent and useful features in Tableau. The visualizations that contain
maps in Tableau look very appealing and is interactive as well. Most demographic data like
income, census based population, housing and household rates are in-built. It is also possible to use
custom geocodes to add geographic roles such as zip code, street names, etc.
Maps give an easy-to-infer advantage over the other charts that are available in Tableau. If the
available population data is consumed on the map, we can comprehend which regions are
densely/scarcely populated at a glance.
If your data set contains any kind of spatial data viz. State-wise or Country-wise data, Tableau
auto-generates the respective latitude and longitude for the spatial fields that are available in the
data set. However, the latitude and longitude fields that are auto-generated by Tableau can only be
used for generating the maps and cannot be used in any of the calculation fields or parameters of
the report. Tableau generates a map with the generated longitude and latitude by just a click of that
particular spatial field, which we will be discussing later in the blog.

Tableau provides two types of maps by default:


Symbol map
Filled map
Some of the basic scenarios that we might come across is just to view the spatial distribution of
data. Here, the coordinates of the geographic location do not play a significant role. In such cases, a
map may not even be the right choice of visualization of the data.

Summary
• Geographic Analysis of business and customer data is essential for revenue growth.
• By visualizing data on a map, businesses can answer numerous questions such as which
regions bring more sales, which countries are more profitable, which countries require more
Marketing efforts, etc.
• All in all, the mapping features of Tableau Desktop gives business the ability to get all the
answers to spatial questions.
• Tableau is a popular Business Intelligence and Data Analytics tool that was developed to
help organizational decision-makers visualize, analyze and understand complex business
data and make data-driven decisions.

Keywords
 There are many reasons to put your data on a map. Perhaps you have some location data in
your data source? Or maybe you think a map could really make your data pop? Both of those
are good enough reasons to create a map visualization, but it’s important to keep in mind that
maps, like any other type of visualization, serve a particular purpose: they answer spatial
questions.
 You make a map in Tableau because you have a spatial question, and you need to use a map
to understand the trends or patterns in your data.
 But what is a spatial question? Some examples might be:
 Which state has the most farmers markets?
 Where are the regions in the U.S. with the high obesity rates?

SelfAssessment

124 LOVELY PROFESSIONAL UNIVERSITY


Notes
Advance Data Visualization

1. Default Aggregation Used for Tree Map


A. Sum
B. Avg
C. Count
D. Countd

2. What Are the File Extensions In Tableau?


A. Tableau Workbook (.twb)
B. Tableau Packaged Workbook (.twbx)
C. Tableau Data Source(.tds)
D. All of the above

3. What Type of Join Is Used in Blending?


A. Right join
B. Left join
C. Full join
D. Inner join

4.The _________keyword returns all records from the right table (table2), and the matching
records from the left table (table1).

A. Right join
B. Left join
C. Full join
D. Inner join

5.The ______keyword returns all records from the left table (table1), and the matching records
from the right table (table2).

A. Right join
B. Left join
C. Full join
D. Inner join

6.____________returns all the rows from both joined tables, whether they have a matching row
or not.

A. Right join
B. Left join
C. Full join
D. Inner join

7. The INNER JOIN keyword selects records that have matching values in both tables.

A. Right join
B. Left join
C. Full join

LOVELY PROFESSIONAL UNIVERSITY 125


Notes

Unit 07: Building View Advance Map Option

D. Inner join

8.Power BI Is A Product Of

A. Oracle
B. Facebook
C. Microsoft
D. SAP

9.What Are The Components Of A Dashboard?

A. Horizontal
B. Vertical
C. Image Extract
D. All of the above

10. How Many Maximum Tables Can You Join In Tableau?

A. 2
B. 8
C. 16
D. 32

11. For creating variable size bins we use ______

A. Sets
B. Groups
C. Calculated fields
D. Table

12. For differentiating two dimensions we use

A. Sets
B. Measures
C. Fields
D. Table

13. Geo dimension required in which type of graph

A. Heat
B. Scatter plot
C. Maps
D. Text chart

14. Geo dimension required in which type of graph

A. Symbol maps
B. Scatter plot
C. Maps

126 LOVELY PROFESSIONAL UNIVERSITY


Notes
Advance Data Visualization

D. Both A and C

15. 2 to 4 measures s required in which type of graph

A. Heat map
B. Scatter plot
C. Maps
D. Text chart

Answers for Self Assessment


1. A 2. D 3. B 4. A 5. B

6. C 7. D 8. C 9. D 10. D

11. C 12. A 13. C 14. D 15. B

Review Questions
1. What are the map types in Tableau?
2. Which is the easiest way to create a map on Tableau?
3. What are the options for maps in Tableau?
4. How to define geographical role in Tableau maps?
5. What are advantages of Tableaumaps?

Further Readings
"Information Dashboard Design: Displaying Data for At-a-glance Monitoring” by Stephen
Few
"Beautiful Visualization, Looking at Data Through the Eyes of Experts by Julie Steele, Noah
Iliinsky"

Web Links
https://www.tableau.com/
https://intellipaat.com/blog/what-is-tableau/

LOVELY PROFESSIONAL UNIVERSITY 127


Notes
Dr. Pritpal Singh, Lovely Professional University Unit 08: Tableau Calculations & Filters

Unit 08: Tableau Calculations & Filters


CONTENTS
Objectives
Introduction
8.1 What are Tableau Filters?
8.2 Types of Tableau Filters
8.3 Data Source Filter
8.4 Context Filter
8.5 Dimension Filter
8.6 Measure Filter
8.7 User Filter
8.8 How to Implement Filters in Tableau?
Summary
Keywords
Self Assessment
Answers for Self Assessment
Review Question
Further Readings

Objectives
After studying this unit, you will be able to:

 understand concept of tableau filters.


 apply filters on dataset in tableau.
 understand real time analysis.
 collaboration with data.

Introduction
Tableau is a software tool that is used for data visualization and helps with data analysis and
business intelligence. Its technology allows you to perform complex computations, data blending,
and dashboarding to create visualizations that deliver insights that can’t be obtained from a
spreadsheet. Tableau has tools for organizing and simplifying data like Tableau filters. Tableau
filters help in minimizing the size of the data for efficiency purposes, cleaning up underlying data,
removing irrelevant dimension members, and setting measure or date ranges for what you want to
analyze. Tableau can assist anyone in seeing and comprehending their data. It uses Tableau Filters
to make the data more readable and organized. You can connect to any database, create
visualizations by dragging and dropping, and share them with a single click. The main objective of
Tableau is to help people visualize and understand their data.
Tableau’s self-service analytics platform enables anyone to work with data, regardless of their skill
level. It was aimed to help users create visuals and graphics without requiring the assistance of a
programmer or any prior programming knowledge. It is a highly scalable and easily deployable
platform.

128 LOVELY PROFESSIONAL UNIVERSITY


Notes

Advance Data Visualization

Filtering is the process of removing certain information from the available data by putting different
filters. Tableau is the most widely used data visualization tool with plenty of features to simplify
the process. Tableau provides both basic filters to deal with simple scenarios and advanced context-
based filters for performing complex calculations. The three types of basic filters available in
Tableau are: Filter Dates – This filter is applied on the date fields to remove specific date entries that
are not required. Filter Measures – This filter is applied to the measure fields to remove specific
measures based on the requirements. Filter Dimensions – This filter is applied on the dimension
fields for removing certain measures that are not required for the calculation
In Tableau, there are three types of basic filters as follows:

 Filters Dimensions: Filter dimensions are the filters applied to the dimension fields.
 Filters Measures: Filter measures are the filters applied to the measure fields.
 Filter Dates: Filter dates are the filters applied on the date fields.

8.1 What are Tableau Filters?


Tableau lets you filter individual views or entire data sources based on dimensions, measures, or
sets. In databases, filtering is a useful way to see only the data you want to see. When the data is
visualized in a readable, actionable format, Tableau filters are required to highlight any underlying
insights that can be derived from it.
Tableau filtersare based on a condition that can be used to limit the number of records in the
database. Tableau filters support both simple cases based on field values and advanced calculations
or context-based filters. The Tableau filter you choose, or a combination of Tableau filters, is largely
determined by what you want to limit your data set to.

8.2 Types of Tableau Filters


Tableau filters can be used to organize and visualize data based on predefined criteria in several
ways. Tableau has a total of six different types of filters:

 Extract Filter
 Data Source Filter
 Context Filter
 Dimension Filter
 Measure Filter
 User Filter

Extract Filter
As understood by its name, the extract filters are used to extract data from the various sources, by
saving a screengrab of the way it gets added on your file. Such methods can help in lowering the
tableau queries to the data source. As soon as you are done extracting data into your dashboard,
you can create the extract and execute Hide All Unused Files to clear the columns unused in the
datasheet of your panel.
The Tableau filter that extracts a small subset of data from the original data source is the extract
filter. If the user extracts data from the data source, this Tableau filter is used.
After connecting the text file to Tableau, you’ll see two options in the top right corner of the data
source tab: Live and Extract. A direct connection to a data source is referred to as a live connection.
And the extract connection takes the data from the data source and saves it to the Tableau
repository as a local copy.
The following is a step-by-step procedure for creating a Tableau extract filter:
Step 1: Connect the text file to Tableau.
Step 2:Click on the Extract button as shown below:

LOVELY PROFESSIONAL UNIVERSITY 129


Notes
Unit 08: Tableau Calculations & Filters

This creates a local copy in the Tableau repository.

 Step 3: Select Edit from the drop-down menu near the Extract button in the top right corner.
The Extract Data window is opened. Select the Add option in the Window.

 Step 4: Select a Tableau filter condition from the Add Filter window. Any of the fields can be
added as an Extract filter. Choose the category from the list and click OK.

130 LOVELY PROFESSIONAL UNIVERSITY


Notes

Advance Data Visualization

After clicking on OK, a filtered window will appear which shows data that was extracted using the
Extract Tableau filter.

You can also customize the list or use all values in the list.
There are different options other than the general category from which you can extract data using
Extract filter:

 The Wildcard option is used to filter fields using a Wildcard match. Users can type the
character and the field will be filtered according to the match. The different types of matches
are:

LOVELY PROFESSIONAL UNIVERSITY 131


Notes
Unit 08: Tableau Calculations & Filters

Contains Select the members if the member name contains typed characters.

Starts with Select the members if the member name starts with typed characters.

Ends with Select the members if the member name ends with typed characters.

Exactly
Select the members if the member name exactly matches with typed characters.
matches

You can customize your data using these matches and you will get the filtered data.

 The Tableau filter on condition option is used to filter the data set by giving several
conditions.
 You can filter data using multiple Byfield conditions following the steps below:
 Step 1: In the Filter, the window selects the Condition tab.
 Step 2: Click on the Byfield button.
 Step 3: Select the name of the field to be filtered.
 Step 4: Choose the aggregation type like Sum, average, and median from the drop-
down list.
 Step 5: Select the operator from the drop-down list.
 Step 6: Filter the selected field by entering the value.
 Step 7: Click Ok.

 You can also filter by condition using a formula. Follow the steps below to filter using
conditions:
 Step 1: Click on the by formula.
 Step 2: Enter the formula in the box.
 Step 3: Click on the Ok button.

132 LOVELY PROFESSIONAL UNIVERSITY


Notes

Advance Data Visualization

You can also filter data using Top or Bottom filters, which are used to select the top or bottom n
number of records. You can select filters Byfield or by the formula in this option too by following
the steps from the previous option or referring to the steps from here.

LOVELY PROFESSIONAL UNIVERSITY 133


Notes
Unit 08: Tableau Calculations & Filters

8.3 Data Source Filter


The Tableau Filter that applies the filter directly to the data source, allowing for quick uploads of
data is the Data Source Filter. It can limit the number of records in the data set. Both live and
extracted connections are supported by the Data Source Filter.
The process to select data filter is done by following the steps given:

 Step 1: On the data source tab, click the Add button in the top right corner.
 Step 2: The Edit Data Source Filters window appears. In the window, select the Add option.

134 LOVELY PROFESSIONAL UNIVERSITY


Notes

Advance Data Visualization

 Step 3: Follow the remaining steps from the topic Extract Filters -> Step 3 after clicking the
Add button.

8.4 Context Filter


A context filter is a discrete filter on its own, creating datasets based on the original datasheet and
the presets chosen for compiling the data. Since all the types of filters in tableau get applied to all
rows in the datasheet, irrespective of any other filters, the context filter would ensure that it is first
to get processed
Despite being constrained to view all data rows, it can be implemented to choose sheets as and
when required to optimize its performance by minimizing the data efficiently. ntext Filter is a
standalone Tableau filter that can create a new dataset from the original data set and compute the
worksheet selections. Context Filters are used to boost the performance of data source views, filters,
and queries. You could run a context filter before any other Tableau Filters, and then apply the
remaining filters on top of the data returned after context filtering.
To make a Context Filter, go to the context menu of an existing categorical filter and select Add to
Context. Once the view is created, the context is calculated. The context is then used to calculate all
other filters. Consider using a data source like Sample-superstore to find the top 10 subcategories of
products in the Furniture category. The following are the steps to take to create a context filter:

 Step 1: Drag the Sales field to the Columns shelf and the Sub-Category field to the Rows shelf.
 Step 2: From the Show Me tab, select the horizontal bar chart.
 Step 3: Drag the Sub-Category to the Filters shelf once more. The chart below is what you’ll
get.

 Step 4: In the filter shelf, right-click on the Sub-Category field and select Edit Filter, then select
the Top tab in the pop-up window.
 Step 5: Select the set fields set from the drop-down menu. Select Top 10 by Sales Sum from the
next drop-down menu, as shown below:

LOVELY PROFESSIONAL UNIVERSITY 135


Notes
Unit 08: Tableau Calculations & Filters

 Step 6:Select the Category field and drag it to the filter shelf. To edit the Category field, right-
click on it and select Furniture from the drop-down menu. As a result, three product
subcategories are displayed below.

 Step 7:Right-click on the Category: Furniture filter and select Add to Context to add the
context filter.

 Step 8: All of the preceding steps combine to produce a final result that displays a subcategory
of products from the Furniture category.

136 LOVELY PROFESSIONAL UNIVERSITY


Notes

Advance Data Visualization

Context filter is created because:

 Improve Performance: Queries will take a long time to run if you want to use a lot of filters or
if your data source is large. In this case, you can improve performance by using one or more
context filters.
 Create a Dependent Numerical or Top N Filter: You can arrange a numerical or top N filter
after setting a context filter to include only the data of interest.

8.5 Dimension Filter


In Tableau, dimensions are independent fields, typically any field that contains categorical or
qualitative data. Dimension Filters are those Tableau Filters that are applied to dimensional data.
It’s a non-aggregated filter that allows you to add a dimension, group, sets, and bins. The top or
bottom conditions, wildcard match, and formula can all be used to apply a Dimension Filter. This
Tableau filter can be used to include or exclude members from a dimension from the list. The
following is the procedure for adding a dimension as a filter:

 Step 1: Choose a dimension from the drop-down menu.


 Step 2: The Tableau Filter Window appears. Choose a member from the drop-down menu.
 Step 3: Click on the Ok button.

The procedure above filters the data set to only show records for the category Furniture.

LOVELY PROFESSIONAL UNIVERSITY 137


Notes
Unit 08: Tableau Calculations & Filters

8.6 Measure Filter


The Tableau Filter that can be used to filter data based on the values in a measure is called the
Measure Filter. Fields containing quantitative data are commonly referred to as measures. The data
can be modified using the aggregated measure values in a Measure Filter. A Measure Filter can be
applied by following the procedure:

 Step 1: You can gain access to Worksheet


 Choose a measure from the Measures tab. Drag the value into the Tableau Filter field.
 The Measures tab allows you to select a metric. In the Tableau Filter field, drag the value.
 Select Next.

 It brings up a window where you must choose a value range. The following are the other
types of options available in the window.

Range of
The minimum and maximum range of measure values can be given and filtered.
values

At least A minimum value of a measure is given to filter the data.

138 LOVELY PROFESSIONAL UNIVERSITY


Notes

Advance Data Visualization

At most A maximum value of a measure is given to filter the data.

Special An option to select null or non-null values and filter the data.

 Step 1: Choose a range of values. The upper and lower limits for the range of values can be
changed.
 Step 2: Click on the Ok button.

8.7 User Filter


The Tableau filter that protects the row-level data in a dataset is the User Filter. When the
workbook is published on a server, it can be used. For different users, different filtering conditions
can be used. It’s the process of limiting what data a user can see depending on who’s looking at the
dashboard.
To apply the User Filter, follow the steps:

 Step 1: In the Menu bar, select Server from the drop-down menu. Select the Create User Filter
option by moving the cursor over it. To create a user filter, select the field.

LOVELY PROFESSIONAL UNIVERSITY 139


Notes
Unit 08: Tableau Calculations & Filters

 Step 2: The Tableau Server Sign-in window appears. In the window, choose the Tableau
Online option.
 Step 3: A Tableau Online Sign-in Window appears. Fill in your email address and password.
Select the Sign in option.
 Step 4: It brings up a window labeled ‘User Filter.’ Add a User Filter by following the steps
below.
 Give your user filter a name.
 Choose a user from the list of users.
 Check in the members who are required to appear for the selected member.
 Choose Ok.

It establishes a Tableau user filter. As shown below, you can find the user filter in the sets pane.

The user sees only the filtered data when the workbook is published on the server. To secure data,
multiple users can have their User Filters.

8.8 How to Implement Filters in Tableau?


1. Keep or exclude data points by Selecting in your view
You can filter individual data points (marks), or a selection of data points from your view. For
example, if you have a scatter plot with outliers, you can exclude them from the view so you can
better focus on the rest of the data.

140 LOVELY PROFESSIONAL UNIVERSITY


Notes

Advance Data Visualization

To filter marks from the view, select a single mark (data point) or click and drag in the view to
select several marks. On the tooltip that appears, you can:
Select Keep Only to keep only the selected marks in the view.
Select Exclude to remove the selected marks from the view.

 These filtering options are not available if a Wildcard Match filter is already specified for the
same field.

2. Filter data using headers


You can also select headers to filter them from your view. To filter entire rows or columns of data
from your view, select the header in the view. On the tooltip that appears, select to Exclude or Keep
Only the selected data.
When you select a table header that is part of a hierarchy, all of the next level headers are also
selected.
3. Filter by dragging a field directly onto the Filters shelf
Another way to create a filter is to drag a field directly from the Data pane to the Filters shelf.
In Tableau Desktop, when you add a field to the Filters shelf, the Filter dialog box opens so you can
define the filter. The Filter dialog box differs depending on whether you are filtering categorical
data (dimensions), quantitative data (measures), or date fields.
4. Quick Filters/Filter Cards
You can control the appearance and interaction of your filter card in the view by selecting a filter
card mode. To select a filter card mode, in the view, click the drop-down menu on the filter card
and then select a mode from the list.

Summary
 Filtering is the way of expelling certain esteems or scope of qualities from an outcome set.
 The filtering capability in a BI tool can serve a variety of purposes including minimizing the
size of the data for efficiency purposes, cleaning up underlying data, removing irrelevant
dimension members, and setting measure or date ranges for what you want to analyze.
 Data can also be organized and simplified before actual drill downs and aggregation functions
through these filters.
 Tableau treats the date field in three different ways while applying the date field. It can apply
filter by taking a relative date as compared to today, an absolute date, or range of dates.

Keywords
 Filtering is the process of removing certain values or range of values from a result set. Tableau
filtering feature allows both simple scenarios using field values as well as advanced
calculation or context-based filters.
 Filter Dimensions are the filters applied on the dimension fields.
 Filter Measures are the filters applied on the measure fields.
 Filter Dates are the filters applied on the date fields.

Self Assessment
1. Default aggregation used for tree map__________.
A. Avg

LOVELY PROFESSIONAL UNIVERSITY 141


Notes
Unit 08: Tableau Calculations & Filters

B. Count
C. Sum
D. Countd

2. The best feature Tableau are except_____________.


A. Collaboration of data
B. Data Blending
C. Real time analysis
D. Data is more small and fit

3. How do you find the field is discrete in Tableau?


A. Green color
B. # symbol
C. Blue color
D. None

4. Where can we apply global filters?


A. Dashboards
B. Stories
C. Sheets
D. All of the above

5. Which of the following is not a Trend Line model ?


A. Linear Trend Line
B. Binomial Trend Line
C. Exponential Trend Line
D. Logarithmic Trend Line

6. Where can we apply global filters?


A. Dashboards
B. Stories
C. Sheets
D. All of the above

7. Tableau File Extension is_______________


A. twbx
B. twby
C. twbw
D. twbz

8. What type of join is used in blending?


A. Left join
B. Full join
C. Right join
D. Inner join

9. Which is type of filter in tableau

142 LOVELY PROFESSIONAL UNIVERSITY


Notes

Advance Data Visualization

A. Context Filter
B. Extract Filter
C. Data Source Filter
D. All of the above

10. _________in Tableau are used to extract a small subset of data from the original data
source
A. Context Filter
B. Extract Filter
C. Data Source Filter
D. All of the above

11. _________allow the direct application to source data.


A. Context Filter
B. Extract Filter
C. Data Source Filter
D. All of the above

12. ___________in Tableau are non-aggregated filters.


A. Context Filter
B. Extract Filter
C. Dimension Filters
D. All of the above

13. These are Aggregated filters and are always applied after non-aggregated filters
A. Context Filter
B. Measure Filters
C. Dimension Filters
D. All of the above

14. The _________can be applied across multiple worksheets by using the same source data
within a workbook
A. Context Filter
B. Global filters
C. Dimension Filters
D. All of the above

15. Filter types in Tableau are quickly accessible by using the right-click option
A. Context Filter
B. Quick Filters
C. Dimension Filters
D. All of the above

LOVELY PROFESSIONAL UNIVERSITY 143


Notes
Unit 08: Tableau Calculations & Filters

Answers for Self Assessment


1. C 2. D 3. C 4. D 5. B

6. D 7. A 8. A 9. D 10. B

11. C 12. C 13. B 14. B 15. B

Review Question
 What are filters and its types in Tableau?
 How many types of filters are there in Tableau?
 What is the difference between context filter and regular filter Tableau?
 What is the difference between a normal filter and a quick filter in Tableau?
 What is data source filters in Tableau?
 What is the difference between data source filter and extract filter in Tableau?

Further Readings
 "Information Dashboard Design: Displaying Data for At-a-glance Monitoring” by
Stephen Few
 "Beautiful Visualization, Looking at Data Through the Eyes of Experts by Julie
Steele, Noah Iliinsky"

Web Links

 https://www.tableau.com/
 https://intellipaat.com/blog/what-is-tableau/

144 LOVELY PROFESSIONAL UNIVERSITY


Notes
Dr. Pritpal Singh, Lovely Professional University Unit 09: Advance Data Visualization

Unit 09: Advance Data Visualization


CONTENTS
Objectives
Introduction
9.1 Types of Data Management
9.2 Why Data Management is Important
9.3 The Blue and Green Pills and What They Mean in Tableau?
9.4 Why Use Tableau Calculation Fields?
9.5 What are Hierarchies in Tableau?
9.6 Advantages of Tableau
Summary
Keywords
Self Assessment
Answers for Self Assessment
Review Questions
Further Readings

Objectives
After studying this unit, you will be able to:
• understand concept of tableau graphs.
• define blue and green pills in tableau.
• understand calculated fields tab of tableau.
• understand concept of different graphs.

Introduction
What is data management?
Data management is the practice of collecting, organizing, protecting, and storing an organization’s
data so it can be analyzed for business decisions. As organizations create and consume data at
unprecedented rates, data management solutions become essential for making sense of the vast
quantities of data. Today’s leading data management software ensures that reliable, up-to-date data
is always used to drive decisions. The software helps with everything from data preparation to
cataloguing, search, and governance, allowing people to quickly find the information they need for
analysis.

9.1 Types of Data Management


Data management plays several roles in an organization’s data environment, making essential
functions easier and less time-intensive. These data management techniques include the following:

 Data preparation is used to clean and transform raw data into the right shape and format for
analysis, including making corrections and combining data sets.
 Data pipelines enable the automated transfer of data from one system to another.

LOVELY PROFESSIONAL UNIVERSITY 145


Notes
Advance Data Visualization

 ETLs (Extract, Transform, Load) are built to take the data from one system, transform it, and
load it into the organization’s data warehouse.
 Data catalogs help manage metadata to create a complete picture of the data, providing a
summary of its changes, locations, and quality while also making the data easy to find.
 Data warehouses are places to consolidate various data sources, contend with the many data
types businesses store, and provide a clear route for data analysis.
 Data governance defines standards, processes, and policies to maintain data security and
integrity.
 Data architecture provides a formal approach for creating and managing data flow.
 Data security protects data from unauthorized access and corruption.
 Data modeling documents the flow of data through an application or organization.

9.2 Why Data Management is Important


Data management is a crucial first step to employing effective data analysis at scale, which leads to
important insights that add value to your customers and improve your bottom line. With effective
data management, people across an organization can find and access trusted data for their queries.
Some benefits of an effective data management solution include:

Visibility
Data management can increase the visibility of your organization’s data assets, making it easier for
people to quickly and confidently find the right data for their analysis. Data visibility allows your
company to be more organized and productive, allowing employees to find the data they need to
better do their jobs.

Reliability
Data management helps minimize potential errors by establishing processes and policies for usage
and building trust in the data being used to make decisions across your organization. With reliable,
up-to-date data, companies can respond more efficiently to market changes and customer needs.

Security
Data management protects your organization and its employees from data losses, thefts, and
breaches with authentication and encryption tools. Strong data security ensures that vital company
information is backed up and retrievable should the primary source become unavailable.
Additionally, security becomes more and more important if your data contains any personally
identifiable information that needs to be carefully managed to comply with consumer protection
laws.

Scalability
Data management allows organizations to effectively scale data and usage occasions with
repeatable processes to keep data and metadata up to date. When processes are easy to repeat, your
organization can avoid the unnecessary costs of duplication, such as employees conducting the
same research over and over again or re-running costly queries unnecessarily

9.3 The Blue and Green Pills and What They Mean in Tableau?
Tableau represents data different in the data pane and within the view depending on whether the
field is discrete (usually blue in color) or continuous (usually green in color). By definition - discrete
fields are fields that constitute of individually separate entities e.g., name of customers. While
continuous fields are fields that contain numerical data that can be measured on a scale. E.g., Sales,
profit, height, weight, temperature etc.
Blue vs green fields (discrete vs continuous fields)
In the Tableau data pane - you can differentiate discrete fields from continuous fields by looking at
the color of the visual cues (icon) before the field.
(Blue icons imply that the field is discrete while green icons imply that the field is continuous)

146 LOVELY PROFESSIONAL UNIVERSITY


Notes
Unit 09: Advance Data Visualization

Note, when you highlight fields on the data pane, discrete fields will appear as a blue pill while
continuous fields appear as a green pill.

The same happens when you drag the fields to the view i.e., (discrete fields are displayed as a blue
pill while continuous field as a green pill).

LOVELY PROFESSIONAL UNIVERSITY 147


Notes
Advance Data Visualization

How discrete and continuous fields change the view.


When dragged to the view – discrete fields add headers.

When dragged to the view – continuous fields add axes.

Discrete versus continuous fields on filters

148 LOVELY PROFESSIONAL UNIVERSITY


Notes
Unit 09: Advance Data Visualization

When added as a filter – discrete fields are displayed as a categorical filter, which you can use to
filter each value (member) in the field.

When added as a filter – continuous fields are displayed as a range of values (which you can use to
filter a range of values in the field).

Discrete versus continuous fields on the color shelf


When added to the color shelf – discrete fields display categorical palette and assigns color to each
value in the field.

When added to the color shelf – continuous fields display a quantitative legend with a continuous
range of colors.

LOVELY PROFESSIONAL UNIVERSITY 149


Notes
Advance Data Visualization

Converting fields from discrete to continuous and vice-versa


Sometimes Tableau can misinterpret a field to be continuous when it should be discrete. In such
scenarios, you can rectify this by right-clicking on the field and convert it to the right role.

9.4 Why Use Tableau Calculation Fields?


Before connecting data sources to Tableau, it is always suggested to collect as much data as
possible. Shouldn’t this data include all of the required fields for the analysis then?
There are many reasons for using calculation fields functionality in Tableau. The below are a few of
them:

1. To use different filters to remove unwanted results for better analysis


2. To segment data in new ways
3. To calculate ratios across different variables in Tableau, saving database processing and
storage resources
4. To convert the data type of a field, such as converting string to date
5. To aggregate data

Types of Calculations

150 LOVELY PROFESSIONAL UNIVERSITY


Notes
Unit 09: Advance Data Visualization

Calculated Fields in Tableau are created using calculations. The calculations in tableau which can
be used to create calculation fields are categorized into three classes which are mentioned below.

1. Basic Calculations- These calculations allow us to transform values at a data source level of
detail or at a visualization level of detail (aggregate calculation).
2. Level of Detail Expressions- The second way of creating a calculating field is by using LOD
expressions. LOD calculations allow you to compute values at the data source level and
visualization level, as well as give us even more control over the level of granularity we want
to compute.
3. Table Calculations - These calculations allow us to transform values at the visualization level
of detail only.
The choice of calculation depends on the type and requirements of your analysis.

How to Add Calculated Field in Tableau


In this example, we are using the Sample-Superstore data source that comes with Tableau Desktop
to create a Calculated Field.

1. Connect to the saved data source “Sample-Superstore” and move to sheet-1.


2. Select Analysis >> Create Calculated Field.

1. In the calculation editor, implement the following steps:


 Enter a name for the calculation field. In this example, the field is called the Profit ratio.
 Enter a formula that represents your logic. For this example, the following formula is used
 This formula gives us the profit ratio of each sub-category.

LOVELY PROFESSIONAL UNIVERSITY 151


Notes
Advance Data Visualization

When finished, click OK.


The new Calculation field is added to Measures in the Data pane as shown below.

9.5 What are Hierarchies in Tableau?


Before we start learning how to create hierarchies in Tableau, let us have a better understanding of
hierarchies. The term hierarchy is not specific to Tableau and you might have heard and used it in
many places before.
In the context of data, hierarchies are a logical arrangement of relevant unique attributes in a data
set. Hierarchies arrange data fields in a level, for instance, a Geography hierarchy would have a
region, country, state, city, area levels. Or, a Time hierarchy has a year, month, week, day as its
levels.
By creating hierarchies in Tableau, we set our data on different levels of detail and organize it.
Tableau can automatically create hierarchies by detecting relevant fields or you can create custom
hierarchies.

Creating Hierarchies in Tableau


Follow the steps given below to create hierarchies in Tableau.
Step 1: Drag a Field in Tableau Hierarchy
To start with creating a hierarchy in your data set, select a field from the list of dimensions and
measures. Select and hold the field and drag it on to or on top of another field. By doing this, we
add a field at a sub-level in the hierarchy.
Another way of adding a field in an existing hierarchy is to right-click on a field name, then
select Hierarchy from the list. Then select Add to hierarchy option and select the name of the
hierarchy in which you wish to add the field.

152 LOVELY PROFESSIONAL UNIVERSITY


Notes
Unit 09: Advance Data Visualization

Step 2: Name the Hierarchies in Tableau


As soon as you add a field on the top of another field, a window pops up where you need to enter
the name of the hierarchy. Enter a suitable name for the hierarchy and click on OK.

Step 3: Add More Fields in Tableau Hierarchy


Once you enter a name, your hierarchy can be seen on the left Data panel as shown in the
screenshot below. We put the Sub-category field under the Category field. That is, Category is on the
first level of the hierarchy and Sub-category is on the second level. Following step 1, you can add
more fields under a field in a hierarchy.

LOVELY PROFESSIONAL UNIVERSITY 153


Notes
Advance Data Visualization

Step 4: Drill Down Hierarchy in Tableau


Now, you can use this hierarchy into visualization by putting it in a Rows or Columns section. To
drill down in a hierarchy, click on the plus + sign given right next to a field name. As you can see in
the screenshot below, our field Category is on the top of the hierarchy. When we click on the + sign
near the field name, the field on a lower level in the hierarchy will be shown.

Step 5: Analyze Data in Tableau Hierarchy


As shown in the screenshot below, the field Sub-category and its contents are also visible in the bar
chart now. This is after drilling-down the hierarchy by one level. To go back to the top or a
preceding field in the hierarchy, click on the minus – sign present near a field name. In this way,
you can easily drill up or down a hierarchy to see and analyze data at different levels of detail.

154 LOVELY PROFESSIONAL UNIVERSITY


Notes
Unit 09: Advance Data Visualization

Step 6: Geo Hierarchy in Tableau


The screenshot below shows a geo hierarchy where hierarchy with the name Geography is created.
Under it, there are fields at sub-level such as Region, Country, State, City, etc.

How to Remove a Hierarchy in Tableau?


To remove a hierarchy in Tableau all you need to do is right-click on the hierarchy name (present in
the Data pane) and select the option Remove Hierarchy. This will remove all the fields from that
hierarchy and its name will no longer show in the Data pane

9.6 Advantages of Tableau


Advantages of Tableau
a) Data Visualization:
Tableau is primarily a tool for data visualization. Therefore, its technology supports intricate
calculations, data blending, and dashboarding so that stunning visualizations may be produced
that provide insights that are difficult to obtain by simply glancing at a spreadsheet. Due to its
commitment to achieving this goal, it has risen to the top of the data visualization heap.
Data Visualization
b) Mobile Support and Responsive Dashboard:

LOVELY PROFESSIONAL UNIVERSITY 155


Notes
Advance Data Visualization

Tableau Dashboard includes a fantastic reporting function that can tailor the dashboard precisely
for a given device, like a laptop or mobile phone. Tableau makes modifications to ensure that the
correct report is sent to the appropriate device based on the device the user sees the report on.
c) Tableau can handle large amounts of data:
Millions of rows of data can be handled with efficiency via Tableau. Large amounts of data can be
used to generate a variety of visualizations without compromising the dashboards’ performance.
Additionally, Tableau has a feature that allows users to create “live” connections to other data
sources, such as SQL, etc.
d) Ease of Implementation:
Tableau offers multiple options for visualization that improve the user experience. In addition,
Tableau is far simple to learn when compared with Business Objects, Python, and Domo, making it
possible for anyone to master it without any prior coding experience.
e) Quickly Create Interactive Visualizations:
The user can quickly construct a highly interactive display with Tableau’s drag-and-drop features.
The interface can accommodate many modifications while preventing you from producing charts
that go against recommended guidelines for data display. The Tableau Gallery has some incredible
images that you may explore.
f) Tableau Company Strategy:
Tableau has done a fantastic job positioning itself as the leader in data visualization software. As a
result, per Garner Magic Quadrant, Tableau has been a leader for more than six years. However,
Tableau might fall behind if it doesn’t innovate quickly, given the rising popularity of data science,
AI, and machine learning. You can tell that Forbes is worried about the profitability of Tableau
from the problems with the 2017 financial reporting.
g) Use of other scripting languages in Tableau:
Users can include Python or R to get around performance problems and do complicated table
calculations in Tableau. The software’s workload can be reduced by using Python script to execute
data purification operations with packages. However, Tableau does not accept Python as a native
scripting language. Consequently, you can import some of the packages or visuals.
II. Features of Tableau
Various features of Tableau make it unique from its competitors or other BI tools available in the
market.
These features are as follows.
Features of Tableau
a) Tableau Dashboard:
Tableau Dashboards use text, graphic objects, visualizations, and other elements to give you a
complete picture of your data. Dashboards can show data as stories, add various views and objects,
offer a range of layouts and formats, and allow users to apply appropriate filters. These features
make dashboards particularly informative. Even better, you can quickly duplicate a dashboard or
specific pieces from one workbook to another.
b) Collaboration & Sharing:
Tableau offers simple ways for users to work together and rapidly share data through
visualizations, sheets, dashboards, etc. You can use it to safely share data from many different data
sources, including hybrid, on-premise, and on-cloud. Quick reviews or feedback on the data are
obtained through instant, simple cooperation and data sharing, improving the data’s overall
analysis.
c) Live & In-memory Data:
Tableau guarantees connectivity to both real-time data sources and external data sources for in-
memory data extraction. As a result, the user has complete freedom to use data from various
sources without any limitations. By creating live data connections, you can consume data straight
from the data source or preserve it in memory by extracting it as needed from a data source.
Tableau offers extra tools to help with data connectivity, including automated extract refreshes and
alerting the user when a live connection fails, among other things.

156 LOVELY PROFESSIONAL UNIVERSITY


Notes
Unit 09: Advance Data Visualization

d) Data Sources:
On-premises files, spreadsheets, relational databases, non-relational databases, data warehouses,
big data, and on-cloud data are forms of data sources. Many forms of data connectors are also
supported by Tableau, including Presto, MySQL, Google Analytics, Google Sheets, Cloudera,
Hadoop, Amazon Athena, Salesforce, SQL Server, Dropbox, and many others.
e) Ask Data:
Tableau’s Ask data function has increased its popularity among consumers worldwide. This
functionality makes altering data as easy as performing standard Google searches. Simply write a
natural language question about your data, and Tableau will respond with the most pertinent
information. There are both text-based and graphic versions of the answers. For instance, the Ask
data option will search and instantly open the bar graph for you if what you sought is already there
in it. Users who can quickly go deep into data and uncover novel insights and patterns benefit from
the increased accessibility of such services.
f) Maps:
A lot of pre-installed map data, including cities, postal codes, administrative boundaries, etc., is
available in Tableau. You can customize the map by adding various geological layers as needed.
Tableau offers a variety of maps, including heat maps, flow maps, plethora maps, point distribution
maps, and more.
g) Robust Security:
Tableau gives data and user security significant consideration. It has a foolproof security system
based on authentication and permission methods for data communications and user access. You
have the option to combine Tableau with additional security protocols like Active Directory,
Kerberos, etc. It’s crucial to note that Tableau employs row-level filtering, which contributes to the
security of the data.
h) Advanced Visualizations (Chart Types):
Tableau’s extensive library of visuals is one of the software’s standout qualities and the reason for
its success.
You can create visuals with Tableau that are as simple as a:
Bar chart, Pie chart
More complex is:
Histograms, Gantt charts, bullet charts, motion charts, tree maps, boxplots, and many others.
By selecting the visualization type from the Show Me tab, any sort of visualization is simple to
choose and build
i) Trend Lines and Predictive Analysis:
Using Time Series and Forecasting is another fantastic Tableau tool. Tableau’s robust backend and
dynamic front end make trend lines and forecasting simple to create. You may quickly obtain data
projections such as a forecast or a trend line by just choosing a few parameters and performing
drag-and-drop operations on the relevant fields.

Summary
 Tableau Desktop is a versatile platform for data analysis and information exploration that any
organization can use.
 One of the most developed platforms for data visualization and analytics is Tableau Desktop,
a component of Tableau Software programs.
 Using the Tableau data source, users may author visualizations, workbooks, and dashboards
using Tableau Desktop.
 Users can share these workbooks or visualizations with them in various ways

LOVELY PROFESSIONAL UNIVERSITY 157


Notes
Advance Data Visualization

Keywords
 The user can quickly construct a highly interactive display with Tableau’s drag-and-drop
features.
 The interface can accommodate many modifications while preventing you from producing
charts that go against recommended guidelines for data display.
 The Tableau Gallery has some incredible images that you may explore.
 Users can include Python or R to get around performance problems and do complicated table
calculations in Tableau.
 Tableau Dashboards use text, graphic objects, visualizations, and other elements to give you a
complete picture of your data.

Self Assessment
1. Which Returns the absolute value of the given number.
A. ABS
B. ACOS
C. ASIN
D. ATAN

2. Returns the arc cosine of the given number. The result is in radians.
A. ABS
B. ACOS
C. ASIN
D. ATAN

3. Returns the arc sine of a given number. The result is in radians.


A. ABS
B. ACOS
C. ASIN
D. ATAN

4. Returns the arc tangent of a given number. The result is in radians.


A. ABS
B. ACOS
C. ASIN
D. ATAN

5. Rounds a number to the nearest integer of equal or greater value.


A. CEILING
B. DIV
C. EXP
D. FLOOR

6. Returns the integer part of a division operation, in which integer1 is divided by integer2.
A. CEILING
B. DIV

158 LOVELY PROFESSIONAL UNIVERSITY


Notes
Unit 09: Advance Data Visualization

C. EXP
D. FLOOR

7. Returns be raised to the power of the given number.


A. CEILING
B. DIV
C. EXP
D. FLOOR

8. Rounds a number to the nearest integer of equal or lesser value.


A. CEILING
B. DIV
C. EXP
D. FLOOR

9. ”Name’s“field in tableau is
A. Dimension
B. Measure
C. Both
D. None

10. Geographical data in tableau is


A. Dimension
B. Measure
C. Both
D. None

11. Numeric values are ……….


A. Dimension
B. Measures
C. Both
D. None

12. _______________can be aggregated


A. Dimension
B. Measures
C. Both
D. None

13. Which of following is conditional expression


A. If
B. Else
C. If else
D. All of these

14. Which of the following used to return values


A. If

LOVELY PROFESSIONAL UNIVERSITY 159


Notes
Advance Data Visualization

B. Else
C. If else
D. Then

15. The _______statement can come only after if or else if statement


A. If
B. Else
C. If else
D. Then

Answers for Self Assessment


1. A 2. B 3. C 4. D 5. A

6. B 7. C 8. D 9. A 10. A

11. B 12. B 13. D 14. D 15. B

Review Questions
 What are calculated fields?
 Where are calculated fields stored in Tableau?
 What is the difference between discrete and continuous?
 What is the Tableau used for?
 What is Tableau dashboard?
 What are the differences between the blue pills and green pills in Tableau?

Further Readings
 "Information Dashboard Design: Displaying Data for At-a-glance Monitoring” by
Stephen Few
 "Beautiful Visualization, Looking at Data Through the Eyes of Experts by Julie
Steele, Noah Iliinsky"

Web Links

 https://www.tableau.com/
 https://intellipaat.com/blog/what-is-tableau/

160 LOVELY PROFESSIONAL UNIVERSITY


Notes
Unit 10: Making Comparisons and Basic Calculation
Dr. Pritpal Singh, Lovely Professional University

Unit 10: Making Comparisons and Basic Calculation


CONTENTS
Objectives
Introduction
10.1 String Functions Available in Tableau:
10.2 Why use Tableau Calculation Fields?
10.3 Why Use Logical Calculations
10.4 Logical Functions Available in Tableau:
10.5 Logical Functions Example
10.6 What is Discrete Data?
Summary
Self Assessment
Answers for Self Assessment
Review Questions
Further Readings

Objectives
After studying this unit, you will be able to:

 Understand concept of logical functions.


 Understand concept of string functions.
 Understand dimensions and measures.
 Understand continuous and discrete data.

Introduction
Why use string functions
String functions allow you to manipulate string data (i.e. data made of text). Tableau uses the
current International Components for Unicode (ICU) library when comparing strings. The way
strings are sorted and compared is based both on language and locale, and it’s possible for vizzes to
change as the ICU is continuously updated for better language support. For example, you might
have a field that contains all of your customers' first and last names. One member might be: Jane
Johnson. You can pull the last names from all your customers into a new field using a string
function.

LOVELY PROFESSIONAL UNIVERSITY 161


Notes
Advance Data Visualization

10.1 String Functions Available in Tableau

Function Syntax Definition

ASCII ASCII(string) Returns the ASCII code for the


first character of string.
Example:
ASCII('A') = 65

CHAR CHAR(number) Returns the character encoded


by the ASCII code number.
Example:
CHAR(65) = 'A'

CONTAINS CONTAINS(string, Returns true if the given string


substring) contains the specified substring.
Example:
CONTAINS(“Calculation”,
“alcu”) = true

ENDSWITH ENDSWITH(string, Returns true if the given string


substring) ends with the specified
substring. Trailing white spaces
are ignored.
Example:
ENDSWITH(“Tableau”, “leau”)
= true

FIND FIND(string, Returns the index position


substring, [start]) of substring in string, or 0 if
the substring isn't found. If the
optional argument start is
added, the function ignores any
instances of substring that
appear before the index
position start. The first character
in the string is position 1.
Examples:
FIND("Calculation", "alcu") = 2
FIND("Calculation",
"Computer") = 0
FIND("Calculation", "a", 3) = 7
FIND("Calculation", "a", 2) = 2
FIND("Calculation", "a", 8) = 0
FIND("Calculation", "a", 3) = 7
FIND("Calculation", "a", 2) = 2
FIND("Calculation", "a", 8) = 0

FINDNTH FINDNTH(string, Returns the position of the nth


substring, occurrence) occurrence of substring within
the specified string, where n is
defined by the occurrence
argument.
Note: FINDNTH is not available

162 LOVELY PROFESSIONAL UNIVERSITY


Notes
Unit 10: Making Comparisons and Basic Calculation

for all data sources.


Example:
FINDNTH("Calculation", "a", 2)
=7

LEFT LEFT(string, number) Returns the left-most number of


characters in the string.
Example:
LEFT("Matador", 4) = "Mata"

LEN LEN(string) Returns the length of the string.


Example:
LEN("Matador") = 7

LOWER LOWER(string) Returns string, with all


characters’ lowercase.
Example:
LOWER("ProductVersion") =
"productversion"

LTRIM LTRIM(string) Returns the string with any


leading spaces removed.
Example:
LTRIM(" Matador ") = "Matador
"

MAX MAX(a, b) Returns the maximum


of a and b (which must be of the
same type). This function is
usually used to compare
numbers, but also works on
strings. With strings, MAX finds
the value that is highest in the
sort sequence defined by the
database for that column. It
returns Null if either argument
is Null.
Example:
MAX ("Apple","Banana") =
"Banana"

MID (MID(string, start, Returns the string starting at


[length]) index position start. The first
character in the string is position
1. If the optional
argument length is added, the
returned string includes only
that number of characters.
Examples:
MID("Calculation", 2) =
"alculation"
MID("Calculation", 2, 5) ="alcul"

LOVELY PROFESSIONAL UNIVERSITY 163


Notes
Advance Data Visualization

MIN MIN(a, b) Returns the minimum


of a and b (which must be of the
same type). This function is
usually used to compare
numbers, but also works on
strings. With strings, MIN finds
the value that is lowest in the
sort sequence. It returns Null if
either argument is Null.
Example:
MIN ("Apple","Banana") =
"Apple"

10.2 Why use Tableau Calculation Fields?


Before connecting data sources to Tableau, it is always suggested to collect as much data as
possible. Shouldn’t this data include all of the required fields for the analysis then?
There are many reasons for using calculation fields functionality in Tableau. The below are a few of
them:

 To use different filters to remove unwanted results for better analysis


 To segment data in new ways
 To calculate ratios across different variables in Tableau, saving database processing and
storage resources
 To convert the data type of a field, such as converting string to date
 To aggregate data
Types of Calculations
Calculated Fields in Tableau are created using calculations. The calculations in tableau which can
be used to create calculation fields are categorized into three classes which are mentioned below.
Basic Calculations- These calculations allow us to transform values at a data source level of detail or
at a visualization level of detail (aggregate calculation).
Level of Detail Expressions- The second way of creating a calculating field is by using LOD
expressions. LOD calculations allow you to compute values at the data source level and
visualization level, as well as give us even more control over the level of granularity we want to
compute.
Table Calculations – These calculations allow us to transform values at the visualization level of
detail only.

How to Add Calculated Field in Tableau


In this example, we are using the Sample-Superstore data source that comes with Tableau Desktop
to create a Calculated Field.

1. Connect to the saved data source “Sample-Superstore” and move to sheet-1.


2. Select Analysis >> Create Calculated Field.

164 LOVELY PROFESSIONAL UNIVERSITY


Notes
Unit 10: Making Comparisons and Basic Calculation

3. In the calculation editor, implement the following steps:


 Enter a name for the calculation field. In this example, the field is called the Profit ratio.
 Enter a formula that represents your logic. For this example, the following formula is
used
 This formula gives us the profit ratio of each sub-category.

 When finished, click OK.


The new Calculation field is added to Measures in the Data pane as shown below.

LOVELY PROFESSIONAL UNIVERSITY 165


Notes
Advance Data Visualization

10.3 Why Use Logical Calculations


Logical calculations allow you to determine if a certain condition is true or false (Boolean logic). For
example, you might want to quickly see if sales for each country you distribute your merchandise
to were above or below a certain threshold.
Tableau: Tableau is a very powerful data visualization tool that can be used by data analysts,
scientists, statisticians, etc. to visualize the data and get a clear opinion based on the data analysis.
Tableau is very famous as it can take in data and produce the required data visualization output in
a very short time.
Logical Function: Tableau provides various Logical Functions to perform logical operations on our
data. They are Tableau AND, NOT, OR, IF, ELSEIF, IF Else, CASE, ISNULL, IFNULL, ZN, IIF, etc.

Logical functions in tableau allow finding whether the given condition is True or False (Boolean
Function)

10.4 Logical Functions Available in Tableau:

Function Syntax Description

IN <expr1> IN <expr2> Returns TRUE if any value in <expr1> matches any


value in <expr2>.
The values in <expr2> can be a set, list of literal
values, or combined field.
Examples:
SUM([Cost]) IN (1000, 15, 200)
[Field] IN [SET]

AND IF <expr1> AND <expr2> THEN Performs a logical conjunction on two expressions.
<then> END
Example:
IF (ATTR([Market]) = "New Business" AND
SUM([Sales]) > [Emerging Threshold] )THEN "Well
Performing"

CASE CASE <expression> WHEN Performs logical tests and returns appropriate
<value1> THEN <return1> values. The CASE function evaluates expression,
WHEN <value2> THEN compares it to a sequence of values, value1, value2,

166 LOVELY PROFESSIONAL UNIVERSITY


Notes
Unit 10: Making Comparisons and Basic Calculation

<return2> ... ELSE <default etc., and returns a result. When a value that
return> END matches expression is encountered, CASE returns
the corresponding return value. If no match is
found, the default return expression is used. If there
is no default return and no values match, then Null
is returned.
CASE also supports WHEN IN construction, such as
CASE <expression> WHEN IN <set1> THEN
<return1> WHEN IN <combinedfield> THEN
<return2> ... ELSE <default> END
The values that WHEN IN compare to must be a set,
list of literal values, or combined field.

Additional notes

 CASE versus IF: CASE is often easier to use than


IIF or IF THEN ELSE. Typically, an IF function
performs a sequence of arbitrary tests, and a
CASE function searches for a match to an
expression. But a CASE function can always be
rewritten as an IF function, although the CASE
function will generally be more concise.
 CASE versus groups: Many times you can use a
group to get the same results as a complicated
CASE function. You may want to see which is
more performant for your scenario.
Examples:
CASE [Region] WHEN 'West' THEN 1 WHEN 'East'
THEN 2 ELSE 3 END
CASE LEFT(DATENAME('weekday',[Order
Date]),3) WHEN 'Sun' THEN 0 WHEN 'Mon' THEN
1 WHEN 'Tue' THEN 2 WHEN 'Wed' THEN 3
WHEN 'Thu' THEN 4 WHEN 'Fri' THEN 5 WHEN
'Sat' THEN 6 END

ELSE IF <expr> THEN <then> ELSE Tests a series of expressions returning the <then>
<else> END value for the first true <expr>.
Example:
If [Profit] > 0 THEN 'Profitable' ELSE 'Loss' END

ELSEIF IF <expr> THEN <then> Tests a series of expressions returning the <then>
[ELSEIF <expr2> THEN value for the first true <expr>.
<then2>...] [ELSE <else>] END
Example:
IF [Profit] > 0 THEN 'Profitable' ELSEIF [Profit] = 0
THEN 'Breakeven' ELSE 'Loss' END

END IF <expr> THEN <then> Tests a series of expressions returning the <then>
[ELSEIF <expr2> THEN value for the first true <expr>. Must be placed at the
<then2>...] [ELSE <else>] END end of an expression.

LOVELY PROFESSIONAL UNIVERSITY 167


Notes
Advance Data Visualization

Example:
IF [Profit] > 0 THEN 'Profitable' ELSEIF [Profit] = 0
THEN 'Breakeven' ELSE 'Loss' END

IF IF <expr> THEN <then> Tests a series of expressions returning the <then>


[ELSEIF <expr2> THEN value for the first true <expr>.
<then2>...] [ELSE <else>] END
Example:
IF [Profit] > 0 THEN 'Profitable' ELSEIF [Profit] = 0
THEN 'Breakeven' ELSE 'Loss' END

IFNULL IFNULL(expr1, expr2) Returns <expr1> if it is not null, otherwise returns


<expr2>.
Example:
IFNULL([Profit], 0)

IIF IIF(test, then, else, [unknown]) Checks whether a condition is met, and returns one
value if TRUE, another value if FALSE, and an
optional third value or NULL if unknown.
Example:
IIF([Profit] > 0, 'Profit', 'Loss')

ISDATE ISDATE(string) Returns true if a given string is a valid date.


Example:
ISDATE("2004-04-15") = True

ISNULL ISNULL(expression) Returns true if the expression is NULL (does not


contain valid data).
Example:
ISNULL([Profit])

MAX MAX(expression) or Max(expr1, Returns the maximum of a single expression across


expr2) all records or the maximum of two expressions for
each record.
Example:
MAX([Sales])

MIN MIN(expression) or MIN(expr1, Returns the minimum of an expression across all


expr2) records or the minimum of two expressions for each
record.
Example:
MIN([Profit])

NOT IF NOT <expr> THEN <then> Performs logical negation on an expression.


END
Example:

168 LOVELY PROFESSIONAL UNIVERSITY


Notes
Unit 10: Making Comparisons and Basic Calculation

IF NOT [Profit] > 0 THEN "Unprofitable" END

OR IF <expr1> OR <expr2> THEN Performs a logical disjunction on two expressions.


<then> END
Example:
IF [Profit] < 0 OR [Profit] = 0 THEN "Needs
Improvement" END

THEN IF <expre> THEN <then> Tests a series of expressions returning the <then>
[ELSEIF ,expr2> THEN value for the first true <expr>.
<then2>...] [ELSE <else>] END
Example:
IF [Profit] > 0 THEN 'Profitable' ELSEIF [Profit] = 0
THEN 'Break even' ELSE 'unprofitable' END

WHEN CASE <expr> WHEN <Value1> Finds the first <value> that matches <expr> and
THEN <return1> ... [ELSE returns the corresponding <return>.
<else>] END
Example:
CASE [RomanNumberal] WHEN 'I' THEN 1 WHEN
'II' THEN 2 ELSE 3 END

ZN ZN(expression) Returns <expression> if it is not null, otherwise


returns zero.
Example:
ZN([Profit])

10.5 Logical Functions Example


Tableau If Else Function Example
The If Else function will test the condition.
When the test condition is true, the statement after the THEN keyword will return
When it is False, the statement after the Else keyword will return.
Tableau If Else Statement Syntax
The syntax of the If Else statement in Tableau contains is as follows:
IF <Expression> THEN <True_statement>
ELSE <False_statement>
END

LOVELY PROFESSIONAL UNIVERSITY 169


Notes
Advance Data Visualization

Tableau ElseIf Function Example


The ElseIf function is handy to check multiple conditions.
Remember, these Tableau conditions will only execute if it’s previous IF or ELSEIF statement fails.

The ElseIf function sequentially executes the statement. It will check the first condition,
If the condition is TRUE, it executes the statement after the THEN keyword.
If it is FALSE, it checks the Next one (ElseIf condition) and so on.

170 LOVELY PROFESSIONAL UNIVERSITY


Notes
Unit 10: Making Comparisons and Basic Calculation

10.6 What is Discrete Data?


We collect data to find relationships, trends, and other concepts. For example, if you track the
number of push-ups you do each day for a month, an underlying goal is to evaluate your progress
and the rate of improvement.
With that said, your daily tally is a discrete, isolated number. There is no clear-cut range on how
many push-ups you can do in a day, so the relationship remains undefined. The more information
you collect over time; the more insights you can deduce.
For example, the average number of push-ups you did last week was 15 per day, which was five
more per day than the week before. Meanwhile, the number of push-ups is a whole, round number
that can't be broken down into smaller parts.

Examples of discrete data


Some discrete data examples are:
The number of customers who bought different items
The number of computers in each department
The number of items you buy at the grocery store each week

LOVELY PROFESSIONAL UNIVERSITY 171


Notes
Advance Data Visualization

Discrete data can also be qualitative. The nationality you select on a form is a piece of discrete data.
The nationalities of everyone in your workplace, when grouped, can be valuable information in
evaluating your hiring practices.
The national census consists of discrete data, both qualitative and quantitative. Counting and
collecting this identifying information deepens our understanding of the population. It helps us
make predictions while documenting history. This is a great example of discrete data's power.
Key characteristics of discrete data
Discrete data is often used in simple statistical analysis because it's easy to summarize and
compute. Let's look at some of the other key characteristics of discrete data.
Discrete data includes discrete variables that are finite, numeric, countable, and non-negative
integers (5, 10, 15, and so on).
Discrete data can be easily visualized and demonstrated using simple statistical methods such as
bar charts, line charts, or pie charts.
Discrete data can also be categorical - containing a finite number of data values, such as the gender
of a person.
Discrete data is distributed discretely in terms of time and space. Discrete distributions make
analyzing discrete values more practical.

What is continuous data?


Continuous data is a type of numerical data that refers to the unspecified number of possible
measurements between two realistic points.

These numbers are not always clean and tidy like those in discrete data, as they're usually collected
from precise measurements. Over time, measuring a particular subject allows us to create a defined
range, where we can reasonably expect to collect more data.

Continuous data is all about accuracy. Variables in these data sets often carry decimal points, with
the number to the right stretched out as far as possible. This level of detail is paramount for
scientists, doctors, and manufacturers, to name a few.

Examples of continuous data


Some continuous data examples include:

 The weight of newborn babies


 The daily wind speed
 The temperature of a freezer

When you think of experiments or studies involving constant measurements, they're likely to
be continuous variables to some extent. If you have a number like "2.86290" anywhere on a
spreadsheet, it's not a number you could have quickly arrived at yourself — think measurement
devices like stopwatches, scales, thermometers, and the like.

172 LOVELY PROFESSIONAL UNIVERSITY


Notes
Unit 10: Making Comparisons and Basic Calculation

A task involving these tools probably applies to continuous data. For example, if we're clocking
every runner in the Olympics, the times will be shown on a graph along an applicable line.
Although our athletes get faster and stronger over the years, there should never be an outlier that
skews the rest of the data. Even Usain Bolt is only a few seconds faster than the historical field
when it comes down to it.
There are infinite possibilities along this line (for example, 5.77 seconds, 5.772 seconds, 5.7699
seconds, etc.), but every new measurement is always somewhere within the range.
Not every example of continuous data falls neatly into a straight line. Still, over time a range
becomes more apparent, and you can bet on new data points sticking inside those parameters.

Key characteristics of continuous data


Unlike discrete data, continuous data can be either numeric or distributed over date and time. This
data type uses advanced statistical analysis methods considering the infinite number of possible
values. Key characteristics of continuous data are:

 Continuous data changes over time and can have different values at different time intervals.
 Continuous data is made up of random variables, which may or may not be whole numbers.
 Continuous data is measured using data analysis methods such as line graphs, skews, and so
on.
 Regression analysis is one of the most common types of continuous data analysis.

The importance of continuous and discrete data


Just because we threw a "versus" in the title doesn't mean it's a competition (though we won't stop
you from making "Team Discrete" or "Team Continuous" t-shirts).The fact is, both types of data are
equally valuable to data collectors, and you'll encounter moments every day that lead to
measurements that could contribute to either data type. Any well-rounded research is formed by
combining these two unique sets of data.
Now that you know how to identify discrete and continuous data, we hope you enjoy
demonstrating these skills, whether naming them with your peers or using this knowledge to
inform your research.

Summary
 Tableau provides various Logical Functions to perform logical operations on our data
 They are Tableau AND, NOT, OR, IF, ELSEIF, IF Else, CASE, ISNULL, IFNULL, ZN, IIF, etc.
 The Tableau OR function is like either or statement in English.
 The IIF function is the simple version of the If Else Function.
 With string functions, you can create expressions in Access that manipulate text in a variety of
ways

Self Assessment
1. Returns TRUE if any value in <expr1> matches any value in <expr2>.
A. IN
B. AND
C. CASE
D. ELSE

2. Performs a logical conjunction on two expressions.


A. IN
B. AND

LOVELY PROFESSIONAL UNIVERSITY 173


Notes
Advance Data Visualization

C. CASE
D. ELSE

3. Performs logical tests and returns appropriate values


A. IN
B. AND
C. CASE
D. ELSE

4. Tests a series of expressions returning the <then> value for the first true <expr>.
A. IN
B. AND
C. CASE
D. ELSE

5. Tests a series of expressions returning the <then> value for the first true <expr>. Must be
placed at the end of an expression>.
A. IN
B. AND
C. CASE
D. End

6. Checks whether a condition is met, and returns one value if TRUE, another value if
FALSE, and an optional third value or NULL if unknown.>.
A. IN
B. AND
C. IIF
D. ELSE

7. Returns true if a given string, is a valid date.


A. IN
B. ISDATE
C. CASE
D. ELSE

8. Returns the maximum of a single expression across all records or the maximum of two
expressions for each record.
A. MAX
B. AND
C. CASE
D. ELSE

9. Returns the ASCII code for the first character of string.


A. ASCII
B. ASC
C. CHAR

174 LOVELY PROFESSIONAL UNIVERSITY


Notes
Unit 10: Making Comparisons and Basic Calculation

D. CONTAINS.

10. Returns the character encoded by the ASCII code number


A. ASCII
B. ASC
C. CHAR
D. CONTAINS

11. Returns true if the given string contains the specified substring.
A. ASCII
B. ASC
C. CHAR
D. CONTAINS

12. Returns the left-most number of characters in the string.


A. LEFT
B. LEFTS
C. CHARS
D. CONTAINS

13. Returns the length of the string.


A. LEFT
B. LEN
C. LENGTH
D. CONTAINS

14. _______means "individually separate and distinct.".


A. LEFT
B. DISCRETE
C. LENGTH
D. CONTINOUS

15. ________means "forming an unbroken whole, without interruption"


A. LEFT
B. DISCRETE
C. LENGTH
D. CONTINOUS

Answers for Self Assessment


1. A 2. B 3. C 4. D 5. D

6. C 7. B 8. A 9. A 10. C

11. D 12. A 13. B 14. B 15. D

LOVELY PROFESSIONAL UNIVERSITY 175


Notes
Advance Data Visualization

Review Questions
 How do you make data continuous in Tableau?
 What are 5 examples of continuous data?
 What are the logical functions in Tableau?
 What function in Tableau is used to perform logical tests and return appropriate values?
 What are the string functions in tableau?

Further Readings
 "Information Dashboard Design: Displaying Data for At-a-glance Monitoring” by
Stephen Few
 "Beautiful Visualization, Looking at Data Through the Eyes of Experts by Julie Steele,
Noah Iliinsky"

Web Links

 https://www.tableau.com/
 https://intellipaat.com/blog/what-is-tableau/

176 LOVELY PROFESSIONAL UNIVERSITY


Notes
Dr. Pritpal Singh, Lovely Professional University Unit 11:Advance Calculation

Unit 11: Advance Calculation


CONTENTS
Objective
Introduction
11.1 Setting up Visualization for Tableau Table Calculation
11.2 Table Calculation Basics
11.3 Dimension for Addressing and Partitioning
11.4 Table Calculation Function
Summary
Keywords
Self Assessment
Answers for Self Assessment
Review Questions
Further Readings

Objective
After studying this unit, you will be able to:

 Understand concept of advance table calculations


 Understand concept of table calculation.
 Understand Partitioning or Addressing.
 Understand continuous and discrete data.

Introduction
A Tableau Table Calculation is a transformation that is performed on the values in a Visualization.
Tableau Calculations are a subset of calculated fields that compute the local data in Tableau.
Table Calculations can be used for several different things, including:

 Converting values into rankings


 Changing values to display running totals
 Changing values to show the percentage of total
A Virtual Table is determined by the dimensions in the view for any Tableau Visualization. This
table differs from the tables in your data source. Typically, the dimensions within the detail level
determine the Virtual Table. This means that how Visualization is built, which dimensions are
added, and what data is filtered out all play a critical role in ensuring that Table Calculations work
as intended.
Also, it has provided simple solutions such as Quick Table Calculations in Tableau. They make an
educated guess as to how you want math, such as running sum or percentage of the total, to work
on your Visualization. They are made by right-clicking on a measure and selecting ‘Quick Table
Calculation ‘.
Tableau Table Calculations are represented visually in Tableau’s interface by a triangle within
the pill of the measure. Tableau provides many ways to test out calculated preset settings, and we
will focus on the last setting – Specific Dimensions – to master the underlying concepts.

LOVELY PROFESSIONAL UNIVERSITY 177


Notes
Advance Data Visualization

Each dimension in your view must fall into one of two categories within specific
dimensions: Partitioning or Addressing. Tableau visualizes Partitioning (unchecked) or Addressing
using a list of checkboxes (checked).
1) Partitioning
Partitioning is the process of determining where Table Calculations begin and end. Partitioning is
indicated in Tableau by unchecked checkboxes in the Edit Table Calculation window. Calculations
such as percent of total necessitate determining the scope or partition of the math (i.e. what rows
need to add up to 100 percent).
2) Addressing
The Calculation’s direction is defined by the address. Addressing is more difficult to grasp because
it specifies which dimensions are being referenced (‘compute based on what?’) as well as the order
in which they will be used (order matters!). ‘Compute using’ is synonymous with setting the
‘addressed’ fields in Tableau’s user interface.

11.1 Setting up Visualization for Tableau Table Calculation


Here are some steps to apply Quick Visualization for Table Calculations in Tableau:

 Connect to the Sample-Superstore data source in Tableau Desktop.


 Go to a new worksheet.
 Drag the Order Date field from the Data pane’s Dimensions shelf to the Columns shelf.
 Drag the field State to the Rows shelf from the Data pane’s Dimensions.
 Drag the field Sales to Text on the Marks Card from the Data pane, under Measures.
 Drag the field Profit to Color on the Marks Card from the Data pane, under Measures.
 Select Square from the Mark Type drop-down menu on the Marks card.
Tableau Table Calculation Functions
Table Calculations in Tableau functions enable you to compute values in a table. For example, you
can compute the percentage of total sales that an individual sale represents over a year or several
years.
The following are the basic Table Calculations in Tableau functions:

 LOOKUP (expression, [offset]): It returns the expression’s value in a target row that is
specified as a relative offset from the current row.
 ZN (): If the expression is not null, it returns it; otherwise, it returns zero.
 TOTAL (): It returns the total in a table calculation partition for the given expression.
 RANK (expression, ‘asc’ | ‘desc’): It returns the standard competition rank for the partition’s
current row. Identical values are assigned the same rank. To specify ascending or descending
order, use the optional ‘as‘ | ‘desc‘ argument. Ascending is the default.
 WINDOW AVG (expression, [beginning, end]): It computes the average of the expressions
contained within the window. Offsets from the current row are used to define the window.
 ABS (): It returns the absolute value of the number given.
 INDEX (): It returns the index of the current row in the partition, with no value sorting. The
first-row index is 1.
 FIRST (): It will return the number of rows between the current row and the partition’s first
row.
 LAST (): It will return the number of rows from the current row to the partition’s last row.
 CONTAINS (expression, expression to look for): If the given string contains the specified
substring, it returns true

178 LOVELY PROFESSIONAL UNIVERSITY


Notes
Unit 11:Advance Calculation

11.2 Table Calculation Basics


Table calculations rely on two types of fields: addressing and partitioning fields. The key to
understanding table calcs is to know how these fields work.
Partitioning fields define the scope: They break up the view into multiple partitions or sub-views.
The table calculation is then applied to the marks within each partition.
Addressing fields define the direction: They define the “direction” that the calculation moves (for
example, in calculating a running sum, or computing the difference between values).
How we define these in Tableau, depends on our desired amount of control over the end result.
Quick Table Calculation: Contains all dimensions in the level of detail, either for partitioning
(scoping) or for addressing (direction). Tableau identifies some dimensions as addressing and
others as partitioning automatically, as a result of your selections. This can be altered with
Compute Using, however it is subject to the structure of the view.
Add a Table Calculation: Table Calculations can also be added using Add a Table Calculation from
a Measure’s context menu. This allows you to determine which dimensions are for addressing and
which are for partitioning using Specific Dimensions.
Compute Using: Selecting “Compute Using” from the Measure context menu allows us to compute
the Table Calculation based on the architecture of the table, or on a particular field. Bear in mind
that a change in the structure of the view will also change your results.
Edit Table Calculation: Select “Edit Table Calculation” from the Measure context menu to
specifically define the fields to partition and address in the view. Partitioning and addressing
defined with “Specific Dimensions” will hold your results regardless of architectural changes in the
view.
1. Percent change from a reference date
With table calculations, you can calculate the percent change from an arbitrary value. Suppose you
are interested in a portfolio of stocks, and want to evaluate the relative performance of them from a
point in time. To do this, you need to set an “investment date” and normalize them to the same
point in time, with lines showing percentage change. You adjust the reference date using the slider.

2. Common baseline
You may want to see data from a common starting point rather than over an absolute timeline. For
example, here are the box office receipts for the first three Toy Story movies. It’s much easier to
compare them if you look at gross receipts by week since the opening date:

LOVELY PROFESSIONAL UNIVERSITY 179


Notes
Advance Data Visualization

3. Percent-of-total sales over time (Secondary Calculation)


It's common to want to perform two table calculations at once. For example, it can be interesting to
see how a segment has grown or shrunk in importance to the company over time. To do this, you
must first compute running sum of sales by segment over time, then look at that as a percent of all
sales over time. This is also called a Secondary Calculation in Tableau and it can be done without
even writing a formula.

4. Preserving ranking (even while sorting)


Here we need to see the rank of a product within a month and year, and then show how its ranking
changes across time. To achieve this, we create a bump chart, which shows change over time as a
line chart. On the left, we can see how copiers and fax machines have gone from a poorly
performing product to presently being our third largest seller. We can also see that there has been a
lot of volatility in the purchase of fax machines and copiers.

180 LOVELY PROFESSIONAL UNIVERSITY


Notes
Unit 11:Advance Calculation

5. Running Total
You need to monitor the number of active support cases at your call center, or stock on shelves. But
the system doesn’t record the rolling total of active cases and you need to derive it. This is equal to
# of Cases at Day Open + New Cases + Reopened Cases – Closed cases.
On the surface this is a simple calculation. However, the daily opening position is derived from the
prior day close, which, in turn, is derived from that day’s opening position. This creates a circular
reference of calculations.

6. Weighted average
Data such as test scores or order priority lends itself to analysis by weighted average. Perhaps you
are looking at the average priority of all orders across product types and want to weigh that
priority by order volume, so that higher-volume products receive a higher priority score. You
might use that weighted average priority score to optimize your supply chain for high-volume,
high-priority products. Here we do just that using Superstore sales data:

LOVELY PROFESSIONAL UNIVERSITY 181


Notes
Advance Data Visualization

7. Grouping by a calculation
If you are managing a company's shipping operations, you may be interested in why products’
shipping costs are higher than average. You can compute the average across a window and use that
in a calculation to group and color values

8. Number of incidents over a moving range


Diverse scenarios such as retail or intelligence often involve the number of times an event has
occurred within a window. For example, one suspicious event may be an anomaly, but if it happens
more than n times in x days, then it warrants investigation.

182 LOVELY PROFESSIONAL UNIVERSITY


Notes
Unit 11:Advance Calculation

9. Moving average over variable periods


You have computed the moving average for sales for all months by using the Quick Table
Calculation functions in Tableau, but would now like to extend it so that your end user can choose
how many periods they want to average. The pale blue line shows the SUM of sales for all months,
while the orange line shows the 15-period moving average of sales.

10. Difference from average by period


You may be interested in seeing the difference in quarterly sales from that year’s average. Here we
show the difference from this year’s average, the overall average, and the total number of orders.

LOVELY PROFESSIONAL UNIVERSITY 183


Notes
Advance Data Visualization

11.3 Dimension for Addressing and Partitioning


When we add table calculation in Tableau, Tableau itself determines some dimensions as
addressing and others as partitioning. But when we want a specific dimension, then we have to
decide which dimension are used for addressing and which is for partitioning.
Table (Across)
It will compute across the length of the table and will restart after every partition

Table (Down)
It will compute down the length of the table and will restart after every partition

184 LOVELY PROFESSIONAL UNIVERSITY


Notes
Unit 11:Advance Calculation

Table (Across the Down)


It will compute across the length of the table and then will go down the length of the table

Table (Down then Across)


It will compute down the length of the table and then will go across the length of the table.

LOVELY PROFESSIONAL UNIVERSITY 185


Notes
Advance Data Visualization

Pane (Down)
It will compute down an entire pane

Pane (Across then Down)


It will compute across an entire pane and the down the pane

186 LOVELY PROFESSIONAL UNIVERSITY


Notes
Unit 11:Advance Calculation

Pane (Down the Across)


It will compute down an entire pane and then across the pane

11.4 Table Calculation Function


Why to use Table Calculation Function?
Tableau calculation function allows:

 Compare a singular measure to itself


 Converting values into ranking
 Changing values to display running tools and show the percentage of total

LOVELY PROFESSIONAL UNIVERSITY 187


Notes
Advance Data Visualization

Note: Tableau calculations are created locally and present in the view, i.e., they can’t be reused in
the data source
Table Calculation Function
index()

 t will return the index of the current row in the partition without sorting
 Indexing starts with one, i.e., the first-row index is 1.
 Syntax: INDEX()
 Example: If you are currently on the 10th row in the partition, then INDEX () will return 10
first()

 It will return the number of rows from the current row to the first row in the partition
 Syntax: first()
 Example: If you are currently on the ten the row in the partition, then first() will return -9
last()

 It will return the number of rows from the current row to the last row in the partition
 Syntax: last()
 Example: If there are 10 rows in your partition and you are currently on the 7th row, then the
last will return 3
lookup()

 It returns the value of the selected targeted expression and points to the relative offset in the
current row.
 In offset is advised to use first() + n or last() – n if the target is related to the first and last
part of the partition.
 Syntax: LOOKUP(expression, [offset])
 Example: LOOKUP(SUM (Marks), first()+2)
 It will add the sum(marks) in the third row of the partition.
Rank()

 It will return the standard competition rank for the current row.
 Syntax: RANK(expression, [‘asc’|’desc’])
 asc and desc denote ascending and descending order, respectively
 The default is descending order.
 Example: If (20, 25, 23, 23, 45, 12) are the marks of the student of a class, then the set of values
would be ranked (5, 2, 3, 3, 1, 6)
RANK_DENSE

 It will return the dense rank for the current row in the partition.
 Identical values are assigned an identical rank, but there is no gap inserted in the rank
sequence.
 Syntax: RANK_DENSE(expression, [‘asc’|’desc’])
 The default is descending order.
 Example: If (20, 25, 23, 23, 45, 12) are the marks of the student of a class, then the set of values
would be ranked (4, 2, 3, 3, 1, 5)
Note:

 Nulls are ignored in both RANK() and RANK_DENSE()

188 LOVELY PROFESSIONAL UNIVERSITY


Notes
Unit 11:Advance Calculation

 Apart from RANK and RANK_DENSE, we have RANK_MODIFIED, RANK_PERCENTILE,


AND RANK_UNIQUE functions as well to work with the rank data.
Window_AVG

 It will return the average of the input expression within the window (i.e., the number of rows
you selected)
 Syntax: WINDOW_AVG(EXPRESSION, [start, end])
 If in the function, start and end are omitted, then the entire partition will be selected
 Example: WINDOW_AVG (SUM[Marks], FIRST()+5, 0)
 The above function will calculate the average of marks from the 6th row to the current
row.

Similar to WINDOW_AVG, we can

useWINDOW_SUM, WINDOW_COUNT, WINDOW_VAR, WINDOW_STDEV, WINDOW_MAX,

WINDOW_MIN, WINDOW_MEDIAN, WINDOW_COVAR, WINDOW_CORR and WINDOW_PE

RCENTILE.
RUNNING_SUM

 It will calculate the running sum of the given expression


 i.e., each value is added to the previous value
 Syntax: RUNNING_SUM(expression)
 Example: RUNNING_SUM(SUM[Sale]) will return the running sum of SUM[Profit]
Similar to the RUNNING_SUM(), we have RUNNING_AVG, RUNNING_COUNT,
RUNNING_MAX, and RUNNING_MIN.
SIZE

 It will return the number of rows in the partition


 Syntax: SIZE()
 Example: If there are ten rows in the partition, the size of the data partition is 10.

Summary
 Any data analysis involves a lot of calculations.
 In Tableau, the calculation editor is used to apply calculations to the fields being analyzed.
 Tableau has a number of inbuilt functions which help in creating expressions for complex
calculation
 These are the calculations which are applied to the values in the entire table.
 For example, for calculating a running total or running average, we need to apply a single
method of calculation to an entire column.
 Such calculations cannot be performed on some selected rows.
 Table has a feature called Quick Table Calculation, which is used to create such calculations.
 Sorting of data is a very important feature of data analysis. Tableau allows the sorting of data
of the fields, which are called dimensions.

Keywords
 Calculated fields allow you to create new data from data that already exists in your data
source.

LOVELY PROFESSIONAL UNIVERSITY 189


Notes
Advance Data Visualization

 When you create a calculated field, you are essentially creating a new field (or column) in
your data source, the values or members of which are determined by a calculation that you
control.
a) This new calculated field is saved to your data source in Tableau, and can be used to create
more robust visualizations.

Self Assessment
1. Table calculations can be used for which of following purposes
A. Transforming values to rankings
B. Transforming values to show running totals
C. Transforming values to show percent of total
D. All of these

2. The dimensions that define how to group the calculation are;


A. Partitioning fields
B. Addressing fields
C. Dimensions
D. Measures

3. The remaining dimensions, upon which the table calculation is performed, are called
A. Partitioning fields
B. Addressing fields
C. Dimensions
D. Measures

4. ____________ contain qualitative values (such as names, dates, or geographical data)


A. Partitioning fields
B. Addressing fields
C. Dimensions
D. Measures

5. ___________contain numeric, quantitative values that you can measure.


A. Partitioning fields
B. Addressing fields
C. Dimensions
D. Measures

6. Computes across the length of the table and restarts after every partition.
A. Table (across)
B. Table (down)
C. Table (across then down)
D. Table (down then across)

7. Computes down the length of the table and restarts after every partition.

190 LOVELY PROFESSIONAL UNIVERSITY


Notes
Unit 11:Advance Calculation

A. Table (across)
B. Table (down)
C. Table (across then down)
D. Table (down then across)

8. Computes across the length of the table, and then down the length of the table.
A. Table (across)
B. Table (down)
C. Table (across then down)
D. Table (down then across)

9. Computes down the length of the table, and then across the length of the table.
A. Table (across)
B. Table (down)
C. Table (across then down)
D. Table (down then across)

10. Computes down an entire pane


A. Pane (down)
B. Pane (across then down)
C. Pane (down then across)
D. Cell

11. Computes across an entire pane and then down the pane.
A. Pane (down)
B. Pane (across then down)
C. Pane (down then across)
D. Cell

12. Computes down an entire pane and then across the pane.
A. Pane (down)
B. Pane (across then down)
C. Pane (down then across)
D. Cell

13. Computes within a single cell.


A. Pane (down)
B. Pane (across then down)
C. Pane (down then across)
D. Cell

14. Computes only within the dimensions you specify


A. Pane (down)

LOVELY PROFESSIONAL UNIVERSITY 191


Notes
Advance Data Visualization

B. Pane (across then down)


C. Pane (down then across)
D. Specific Dimensions

15. Specifies that the calculation should be performed at the level of finest granularity
A. Pane (down)
B. Pane (across then down)
C. Pane (down then across)
D. Deepest

Answers for Self Assessment


1. D 2. A 3. B 4. C 5. D

6. A 7. B 8. C 9. D 10. A

11. B 12. C 13. D 14. D 15. D

Review Questions
 What is the difference between table calculation and calculated field in Tableau?
 What is quick table calculations in Tableau?
 What are table calculation filters in Tableau?
 How to do quick calculations in Tableau?
 What are the different types of data filtering?
 What is the Tableau used for?

Further Readings
 "Information Dashboard Design: Displaying Data for At-a-glance Monitoring” by
Stephen Few
 "Beautiful Visualization, Looking at Data Through the Eyes of Experts by Julie
Steele, Noah Iliinsky"

Web Links

 https://www.tableau.com/
 https://intellipaat.com/blog/what-is-tableau/

192 LOVELY PROFESSIONAL UNIVERSITY


Notes
Dr. Pritpal Singh, Lovely Professional University Unit 12: Analytical Topic/Capability

Unit 12: Analytical Topic/Capability


CONTENTS
Objectives
Introduction
12.1 Why is Forecasting Important?
12.2 What is Time-Series Data?
12.3 How Does Time-Series Forecasting Work?
12.4 How Forecasting Works in Tableau
12.5 Model Types
12.6 What are Trend Lines in Tableau?
12.7 Types of Trend Lines in Tableau
Summary
Keywords
Answers for Self Assessment
Answers for Self Assessment
Review Question
Further Readings

Objectives
After studying this unit, you will be able to:

 Understand concept of different forecasting.


 Understand trend lines in tableau.
 Understand continuous and discrete data.

Introduction
What is a forecast?
A forecast is a prediction made by studying historical data and past patterns. Businesses use
software tools and systems to analyze large amounts of data collected over a long period. The
software then predicts future demand and trends to help companies make more accurate financial,
marketing, and operational decisions.

12.1 Why is Forecasting Important?


Forecasting acts as a planning tool to help enterprises prepare for the uncertainty that can occur in
the future. It helps managers respond confidently to changes, control business operations, and
make strategic decisions that drive future growth. For example, businesses use forecasting to do the
following:
Use resources more efficiently
Visualize business performance
Time the launch of new products or services

LOVELY PROFESSIONAL UNIVERSITY 193


Notes
Advance Data Visualization

Estimate recurring costs


Predict future events like sales volumes and earnings
Review management decisions
What are the types of forecasting methods?
Forecasting methods can be qualitative or quantitative:
Qualitative methods
Qualitative forecasting relies on marketing experts to make short-term predictions. You can use
qualitative methods when there is insufficient historical data. For example, these are two use cases:
Market research techniques like polls and surveys identify consumer demand.
Delphi modeling techniques poll experts in a particular field to collect their opinions and predict
trends in that field.
Quantitative methods
Quantitative forecasting models use meaningful statistics and historical data to predict long-term
future trends. We give examples of standard quantitative methods below:
Econometric modeling analyzes financial data sets, like loan and investment data, to predict
significant economic shifts and their impact on the company.
The indicator approach compares data points to identify relationships between seemingly
unrelated data. For example, you can use changes in GDP to forecast unemployment rates.
In this scenario, GDP data is called the lead indicator, and the unemployment rate is the lagging
indicator.
Time-series forecasting analyzes data collected over different intervals of time to predict future
trends.

12.2 What is Time-Series Data?


Cross-sectional data observes individuals and companies in the same time period. On the other
hand, time-series data is any data set that collects information at various time intervals. This data is
distinct because it orders data points by time. As a result, there is potential for correlation between
observations in adjacent intervals.
Time-series data is plottable on a graph with incremental intervals (or timelines) on the x-axis and
observed sample data values on the y-axis. Such time-series graphs are valuable tools for
visualizing the data. Data scientists use them to identify forecasting data characteristics. We give
some examples of time-series data characteristics below:
Time trending data
In trending data, y-values increase or decrease with time, making the graph appear linear. For
example, population data may increase or decrease linearly with time.
Seasonality
Seasonal patterns occur when time-series data shows regular and predictable patterns at time
intervals of less than a year. This data pattern may appear as spikes or other anomalies on an
otherwise linear graph. For example, a store’s retail sales might increase in the holiday periods
around December and April.
Structural breaks
Sometimes time-series data suddenly changes behavior at a certain point in time. The time-series
graph may suddenly shift up or down, creating a structural break or non-linearity. For instance,
many economic indicators changed sharply in 2008 after the start of the global financial crisis.
What is time-series forecasting?
Time-series forecasting is a data science technique that uses machine learning and other computer
technologies to study past observations and predict future values of time-series data. Let’s look at
some examples of time-series forecasting:

194 LOVELY PROFESSIONAL UNIVERSITY


Notes
Unit 12: Analytical Topic/Capability

Astronomical data consists of repetitive movements of the planets over centuries. You can use this
data to predict astronomical events like eclipses and comets accurately.
Weather forecasting uses wind and temperature patterns to predict weather changes.
Scientists can use birth rates and migration data to predict population growth.
Time-series analysis vs. time-series forecasting
Time-series analysis explores the underlying causes in any time-series data. This field of study
seeks to understand the “why” behind a time-series dataset. Analysts must often make
assumptions and decompose or break down the data to extract meaningful statistics and other
characteristics.
While time-series analysis is all about understanding the dataset, forecasting is all about predicting
it. These are the three steps of predictive modeling:
Ask a question and collect a sample set of time-series data that answers this question for a past time
period.
Train the computer software or forecasting algorithm using the past values.
Use the forecasting algorithm to make future observations.

12.3 How Does Time-Series Forecasting Work?


Data scientists use time-series forecasting models to make more accurate predictions. They first do
some exploratory data analysis to select the best forecasting algorithms, and then use machine
learning models to make predictions. Let’s look at some common forecast models below:
Decomposition models
Decomposition models decompose or break down time-series data into three components:
Trend component
Seasonal component
Noise component, which does not belong to either of the above two groups
Another method of analyzing time-series data is to break it down into two components: predictable
and unpredictable data components.
Smoothing-based models
Data smoothing is a statistical technique that involves removing outliers or data points that differ
significantly from the rest of the data set. These forecasting models make the underlying pattern
category more visible by eliminating random variations in data.
Regression-based models
Autoregression is a forecasting model that uses observations from previous time steps to define a
mathematical relationship between two data points. It then uses the mathematical relationship to
estimate an unknown future value. Depending on the regression model being used, the
mathematical equation considers past forecast errors and seasonal past values, improving the
prediction over time.

12.4 How Forecasting Works in Tableau


Forecasting in Tableau uses a technique known as exponential smoothing. Forecast algorithms try
to find a regular pattern in measures that can be continued into the future. If you’re interested in
predictive modeling, also available in Tableau, see How Predictive Modeling Functions Work in
Tableau. All forecast algorithms are simple models of a real-world data generating process (DGP).
For a high quality forecast, a simple pattern in the DGP must match the pattern described by the
model reasonably well. Quality metrics measure how well the model matches the DGP. If the
quality is low, the precision measured by the confidence bands is not important because it
measures the precision of an inaccurate estimate.

LOVELY PROFESSIONAL UNIVERSITY 195


Notes
Advance Data Visualization

Tableau automatically selects the best of up to eight models, the best being the one that generates
the highest quality forecast. The smoothing parameters of each model are optimized before Tableau
assesses forecast quality. The optimization method is global. Therefore, choosing locally optimal
smoothing parameters that are not also globally optimal is not impossible. However, initial value
parameters are selected according to best practices but are not further optimized.
Exponential Smoothing and Trend
Exponential smoothing models iteratively forecast future values of a regular time series of values
from weighted averages of past values of the series. The simplest model, Simple Exponential
Smoothing, computes the next level or smoothed value from a weighted average of the last actual
value and the last level value. The method is exponential because the value of each level is
influenced by every preceding actual value to an exponentially decreasing degree—more recent
values are given greater weight.
In general, the more data points you have in your time series, the better the resulting forecast will
be. Having enough data is particularly important if you want to model seasonality, because the
model is more complicated and requires more proof in the form of data to achieve a reasonable
level of precision. On the other hand, if you forecast using data generated by two or more different
DGPs, you will get a lower quality forecast because a model can only match one.
Seasonality
Tableau tests for a seasonal cycle with the length most typical for the time aggregation of the time
series for which the forecast is estimated. So if you aggregate by months, Tableau will look for a 12-
month cycle; if you aggregate by quarters, Tableau will search for a four-quarter cycle; and if you
aggregate by days, Tableau will search for weekly seasonality. Therefore, if there is a six-month
cycle in your monthly time series, Tableau will probably find a 12-month pattern that contains two
similar sub-patterns. However, if there is a seven-month cycle in your monthly time series, Tableau
will probably find no cycle at all. Luckily, seven-month cycles are uncommon.
Tableau can use either of two methods for deriving season length. The original temporal method
uses the natural season length of the temporal granularity (TG) of the view. Temporal granularity
means the finest unit of time expressed by the view. For example, if the view contains either a
continuous green date truncated to month or discrete blue year and month date parts, the temporal
granularity of the view is month. The new non-temporal method, introduced with Tableau 9.3, uses
periodic regression to check season lengths from 2 to 60 for candidate lengths.
Tableau automatically selects the most appropriate method for a given view. When Tableau is
using a date to order the measures in a view, if the temporal granularity is quarterly, monthly,
weekly, daily or hourly, the season lengths are almost certainly 4, 12, 13, 7 or 24, respectively. So
only the length natural to the TG is used to construct the five seasonal exponential smoothing
models supported by Tableau. The AIC of the five seasonal models and the three non-seasonal
models are compared and the lowest returned. (For an explanation of the AIC metric, see Forecast
Descriptions.)
When Tableau is using an integer dimension for forecasting, the second method is used. In this case
there is no temporal granularity (TG), so potential season lengths must be derived from the data.
The second method is also used if the temporal granularity is yearly. Yearly series rarely have
seasonality, but, if they do, it must also be derived from the data.
The second method is also used for views with temporal granularity of minute or second. If such
series have seasonality, the season lengths are likely 60. However, when measuring a regular real
world process, the process may have a regular repetition which does not correspond to the clock.
So, for minutes and seconds, Tableau also checks for a length different from 60 in the data. This
does not mean that Tableau can model two different season lengths at the same time. Rather, ten
seasonal models are estimated, five with a season length of 60 and another five with the season
length derived from the data. Whichever of the ten seasonal models or three non-seasonal models
has the lowest AIC, that model is used to compute the forecast.
For series ordered by year, minute, or second, a single season length from the data is tested if the
pattern is fairly clear. For integer ordered series, up to nine somewhat less clear potential season
lengths are estimated for all five seasonal models, and the model with the lowest AIC is returned. If
there are no likely season length candidates, only the non-seasonal models are estimated.
Since all selection is automatic when Tableau is deriving potential season lengths from the data, the
default Model Type of “Automatic” in the Forecast Options Dialog Model Type menu does not

196 LOVELY PROFESSIONAL UNIVERSITY


Notes
Unit 12: Analytical Topic/Capability

change. Selecting “Automatic without seasonality” improves performance by eliminating all season
length searching and estimation of seasonal models.
The heuristic that Tableau uses to decide when to use season lengths derived from the data
depends on the distribution of errors for the periodic regression of each candidate season length.
Since the assembly of season length candidates by periodic regression usually produces one or two
clear winning lengths if seasonality actually exists in the data, the return of a single candidate
indicates likely seasonality. In this case, Tableau estimates seasonal models with this candidate for
year, minute and second granularity. The return of less than the maximum of ten candidates
indicates possible seasonality. In this case, Tableau estimates seasonal models with all returned
candidates for integer ordered views. The return of the maximum number of candidates indicates
that errors for most length are similar. Therefore, the existence of any seasonality is unlikely. In this
case, Tableau estimates only non-seasonal models for an integer-ordered or yearly ordered series,
and only the seasonal models with a natural season length for other temporally ordered views.
For Model Type “Automatic” in integer-, year-, minute- and second-ordered views, candidate
season lengths are always derived from the data whether or not they are used. Since model
estimation is much more time consuming than periodic regression, the performance impact should
be moderate.

12.5 Model Types


In the Forecast Options dialog box, you can choose the model type Tableau users for forecasting.
The Automatic setting is typically optimal for most views. If you choose Custom, then you can
specify the trend and season characteristics independently, choosing either None, Additive,
or Multiplicative:

An additive model is one in which the contributions of the model components are summed,
whereas a multiplicative model is one in which at least some component contributions are
multiplied. Multiplicative models can significantly improve forecast quality for data where the
trend or seasonality is affected by the level (magnitude) of the data:

Keep in mind that you do not need to create a custom model to generate a forecast that is
multiplicative: the Automatic setting can determine if a multiplicative forecast is appropriate for
your data. However, a multiplicative model cannot be computed when the measure to be forecast
has one or more values that are less than or equal to zero.
Forecasting with Time

LOVELY PROFESSIONAL UNIVERSITY 197


Notes
Advance Data Visualization

When you are forecasting with a date, there can be only one base date in the view. Part dates are
supported, but all parts must refer to the same underlying field. Dates can be on Rows, Columns,
or Marks (with the exception of the Tooltip target).
Tableau supports three types of dates, two of which can be used for forecasting:

 Truncated dates reference a particular point in history with specific temporal granularity,
such as February 2017. They are usually continuous, with a green background in the view.
Truncated dates are valid for forecasting.
 Date parts refer to a particular member of a temporal measure such as February. Each date
part is represented by a different, usually discrete field (with a blue background). Forecasting
requires at least a Year date part. Specifically, it can use any of the following sets of date parts
for forecasting:
 Year
 Year + quarter
 Year + month
 Year + quarter + month
 Year + week
 Custom: Month/Year, Month/Day/Year
Granularity and Trimming
When you create a forecast, you select a date dimension that specifies a unit of time at which date
values are to be measured. Tableau dates support a range of such time units, including Year,
Quarter, Month, and Day. The unit you choose for the date value is known as the granularity of the
date.
The data in your measure typically does not align precisely with your unit of granularity. You
might set your date value to quarters, but your actual data may terminate in the middle of a
quarter—for example, at the end of November. This can cause a problem because the value for this
fractional quarter is treated by the forecasting model as a full quarter, which will typically have a
lower value than a full quarter would. If the forecasting model is allowed to consider this data, the
resulting forecast will be inaccurate. The solution is to trim the data, such that the trailing periods
that could mislead the forecast are ignored. Use the Ignore Last option in the Forecast Options
dialog box to remove—or trim—such partial periods. The default is to trim one period.
Tableau requires at least five data points in the time series to estimate a trend, and enough data
points for at least two seasons or one season plus five periods to estimate seasonality. For example,
at least nine data points are required to estimate a model with a four quarter seasonal cycle (4 + 5),
and at least 24 to estimate a model with a twelve-month seasonal cycle (2 * 12).
If you turn on forecasting for a view that does not have enough data points to support a good
forecast, Tableau can sometimes retrieve enough data points to produce a valid forecast by
querying the datasource for a finer level of granularity:

 If your view contains fewer than nine years of data, by default, Tableau will query the data
source for quarterly data, estimate a quarterly forecast, and aggregate to a yearly forecast to
display in your view. If there are still not enough data points, Tableau will estimate a monthly
forecast and return the aggregated yearly forecast to your view.
 If your view contains fewer than nine quarters of data, by default Tableau will estimate a
monthly forecast and return the aggregated quarterly forecast results to your view.
 If your view contains fewer than nine weeks of data, by default, Tableau will estimate a daily
forecast and return the aggregated weekly forecast results to your view.
 If your view contains fewer than nine days of data, by default, Tableau will estimate an hourly
forecast and return the aggregated daily forecast results to your view.
 If your view contains fewer than nine hours of data, by default, Tableau will estimate an
minutely forecast and return the aggregated hourly forecast results to your view.

198 LOVELY PROFESSIONAL UNIVERSITY


Notes
Unit 12: Analytical Topic/Capability

 If your view contains fewer than nine minutes of data, by default, Tableau will estimate an
secondly forecast and return the aggregated minutely forecast results to your view.
These adjustments happen behind the scene and require no configuration. Tableau does not change
the appearance of your visualization, and does not actually change your date value. However, the
summary of the forecast time period in the Forecast Describe and Forecast Options dialog will
reflect the actual granularity used.

12.6 What are Trend Lines in Tableau?


A trend line in simple words is a line showing the patterns or trends emerging from data points. For
instance, just by looking at a trend line for sales data, we can infer whether the sales are increasing
with time, is not changing or decreasing. In this way, trend lines help us in interpreting data trends,
predicting future scenarios and draw a correlation between two variables in the analysis.
In Tableau, we can have straight or curved trend lines depending on the model you select from the
different options of trend line models available in Tableau. Tableau has a total of five types of trend
lines; Linear, Exponential, Logarithmic, Polynomial, and Power trend line. A detailed description of
all these trend lines is given in the coming sections.
How to Add Trend Lines in Tableau?
In this section, we will learn how to create trend lines in Tableau. Follow the steps given below and
create a trend line for your Tableau charts.
As shown in the screenshot below, we have a scatter plot for yearly sales. Now, in the steps to
follow, we will add trend lines in this scatter plot.

Step 1: In the first step, we need to switch to the Analytics tab from the Data tab. In the Analytics
tab, there is a Trend Line option under the Model section.

LOVELY PROFESSIONAL UNIVERSITY 199


Notes
Advance Data Visualization

Step 2: Now, to add a trend line on this plot, hold the Trend Line option and drag it on to the
scatter plot (or visualization area). You will see that it gives us five options of different types of
trend lines which we can add on our graph. The options are Linear, Logarithmic, Exponential,
Polynomial, and Power trend line.

Step 3: Upon selecting the Linear trend line option (or one of your choice). As you can see in the
screenshot below, four trend lines (each for a particular year) are added on the scatter plot. Each
trend line is color-coded corresponding to the year it represents.

200 LOVELY PROFESSIONAL UNIVERSITY


Notes
Unit 12: Analytical Topic/Capability

In the later sections, we will learn about other trend line types in detail.
Edit Options in Trend Lines
Tableau provides us with many options to edit the trend lines as per our requirement. To edit a
single trend line, select the trend line and right-click on it. A small menu will open having the
options such as Describe trend line, Format trend line, show trend lines, Edit trend
lines, and Describe trend model.

Describe Trend Line: This option gives a detailed description of the trend line. In includes the p-
value, equation, and coefficients of the trend line.

LOVELY PROFESSIONAL UNIVERSITY 201


Notes
Advance Data Visualization

Describe Trend Model: This option gives a description of the entire trend line model. As you can
see in the screenshot of a model description below, it is a very detailed one and provides a lot of
information on the trend line model in use.

Edit Trend Lines: This option gives us the facility to change the trend line type from one to another.
It also provides a few other editing options.

202 LOVELY PROFESSIONAL UNIVERSITY


Notes
Unit 12: Analytical Topic/Capability

Format Trend Lines: Using the Format option, we can format the appearance of the trend line. We
can change the line type, thickness, color, etc of the trend line from here. You can explore more
formatting options from the formatting pane which appears on the left.

12.7 Types of Trend Lines in Tableau


Let us discuss about the different kinds of trend lines available in Tableau.
1. Linear Trend Line
The formula for the linear trend line is; Y = b0 + b1 * X (here b1 is the slope and b0 is the intercept of
the line).

LOVELY PROFESSIONAL UNIVERSITY 203


Notes
Advance Data Visualization

2. Logarithmic Trend Line


The logarithmic trend line defines and represents the logarithm of all the values in a field. The
equation of a logarithmic trend line is given as Y = b0 + b1 * ln(X). In order to create a logarithm,
Tableau filters out all the negative values as a logarithm cannot be defined with values less than
zero. You can see how many marks or data values were eliminated before estimating the
logarithmic trend model or line in the trend line description.

3. Exponential Trend Line


In the exponential trend line model, the natural log of the data values are taken and then those
values are plotted after exponentiating them. The equation of an exponential trend line is written
as Y = exp(b0) *exp (b1 * X).
To change the data values into their natural logs, the equation used is ln(Y) = b0 + b1 * X
Like the logarithmic trend line, the exponential trend line also does not take values less than zero.
That is why, while calculating for an exponential trend line, Tableau eliminates all the negative
values from the set.

204 LOVELY PROFESSIONAL UNIVERSITY


Notes
Unit 12: Analytical Topic/Capability

4. Polynomial Trend Line


Tableau creates a polynomial trend line by transforming the variables or data values into a
polynomial series of a certain degree. We can select the degree for the polynomial series between 2
to 8. The accuracy of a polynomial model depends on the values taken and the polynomial degree.
You can check for a warning message underlined in red in the description of the model to see if
your model is accurate or not.
The equation or formula to create a polynomial trend line is given by; Y = b0 + b1 * X + b2 * X^2 +

5. Power Trend Line


The power trend line model requires field variables or values to convert into its natural log form.
Once converted, Tableau exponentiates the values to plot the trend line.
The formula or equation for a power trend line is; Y = b0 * X^b1

LOVELY PROFESSIONAL UNIVERSITY 205


Notes
Advance Data Visualization

Removing Trend Line in Tableau


We can remove the trend line or the entire set of trend lines from the Tableau graph. To remove a
single trend line, right-click on a trend line and select the Remove option.
To remove the entire set of trend lines present, go to Analytics, then Trend lines and deselect Show
Trend Lines option.

Trend Line Assumptions


Whenever a trend line model is to be created in Tableau, the calculations are based on certain
assumptions. They are generally known as trend line assumptions. Every trend line is created by
doing computations that depend upon these assumptions.
The trend line assumptions are:

 The model is a functional simplification of the true data generating process and is very
accurate.
 All the errors average to zero. Also, the errors are uncorrelated with the independent variable.
 The errors have constant variance and they are not correlated with each other.
 The explanatory variables are not exact linear functions of each other.

What are Trend Lines in Tableau?


A trend line in simple words is a line showing the patterns or trends emerging from data points. For
instance, just by looking at a trend line for sales data, we can infer whether the sales are increasing
with time, is not changing or decreasing. In this way, trend lines help us in interpreting data trends,
predicting future scenarios and draw a correlation between two variables in the analysis.
In Tableau, we can have straight or curved trend lines depending on the model you select from the
different options of trend line models available in Tableau. Tableau has a total of five types of trend
lines; Linear, Exponential, Logarithmic, Polynomial, and Power trend line. A detailed description of
all these trend lines is given in the coming sections.
How to Add Trend Lines in Tableau?
In this section, we will learn how to create trend lines in Tableau. Follow the steps given below and
create a trend line for your Tableau charts.
As shown in the screenshot below, we have a scatter plot for yearly sales. Now, in the steps to
follow, we will add trend lines in this scatter plot.

206 LOVELY PROFESSIONAL UNIVERSITY


Notes
Unit 12: Analytical Topic/Capability

Step 1: In the first step, we need to switch to the Analytics tab from the Data tab. In the Analytics
tab, there is a Trend Line option under the Model section.

Step 2: Now, to add a trend line on this plot, hold the Trend Line option and drag it on to the scatter
plot (or visualization area). You will see that it gives us five options of different types of trend lines
which we can add on our graph. The options are Linear, Logarithmic, Exponential,
Polynomial, and Power trend line.

LOVELY PROFESSIONAL UNIVERSITY 207


Notes
Advance Data Visualization

Step 3: Upon selecting the Linear trend line option (or one of your choice). As you can see in the
screenshot below, four trend lines (each for a particular year) are added on the scatter plot. Each
trend line is color-coded corresponding to the year it represents.

In the later sections, we will learn about other trend line types in detail.
Edit Options in Trend Lines
Tableau provides us with many options to edit the trend lines as per our requirement. To edit a
single trend line, select the trend line and right-click on it. A small menu will open having the
options such as Describe trend line, Format trend line, show trend lines, Edit trend
lines, and Describe trend model.

208 LOVELY PROFESSIONAL UNIVERSITY


Notes
Unit 12: Analytical Topic/Capability

Describe Trend Line: This option gives a detailed description of the trend line. In includes the p-
value, equation, and coefficients of the trend line.

Describe Trend Model: This option gives a description of the entire trend line model. As you can
see in the screenshot of a model description below, it is a very detailed one and provides a lot of
information on the trend line model in use.

LOVELY PROFESSIONAL UNIVERSITY 209


Notes
Advance Data Visualization

Edit Trend Lines: This option gives us the facility to change the trend line type from one to another.
It also provides a few other editing options.

Format Trend Lines: Using the Format option, we can format the appearance of the trend line. We
can change the line type, thickness, color, etc of the trend line from here. You can explore more
formatting options from the formatting pane which appears on the left.

210 LOVELY PROFESSIONAL UNIVERSITY


Notes
Unit 12: Analytical Topic/Capability

Types of Trend Lines in Tableau


Let us discuss about the different kinds of trend lines available in Tableau.
1. Linear Trend Line
The formula for the linear trend line is; Y = b0 + b1 * X (here b1 is the slope and b0 is the intercept of
the line).

2. Logarithmic Trend Line


The logarithmic trend line defines and represents the logarithm of all the values in a field. The
equation of a logarithmic trend line is given as Y = b0 + b1 * ln(X). In order to create a logarithm,
Tableau filters out all the negative values as a logarithm cannot be defined with values less than
zero. You can see how many marks or data values were eliminated before estimating the
logarithmic trend model or line in the trend line description.

LOVELY PROFESSIONAL UNIVERSITY 211


Notes
Advance Data Visualization

3. Exponential Trend Line


In the exponential trend line model, the natural log of the data values are taken and then those
values are plotted after exponentiating them. The equation of an exponential trend line is written
as Y = exp(b0)* exp(b1 * X).
To change the data values into their natural logs, the equation used is ln(Y) = b0 + b1 * X
Like the logarithmic trend line, the exponential trend line also does not take values less than zero.
That is why, while calculating for an exponential trend line, Tableau eliminates all the negative
values from the set.

4. Polynomial Trend Line


Tableau creates a polynomial trend line by transforming the variables or data values into a
polynomial series of a certain degree. We can select the degree for the polynomial series between 2
to 8. The accuracy of a polynomial model depends on the values taken and the polynomial degree.
You can check for a warning message underlined in red in the description of the model to see if
your model is accurate or not.
The equation or formula to create a polynomial trend line is given by; Y = b0 + b1 * X + b2 * X^2 +

212 LOVELY PROFESSIONAL UNIVERSITY


Notes
Unit 12: Analytical Topic/Capability

5. Power Trend Line


The power trend line model requires field variables or values to convert into its natural log form.
Once converted, Tableau exponentiates the values to plot the trend line.
The formula or equation for a power trend line is; Y = b0 * X^b1

Removing Trend Line in Tableau


We can remove the trend line or the entire set of trend lines from the Tableau graph. To remove a
single trend line, right-click on a trend line and select the Remove option.
To remove the entire set of trend lines present, go to Analytics, then Trend lines and deselect Show
Trend Lines option.
Trend Line Assumptions
Whenever a trend line model is to be created in Tableau, the calculations are based on certain
assumptions. They are generally known as trend line assumptions. Every trend line is created by
doing computations that depend upon these assumptions.
The trend line assumptions are:

 The model is a functional simplification of the true data generating process and is very
accurate.
 All the errors average to zero. Also, the errors are uncorrelated with the independent variable.
 The errors have constant variance and they are not correlated with each other.

LOVELY PROFESSIONAL UNIVERSITY 213


Notes
Advance Data Visualization

 The explanatory variables are not exact linear functions of each other.
 The box plots are also known as a box-and-whisker plots. They show the distribution of
values along an axis. Boxes indicate the middle 50 percent of the data which is, the middle
two quartiles of the data's distribution. The remaining 50 percent of data on both sides is
represented by lines also called whiskers, to display all points within 1.5 times the
interquartile range, which is all points within 1.5 times the width of the adjoining box, or
all points at the maximum extent of the data.
 The Box Plots take one or more measures with zero or more dimensions.
 Creating a Box Plot
 Using the Sample-superstore, plan to find the size of profits for the respective category for
each Ship mode values. To achieve this objective, following are the steps.
 Step 1 − Drag and drop the dimension category to the Columns shelf and profit to the Rows
shelf. Also drag the dimension Ship mode to the right of Category in Columns shelf.
 Step 2 − Choose Box-and-Whisker plot from Show Me. The following chart appears which
shows the box plots. Here, Tableau automatically reassigns the ship mode to the Marks card.
 Box Plot with Two Dimensions
 You can create box plots with two dimensions by adding another dimension to the Column
shelf. In the above chart, add the region dimension to the Column shelf. This produces a chart
which shows the box plots for each region.

Summary
 Forecasting in Tableau uses a technique known as exponential smoothing. Forecast algorithms
try to find a regular pattern in measures that can be continued into the future.

214 LOVELY PROFESSIONAL UNIVERSITY


Notes
Unit 12: Analytical Topic/Capability

 As one of the most reputable data visualization and analysis tools, Tableau forecasting is a
skill that many employers consider invaluable.
 Forecasting is about predicting the future value of a measure.
 There are many mathematical models for forecasting. Tableau uses the model known
as exponential smoothing. In exponential smoothing, recent observations are given relatively
more weight than older observations.
 These models capture the evolving trend or seasonality of the data and extrapolate them into
the future.
 The result of a forecast can also become a field in the visualization created.

Keywords
 Trend lines are used to predict the continuation of a certain trend of a variable.
 It also helps to identify the correlation between two variables by observing the trend in both
of them simultaneously.
 There are many mathematical models for establishing trend lines.
 Tableau provides four options. They are Linear, Logarithmic, Exponential, and Polynomial. In
this chapter, only the linear model is discussed.

Self Assessment
1. Which of the following is used to predict possible future trends.
A. Trend lines
B. Dimension
C. Measures
D. Filters

2. Which of the following are numeric in nature


A. Trend lines
B. Dimension
C. Measures
D. Filters

3. Which of the following is non numeric in nature.


A. Trend lines
B. Dimension
C. Measures
D. Filters

4. Which of the following is used to help in minimizing the size of the data for efficiency
purposes
A. Trend lines
B. Dimension
C. Measures
D. Filters

LOVELY PROFESSIONAL UNIVERSITY 215


Notes
Advance Data Visualization

5. Which of the following is not true for forecasting?


A. Forecasts are rarely perfect
B. The underlying casual system will remain same in the future
C. Forecast for group of items is accurate than individual item
D. Short range forecasts are less accurate than long range forecasts

6. Which of the following is not a forecasting technique?


A. Judgemental
B. Time series
C. Time horizon
D. Associative

7. In which of the following forecasting technique, subjective inputs obtained from various
sources are analysed?
A. Judgemental forecast
B. Time series forecast
C. Associative model
D. All of the above

8. In which of the following forecasting technique, data obtained from past experience is
analysed?
A. Judgemental forecast
B. Time series forecast
C. Associative model
D. All of the above

9. Delphi method is used for


A. Judgemental forecast
B. Time series forecast
C. Associative model
D. All of the above

10. Short term regular variations related to the calendar or time of day is known as
A. Trend
B. Seasonality
C. Cycles
D. Random variations

11. What different products Tableau provide?


A. Tableau Server
B. Tableau Desktop
C. Tableau Reader
D. All of these

12. ____________is an online platform that allows you to host and manage Tableau data
sources.

216 LOVELY PROFESSIONAL UNIVERSITY


Notes
Unit 12: Analytical Topic/Capability

A. Tableau Server
B. Tableau Desktop
C. Tableau Reader
D. All of these

13. ________________helps to create reports, dashboards, and stories using different charts
and graphs.
A. Tableau Server
B. Tableau Desktop
C. Tableau Reader
D. All of these

14. ______________does not need to connect to any source, but it can read reports built on top
of any and all of the listed data sources that Tableau Supports.
A. Tableau Server
B. Tableau Desktop
C. Tableau Reader
D. All of these

15. Your data is out in the public once your report is published on to the ___________.
A. Tableau Public Server
B. Tableau Desktop
C. Tableau Reader
D. All of these

Answers for Self Assessment


1. A 2. B 3. C 4. D 5. D

6. C 7. A 8. B 9. A 10. B

11. D 12. A 13. B 14. C 15. A

Review Question
 What are the three types of forecasting?
 Which forecasting method is used in Tableau?
 What are the three trend lines in tableau?
 How do you find the trend line in Tableau?
 What is the Tableau used for?
 What does a tableau analyst do?

Further Readings
 "Information Dashboard Design: Displaying Data for At-a-glance Monitoring” by
Stephen Few

LOVELY PROFESSIONAL UNIVERSITY 217


Notes
Advance Data Visualization

 "Beautiful Visualization, Looking at Data Through the Eyes of Experts by Julie


Steele, Noah Iliinsky"

Web Links

 https://www.tableau.com/
 https://intellipaat.com/blog/what-is-tableau/

218 LOVELY PROFESSIONAL UNIVERSITY


Notes

Dr. Pritpal Singh, Lovely Professional University Unit 13: Interactive Dashboards Tableau

Unit 13: Interactive Dashboards Tableau


CONTENTS
Objectives
Introduction
13.1 Key Features of Tableau
13.2 Understanding Tableau Dashboards
13.3 What is the Purpose of a Dashboard?
13.4 How to Create a Data Dashboard
Summary
Self Assessment
Answers for Self Assessment
Review Questions
Further Readings

Objectives
After studying this unit, you will be able to:

 Understand concept of Dashboards


 Create Tableau Dashboards.
 Understand dimensions and measures.
 Understand concept of dashboard story.

Introduction
Tableau is a widely used Business Intelligence tool in the current market. Its popularity is due to its
capability of handling Big Data and is relatively simple to deploy, learn and use. Tableau generates
insights from the raw data and creates a visual masterpiece for businesses to make data-driven
decisions.

13.1 Key Features of Tableau


Tableau Dashboard: Tableau dashboard has an intuitive dashboard with self-explaining wizards,
allowing non-technical users to create visualization easily. Dimensions, charts are simple drag and
drop on drawing space to perform analysis.
Collaborative Sharing: Tableau allows users to collaborate with their peers for collaborative work
or review. Users can also share to the cloud, which makes the dashboard accessible from anywhere.
Data Sources in Tableau: Tableau has more than 200+ connectors that help users connect to external
data sources like RDBMS, Cloud, spreadsheet, etc., securely. Tableau also provides several
monitoring features such as data connectivity, auto-refresh, etc.
Advanced Visualizations (Chart Types): Tableau has a vast collection of advanced visualization
techniques. Some of them are:
Charts
Tables

LOVELY PROFESSIONAL UNIVERSITY 219


Notes
Advance Data Visualization

Graphs
Maps
Sharing Tableau Dashboards
There are various methods to share a Tableau dashboard for consumption after you’ve finished
creating it.
Packaged Workbooks
You may package a worksheet for offline sharing if you prepared a dashboard with Tableau
Desktop. Navigate to File in the top navigation and select “Export Packaged Workbook…” to
package a workbook. The data will be packaged together with instructions on how to visualize it.
Anyone using Tableau Desktop or Tableau Reader may open the file and interact with your
visualizations. Since packed workbooks do not automatically update, the data within them is only
as up-to-date as the last update.
Tableau Public
Any dashboard created in Tableau Desktop or Tableau Public can be shared with the public over
the web. This isn’t a good idea for sensitive business data, but if you can make your data public, it’s
a great way to get your dashboard in front of as many people as possible. Navigate to “Server,”
hover over “Tableau Public,” and select “Save to Tableau Public as…” to publish a dashboard from
Tableau Desktop to Tableau Public.
Tableau Server
Tableau Server allows you to share your workbooks privately in the cloud. Tableau Server is the
most scalable Tableau solution for sharing business-related workbooks, but it requires incremental
licenses for you and your end-users. Publishing to Tableau Server is similar to publishing to
Tableau Public, but you’ll have more options, such as where to publish the workbook within
Tableau Server, who has access to view and interact with it, and whether or not you want the data
in the workbook to change. Navigate to “Server” in the top navigation and select “Publish
Workbook…” to publish a workbook to Tableau Server.

13.2 Understanding Tableau Dashboards


Tableau Dashboards are the collection of different views or visualization where each view
showcases a different kind of data at the same time. It allows users to get a holistic view of all the
data on one screen. Creating dashboards is just about dragging views from the sheets section to the
visualization area.
Creating or designing a dashboard is not only about putting visualization elements that are offered
by Tableau. A dashboard should have the most relevant data that is suitable for quick consumption
of information by a user. Tableau provides a lot of mechanisms for interactivity including tooltips
and filters, making use of them without cluttering the viewable area will lead to a pleasant
dashboard experience.
Here’s a quick rundown of all the Tableau Dashboard choices available on the left navigation:
Dashboard and Layout Tabs
You’ll be working on the Tableau Dashboard tab by default, which allows you to customize most
parts of the dashboard. You may customize the dimensions and placement of individual dashboard
components using the layout tab. On the Layout tab, all sizes are in pixels.
Device Preview Button
The Device Preview button lets you see how the dashboard will look on various devices, and you
can even save alternative versions of the dashboard so that it looks different depending on the
device.
Size
This is where you can specify the dashboard’s height and width in pixels. There are numerous
default size options available, or you can specify a custom size. If you select the Automatic option,
the dashboard automatically adjusts the individual components of the dashboard to fit all available

220 LOVELY PROFESSIONAL UNIVERSITY


Notes
Unit 13: Interactive Dashboards Tableau

space on the screen it is being displayed on. While this option appears to be a good fit on the
surface, keep in mind that it is not genuinely “responsive,” and the display can be unreliable.
Sheets
Individual worksheets in your workbook that can be uploaded to the dashboard are listed here. The
workbook has three sheets: Map, Trends, and Bar Chart, which were used to produce the example
shown above. It’s a good idea to give the worksheets descriptive titles so that they’re easy to find,
but you can also obtain a thumbnail preview of the worksheet by hovering over the name in the left
menu.
Objects

 Horizontal: Adds a horizontal layout container to which you can add more elements.
 Vertical: Adds a vertical layout container to which you can add more elements.
 Text: This command launches a small word processor in which you can type and format any
text you like.
 Image: Adds an image from your PC to the dashboard as an image.
 Web Page: Adds a link to a web page to the dashboard (requires an Internet connection to
display the web page).
 Blank: Fills the dashboard with blank space, which might be useful when dashboard elements
are too close together in a tiled arrangement.
Tiled
When dashboard items are tiled, they take up all of the available space in each tile. You can control
the exact size and location of dashboard items while they are floating. Each of these layouts has its
own set of advantages and disadvantages, and the one you choose is primarily determined by your
individual use case. The automatic resizing that comes with a tiled layout is preferred by most
Tableau users; we prefer the predictability and precision that comes with floating items.

What One Can Do with Tableau Dashboard?


The following things are listed below that one can use in Tableau Dashboard:

 Self-Reliant: Tableau Dashboard does not require any complex setups and is easily
customizable so that users can fit all the features and visualizations needed for Data Analysis.
 Centralized Data: Users can customize Tableau Dashboard to view all the data in a centralized
form because Tableau follows the concept of centralized data.
 Visual Discovery: Users can use Tableau Dashboards to explore and analyze data by adding
different types of charts, trends, graphs, etc. All the features are available via drag and drop.
 Data Analytics: Tableau Dashboards simplify data and allow users to easily understand data
and analyze it at a faster pace.

Purpose of Creating a Dashboard in Tableau Desktop


Dashboards make it easier for users to view all the progress, visualizations, and information on one
page or screen have a glance at all the data without navigating to other tabs or screens. Dashboards
adjust charts as objects on the screen, and these objects are placed as Tiled objects with the help of
the easy drag and drop feature. The dashboard can be sized based on the following options:
Automatic, Exactly, Range, Pre-sets.

Pros and Cons of Tableau Dashboard


The advantages and disadvantages of Tableau Dashboards are listed below:
Pros

 Mobile Support
 Multiple Annotations
 Multimedia
 Filters

LOVELY PROFESSIONAL UNIVERSITY 221


Notes
Advance Data Visualization

 Responsive Dashboard
 Descriptive Texts
 Easy Implementation
Cons

 Static and Single valued parameters


 Limited Data Processing
 Expensive
 No custom visual imports
 Limited Column Table

Limitations of the Tableau Dashboard


If the developer’s resolution is different from the end-users, then it disturbs the screen resolution of
the Tableau dashboard. Tableau Dashboards are not responsive. If you refresh the data on the chart,
then the whole chart also gets refreshed, and you need to re-run the flow to get to the previous
place on the chart or axis

13.3 What is the Purpose of a Dashboard?


A car dashboard provides real-time information about a car's speed, fuel volume, RPM, and other
engine-related indicators. Similarly, a data dashboard provides information about company
historical sales, key performance indicators (KPIs), sales growth, operational indicators, and
customer feedback. This information is presented in a precise manner so that managers or
executives can understand the situation and make appropriate decisions.
There are hundreds of moving parts in your business and a dashboard summarizes these events
into an easy-to-understand, real-time data visualization. These visualizations and charts can be
used to make fast and effective decisions.

Dashboard by Freepik | edited by Author


There are several benefits of dashboard reporting:

 Usability: a typical company generates gigabytes of raw data daily. Understanding the data
can help companies create value from it and make better decisions. Dashboards provide
access to all key metrics on a single screen, turning raw data into valuable insights.

222 LOVELY PROFESSIONAL UNIVERSITY


Notes
Unit 13: Interactive Dashboards Tableau

 Access to data: a single dashboard has access to multiple data sources to provide detailed
reports of the inner workings of a company.
 Decision making: managers or executives can view anomalies, forecast sales, and review
historical data to come up with business strategies. The information is available in an
interactive visual form, where we can dive deep into historical data or filter out critical
parameters.
 Accountability: it provides an unbiased picture of how well your company is performing. The
dashboard can show you the difference in growth percentage and how you may have failed at
a certain marketing campaign. Accountability is necessary to keep companies away from
bankruptcy.
 Interactivity: the gamified and dynamic experience of the dashboard makes it easy to use and
understand various factors of organizations. You can filter, isolate a single metric, zoom into a
map or time series line plot, search for terms or even use third-party tools to generate anomaly
alarms.
 Analysis: you can use these dashboards to come up with detailed analytical reports. The
dashboard simplifies data analysis tasks as you are monitoring key permanence metrics and
making sense of past events.

What are the Types of Dashboards?


There are several ways to customize the dashboard, and they all fall into one of three categories -
iDashboards:

1. Operational Dashboards: these dashboards show the real-time performance of day-to-day


business operations. They are connected to multiple data sources and contain hundreds of
metrics, indicating various functionalities of the business.
2. Analytical Dashboards: these dashboards use historical data to identify trends. They are
mainly used by data analysts to write detailed reports about a company's past performance
and what steps they can use to improve current systems.
3. Strategic Dashboards: these dashboards are mainly used to track current performance
compared to key performance indicators and align actions with strategy.

What are the Use Cases of Dashboards?


In data science, dashboards are used for machine learning operations, data streaming, database
management, and monitoring applications in production. However, in a typical business, the
dashboard has a broader use case:

 Customer metrics
 Financial information
 Sales information
 DevOps
 Web analytics
 Manufacturing information
 Human resources data
 Marketing performance
 Logistics information

LOVELY PROFESSIONAL UNIVERSITY 223


Notes
Advance Data Visualization

13.4 How to Create a Data Dashboard


Before we jump into creating a Tableau dashboard, we need to understand a few rules. These rules
will help you build an effective dashboard that will fulfill your target audience's demands and
goals.

1. Know your audience and understand what they need.


2. Choose relevant and relatively clean data that will meet your goals.
3. Make sure your data is correct and clean.
4. Select the best visualizations that represent your data.
5. If you are developing a dashboard for the first time, choose a template that reduces
complexity and saves time.
6. Do not clutter your dashboard space with too many plots. Use simple colors and allow for
space in your design to showcase the most significant parts of the data.
7. Ask for feedback from the audience and use it to improve on the current design. Iterate and
improve.

Connection to Data Source


In this section, we are going to create a simple Tableau dashboard and publish it on a public server.
The primary purpose of this tutorial is to learn the basics of creating and customizing data
visualization, adding objects and filters, connecting filters, and sharing the finalized version of the
dashboard with the wider public.
To connect the data source, we need to download Power consumption in India(2019-2020) from
the Kaggle platform and then extract the data.

To connect the data source, we need to launch Tableau Desktop Public Edition (2022.1.1). On the
main screen, it will show the multiple options to load a file or connect to a database server. Tableau
supports all kinds of data connections; to access unavailable connections, download the
specific drivers. For example, a MySQL connection is not available by default. We can install the
drivers for the database and then connect to the SQL server. Take the Connecting Data in
Tableau course to better understand connecting and managing various data sources.

224 LOVELY PROFESSIONAL UNIVERSITY


Notes
Unit 13: Interactive Dashboards Tableau

In our case, the data source is a CSV file, and it can be accessed by clicking on the “Text file” tab on
the left panel. Next, select the CSV file (long_data_.csv) and press the open button.

The dataset has been successfully loaded and you can explore the columns and attributes before
jumping into creating a visualization.
As we can observe, Tableau has automatically assigned data types to each column based on
properties. This dataset consists of:

 States (String): 33 states


 Regions (String): 5 regions
 Latitude (Geography): Geolocation coordinates
 Longitude (Geography): Geolocation coordinates
 Dates (Date & Time): Jan 2, 2019 to May 23, 2020
 Usage (Decimal Numbers): Power consumption in MegaWatts

Creating Data Visualization Sheets


We will create the first bar chart by switching tabs from the “Data Source” to the “Sheet 1” (orange
highlighted tab on the bottom left corner). Sheet 1 has multiple sections, tabs, and buttons. To make
things simple, we will ignore all the sections and buttons and focus on the “Tables” section on the
top left. The table consists of the data fields (columns) separated by the data types: Discrete and
Continuous.

LOVELY PROFESSIONAL UNIVERSITY 225


Notes
Advance Data Visualization

To create a bar chart of total power consumption per state, simply drag “States” to Columns and
“Usage” to Rows. Tableau will automatically assemble a bar chart with labels and values, as shown
below.

To change the color of bars to green, click on the “Color” button under the Marks section and then
select the color green. We can customize the title by “double-clicking” on it and making changes to
the font and color to match the theme.

226 LOVELY PROFESSIONAL UNIVERSITY


Notes
Unit 13: Interactive Dashboards Tableau

Before we create another visualization, we need to understand the bottom panel. We can create
multiple Worksheets, Dashboards, and Stories by clicking on buttons with a plus (+) sign, as shown
below. Similar to Google Chrome tabs, we can switch between Data Source, Worksheets,
Dashboards, and Stories tabs by clicking on them.
In our case, we will create a second worksheet by clicking on the “New Worksheet” button.

On the second worksheet, we will plot “power usage per state” on a map. First, drag and drop
Longitude to Columns and Latitude to Rows. Second, change both fields to “Dimension” by
clicking on the arrow and selecting the “Dimension” option. Third, double click on the Usage and
States data fields, and they will automatically appear in the “Marks” section. You can also do this
manually by dragging and dropping them into the “Marks” section and changing them to “Size”
and “Detail” marks. Finally, click on the “Show Me” button and select symbol maps. The “Show
Me” button gives you recommended visualizations based on your inputs. You can switch from one
chart to another by clicking on the available options.

LOVELY PROFESSIONAL UNIVERSITY 227


Notes
Advance Data Visualization

After customizing the map and title, the final version of the map looks clean. On the top right, you
can see filters based on the size of the circle. The circle represents the states in India, and the size of
the circle is based on power usage. You can zoom in and interact with the map by clicking on any
red circle and reading tooltips (Coordinates, States, Usage).

In the subsequent worksheet, we are going to plot a historical time series line chart with
predictions. Move “Usage” to Rows and “Dates'' to Columns. Then, change the “Dates'' from
“Year” to “Month”, as shown below. Finally, we are going to plot the forecast for the next 11
months by right-clicking on the plot and selecting Forecast > Snow Forecast. Tableau will
automatically plot forecasts with a 90% confidence highlighted area.

228 LOVELY PROFESSIONAL UNIVERSITY


Notes
Unit 13: Interactive Dashboards Tableau

After setting up the title and colours, we can see two distinct graphs:
Actual: Due to the Covid19 lockdown, the power consumption dropped because the majority of
industries were closed.
Estimated: The forecast chart is a constant line, and it is not reliable due to missing values in
historical data. The 90% confidence area is also too wide for us to take this prediction seriously.

For the fourth worksheet, we will be creating a Region versus Usage BoxPlot. We can do this by
clicking on “box-and-whisker plots” in the “Show Me” section, as shown below. After customizing
the visualization, all four sheets are ready to be added to a dashboard.

LOVELY PROFESSIONAL UNIVERSITY 229


Notes
Advance Data Visualization

Creating a visualization on a worksheet is exciting; if you want to learn how to create interactive
and functional dashboards, then check out the Analyzing Data in Tableau course. This course will
help bring you one step closer to becoming a certified Tableau Desktop Specialist.

Building a Dashboard
To create a dashboard, we need to click on the “New Dashboard” button at the bottom. The button
has a box shape with a plus sign. The Dashboard window has a dashboard panel on the left side
that consists of three sections:

1. Canvas: to set the size of the dashboard based on various devices (Mobile, Tablet, etc).
2. Sheets: for adding and removing worksheets on canvas.
3. Objects: for adding text, images, extensions, webpage, and buttons to canvas.

230 LOVELY PROFESSIONAL UNIVERSITY


Notes
Unit 13: Interactive Dashboards Tableau

Now, we will double-click on all sheets one by one to add them to the dashboard canvas with
related filters. We can adjust the locations of visualizations and filters and adjust the size to give it a
clean look.

Adding Filters
Next, we are going to add relevant filters and remove the previous filter.

1. Remove the “Usage” size filter by clicking on X.


2. Select the map visualization, and click on the down arrow to select Filters > Sum of Usage.
3. The filter will appear in the top right corner.
4. Move the filter towards the right, so that it looks like part of the dashboard.

Similarly, we are going to add filters for “States” and “Regions”.

1. Select the Boxplot visualization and add the “States” filter.


2. Go to the filter and click on the down arrow to access the options and select Multiple Values
(dropdown). It will change the filter from a list to a dropdown.

LOVELY PROFESSIONAL UNIVERSITY 231


Notes
Advance Data Visualization

3. Move the filter so that it shows in the middle of the “Forecast indicator” and “Usage”. Tableau
will adjust the filter automatically if you pick and hover over the filter in the center.
4. In the same way, add a “Regions” filter and adjust it between the “States and “Usage” filters.

Adding Objects
We are now going to add a title object by dragging the "Text" and placing it at the top of the
dashboard canvas. A window prompt will then ask us to type the text. In our case, we will write the
title of the dashboard.

Next, we are going to add an Image object to the top left section and then select the Indian national
flag JPEG file.

232 LOVELY PROFESSIONAL UNIVERSITY


Notes
Unit 13: Interactive Dashboards Tableau

After adjusting the position and size of the flag and title, our dashboard is almost complete.

Summary
 A car dashboard provides real-time information about a car's speed, fuel volume, RPM, and
other engine-related indicators. Similarly, a data dashboard provides information about
company historical sales, key performance indicators (KPIs), sales growth, operational
indicators, and customer feedback.
 This information is presented in a precise manner so that managers or executives can
understand the situation and make appropriate decisions.
 There are hundreds of moving parts in your business and a dashboard summarizes these
events into an easy-to-understand, real-time data visualization.
 These visualizations and charts can be used to make fast and effective decisions.
 Operational Dashboards: these dashboards show the real-time performance of day-to-day
business operations. They are connected to multiple data sources and contain hundreds of
metrics, indicating various functionalities of the business

Self Assessment
1. A _________ is a collection of several views, letting you compare a variety of data
simultaneously
A. Dashboard
B. Joins
C. Relationships
D. Superstore

2. ___________are a dynamic, flexible way to combine data from multiple tables for analysis
A. Dashboard
B. Joins

LOVELY PROFESSIONAL UNIVERSITY 233


Notes
Advance Data Visualization

C. Relationships
D. Superstore

3. ____________ mustbe your first approach to combining your data because it makes data
preparation and analysis easier and more intuitive.
A. Dashboard
B. Joins
C. Relationships
D. Superstore

4. we combine the attributes of two given relations and, as a result, form tuples with
A. Dashboard
B. Joins
C. Filters
D. Superstore

5. Which is sample dataset in tableau…


A. Geo
B. Joins
C. Filters
D. Superstore

6. Which dimension required geographical role


A. Subcategory
B. Joins
C. Filters
D. Location

7. _________ are arranged in a single layer grid that adjust in size based on the total
dashboard size and the objects around it
A. Subcategory
B. Joins
C. Floating dashboard
D. Tiled dashboard

8. _________ allow an end user to cover up undesired blank background space in one
worksheet with another worksheet
A. Subcategory
B. Joins
C. Floating dashboard
D. Tiled dashboard

9. _____objects provide layout containers that let you group related objects together and fine-
tune how your dashboard resizes when users interact with them.
A. Horizontal and Vertical
B. Text

234 LOVELY PROFESSIONAL UNIVERSITY


Notes
Unit 13: Interactive Dashboards Tableau

C. Image
D. Webpage

10. ___________objects can provide headers, explanations, and other information.


A. Horizontal and Vertical
B. Text
C. Image
D. Webpage

11. _______objects display target pages in the context of your dashboard.


A. Horizontal and Vertical
B. Text
C. Image
D. Webpage

12. ___________objects add to the visual flavor of a dashboard, and you can link them to
specific target URLs
A. Horizontal and Vertical
B. Text
C. Image
D. Webpages

13. _________________ objects help you adjust spacing between dashboard items.
A. Blank
B. Text
C. Image
D. Webpage s

14. ___________objects let your audience navigate from one dashboard to another, or to other
sheets or stories.
A. Horizontal and Vertical
B. Navigation
C. Image
D. Webpage

15. _____________ objects let your audience quickly create a PDF file, PowerPoint slide, or
PNG image of an entire dashboard
A. Text
B. Download
C. Webpage
D. None.

LOVELY PROFESSIONAL UNIVERSITY 235


Notes
Advance Data Visualization

Answers for Self Assessment


1. A 2. C 3. C 4. B 5. D

6. D 7. D 8. C 9. A 10. B

11. D 12. C 13. A 14. B 15. B

Review Questions
 What are dashboards in Tableau?
 How many types of dashboards are there in Tableau?
 What are 3 benefits of a dashboard Tableau?
 How do you create a dashboard in Tableau?
 What is a story and dashboard in Tableau?
 How do you tell a story with dashboards?

Further Readings
 "Information Dashboard Design: Displaying Data for At-a-glance Monitoring” by
Stephen Few
 "Beautiful Visualization, Looking at Data Through the Eyes of Experts by Julie
Steele, Noah Iliinsky"

Web Links

 https://www.tableau.com/
 https://intellipaat.com/blog/what-is-tableau/

236 LOVELY PROFESSIONAL UNIVERSITY


Notes
Dr. Pritpal Singh, Lovely Professional University Unit 14: Sharing Your Dashboard

Unit 14: Sharing Your Dashboard


CONTENTS
Objectives
Introduction
14.1 Creating a Dashboard
14.2 Understanding Tableau Dashboards
14.3 Publishing Tableau Dashboards
14.4 Sharing Tableau Dashboards
14.5 Advantages and Disadvantages of Tableau
14.6 Use Tableau Public
14.7 Use Tableau Server
Summary
Keywords
Self Assessment
Answers for Self Assessment
Review Questions
Further Readings

Objectives
After studying this unit, you will be able to:

 understand concept of publishing tableau files.


 create dashboard.
 understand real time analysis.
 collaboration with data.

Introduction
A dashboard is a consolidated display of many worksheets and related information in a single
place. It is used to compare and monitor a variety of data simultaneously. The different data views
are displayed all at once. Dashboards are shown as tabs at the bottom of the workbook and they
usually get updated with the most recent data from the data source. While creating a dashboard,
you can add views from any worksheet in the workbook along with many supporting objects such
as text areas, web pages, and images.
Each view you add to the dashboard is connected to its corresponding worksheet. So when you
modify the worksheet, the dashboard is updated and when you modify the view in the dashboard,
the worksheet is updated.

14.1 Creating a Dashboard


Using the Sample-superstore, plan to create a dashboard showing the sales and profits for different
segments and Sub-Category of products across all the states. To achieve this objective, following are
the steps.

LOVELY PROFESSIONAL UNIVERSITY 237


Notes
Advance Data Visualization

Step 1 − Create a blank worksheet by using the add worksheet icon located at the bottom of the
workbook. Drag the dimension Segment to the columns shelf and the dimension Sub-Category to
the Rows Shelf. Drag and drop the measure Sales to the Colour shelf and the measure Profit to the
Size shelf. This worksheet is referred as the Master worksheet. Right-click and rename this
worksheet as Sales Profits. The following chart appears.

Step 2 − Create another sheet to hold the details of the Sales across the States. For this, drag the
dimension State to the Rows shelf and the measure Sales to the Columns shelf as shown in the
following screenshot. Next, apply a filter to the State field to arrange the Sales in a descending
order. Right-click and rename this worksheet as Sales state.

238 LOVELY PROFESSIONAL UNIVERSITY


Notes
Unit 14: Sharing Your Dashboard

Step 3 −Next, create a blank dashboard by clicking the Create New Dashboard link at the bottom of
the workbook. Right-click and rename the dashboard as Profit Dashboard.

Step 4 − Drag the two worksheets to the dashboard. Near the top border line of Sales Profit
worksheet, you can see three small icons. Click the middle one, which shows the prompt Use as
Filter on hovering the mouse over it.

Step 5 − Now in the dashboard, click the box representing Sub-Category named Machines and
segment named Consumer.
You can notice that only the states where the sales happened for this amount of profit are filtered
out in the right pane named Sales_state. This illustrates how the sheets are linked in a dashboard.

LOVELY PROFESSIONAL UNIVERSITY 239


Notes
Advance Data Visualization

14.2 Understanding Tableau Dashboards


Dashboards in Tableau are the main facilitators of active analysis and templating of important data.
Here, data from different worksheets can be represented together in a single place. Robust and
filtered Comparisons, Visualizations, and Reports can be created with Dashboards that can handle
large amounts of data.
Tableau Dashboards are responsive and easy to implement with multiple Reports, Notifications,
and Strategies that can be scheduled as per the requirements. Here are some typical Tableau
Dashboards created with varied data types for different use cases:

240 LOVELY PROFESSIONAL UNIVERSITY


Notes
Unit 14: Sharing Your Dashboard

14.3 Publishing Tableau Dashboards


There are two primary ways of publishing Tableau Dashboards. Read along to see which of the two
ways are best suited for you. Follow the intended steps as listed below to publish Tableau
dashboards:

 Publishing Tableau Dashboards to Tableau Server


 Publishing Tableau Dashboards to Tableau Reader
1) Publishing Tableau Dashboards to Tableau Server
Instead of downloading your workbook manually on Tableau, the online mode reduces this
manual task by converting it into an automated one. You can share your workbook with your
colleagues, or your organization online by publishing it on the Tableau Server. Publishing Tableau
Dashboards to Tableau Server is a simple task that can be performed by implementing the
following steps:

 Step 1: Open Tableau Desktop.


 Step 2: To publish the data source, select Tableau Server from the top menu. Then click
on Publish a Workbook. Click on the Share button that you see on the next screen. Note: If you
are unable to see the Publish a Workbook option, then make sure that the Tableau Dashboard
is active, if not, you can sign in to the Tableau Server.

LOVELY PROFESSIONAL UNIVERSITY 241


Notes
Advance Data Visualization

 Step 3: After selecting Publish a Workbook, a dialog box will open asking for the project name
that you want to publish. Provide an identifiable workbook name for the project, and add
some tags and descriptions so that it becomes easier for the user to search across the
workbook when published to the Tableau Server.
 Step 4: Now, to make your workbook visible and accessible by other users, and from a
security perspective, you need to provide a set of permissions after publishing Tableau
Dashboard. Thus, accept the default administrator project settings, for enabling the
permissions.
 Step 5: If you wish to publish a data source to a Tableau Server, then additional care needs to
be taken. There are several options available for authentication. If you want to embed the data
source, you can click on the Edit option to change the access options of the data source for
different users. Note: If your workbook is connected to any data source, then it is necessary to
add a password or embed the data source for security reasons.
 Step 6: Click on Publish and Share.
Your Tableau Workbook or data source will then get published to the Tableau Server.
2) Publishing Tableau Dashboards to Tableau Reader
The Tableau Reader is a free software application that one can use to view the existing Tableau
Dashboards built over Tableau Desktop.
Despite the straightforward available ways to share the Tableau content with your colleagues,
business partners, and officials, if you can’t share it directly to the Tableau Server, the Tableau
Reader is a quick option for publishing Tableau Dashboards. Tableau Reader can also be used for
publishing Tableau Dashboards for those who do not use Tableau Desktop.
The steps for publishing Tableau Dashboard to Tableau Reader are as follows:

 Step 1: Open the Tableau Desktop application.


 Step 2: Find your workbook and its connected data source.
 Step 3: Click on the Save As button present under the File menu and provide a suitable name
for it.
 Step 4: Email that saved workbook and data source with. twbx extension.
The steps for viewing a published Tableau Dashboard using Tableau Reader are as follows:

 Step 1: Download and Install the Tableau Reader application from the official Tableau
website.
 Step 2: Download and open the email attachment of the workbook along with the data source,
right-click on the downloaded file, select the Open with option, and click on Tableau Reader.

14.4 Sharing Tableau Dashboards


There are different ways to share Tableau Dashboards. You can share them with any of your
colleagues irrespective of how they were created or published. Here are the primary formats and
ways in which Tableau Dashboards can be shared:

 Sharing via Tableau Server/Public


 Sharing as a Dashboard Link
 Sharing as a PDF
 Sharing as a PPT
 Sharing as a Crosstab (Excel or CSV Files)
1) Sharing via Tableau Server/Public

242 LOVELY PROFESSIONAL UNIVERSITY


Notes
Unit 14: Sharing Your Dashboard

To make your Tableau Dashboard publicly accessible, the best way is to share it via Tableau
Server/Public. The steps are as follows:

 Step 1: Open Tableau Desktop, and click on the Server button.


 Step 2: After selecting the Server, click on Tableau Public and select Save to Tableau Public.
 Step 3: A dialog box pops up asking to enter your credentials for Tableau Public. If you don’t
have it, then you can create a profile.
 Step 4: Upon entering the credentials, a new dialog box will open. Select Create Data
Extract and click on Extract.
 Step 5: Once done, repeat step 2, to view the final embedded Tableau Dashboard on the
browser.
 Step 6: Click on Edit if you want to add a title or any description for the Tableau Dashboard.
 Step 7: Save it and share it with the Tableau Viewer.
2) Sharing as a Dashboard Link
If you find other sharing options difficult, then simply share it as a link. You just need to click on
the Share button under the toolbar on an active dashboard. At the bottom, a dialog box appears
containing the embed code and the link. Just copy the link by pressing Ctrl+C and share via email
or any other form.
3) Sharing as a PDF
Tableau Dashboards can also be stored in PDF format easily. This can be done on an active
dashboard. Under the File menu, you will find the Export option. Upon clicking it, you can select
the option that says Export as PDF. After your workbook is ready, click on it and the file will be
saved in PDF format that can be shared as per requirements.
4) Sharing as a PPT
Tableau Dashboards can be represented in PPT format too. Under the File menu, you will find
the Export option. Upon clicking it, you can select the option that says Export as PPT. The
workbook will then be exported in a PPT format and can be shared as per requirement.
5) Sharing as a Crosstab (Excel or CSV Files)
Tableau houses functionalities that give users the ability to share a Tableau Dashboard as a
Crosstab file like CSV or Excel. In the Tableau Desktop, select the Workbook. Under the File menu,
you will find the Export option. Upon clicking it, you can select the option that says Export as
Crosstab toExcel. The file will then be exported in Excel or CSV format. You can share the same in
case this format is more suitable for your business requirements.

14.5 Advantages and Disadvantages of Tableau


1. Data visualization
Tableau is a data visualization tool first and foremost. Therefore, it’s technology is there to support
complex computations, data blending and dashboarding for the purpose of creating beautiful
visualizations that deliver insights that cannot easily be derived from staring at a spreadsheet. It
has climbed to the top of the data visualization heap because of its dedication to this purpose
2. Quickly Create Interactive visualizations:
Using drag-n-drop functionalities of Tableau, the user can create a very interactive visual within
minutes. The interface can handle endless variations while also limiting you from creating charts
that are against data visualization best practices. You can check out some of the amazing visuals
created at the Tableau Gallery.
3. Ease of Implementation:
There are many different types of visualization options available in Tableau which enhance the user
experience. Also, Tableau is very easy to learn compared to Python, Business Objects and Domo,
anyone without having knowledge of coding can easily learn Tableau.
4. Tableau can handle large amounts of data:

LOVELY PROFESSIONAL UNIVERSITY 243


Notes
Advance Data Visualization

Tableau can handle millions of rows of data with ease. Different types of visualization can be
created with a large amount of data without impacting the performance of the dashboards. Also,
there is an option in Tableau where the user can make “live” to connections to different data
sources like SQL etc.
5. Use of other scripting languages in Tableau:
To avoid the performance issues and to do complex table calculations in Tableau, users can
incorporate Python or R. Using Python script can take the load off the software by performing data
cleansing tasks with packages. However, Python is not a native scripting language accepting by
Tableau. So you can import some of the visuals or packages. However, you can see how this is
down with Python for Power BI.
6. Mobile Support and Responsive Dashboard:
Tableau Dashboard has a great reporting feature that allows you to customize dashboard
specifically for a certain device such as a mobile phone or laptop. Tableau automatically
understands which device is the user is viewing the report on and make adjustments to ensure that
the right report is served to the right device.
7. Tableau Company Strategy:
Tableau has done a great job climb its way to the top of data visualization tools. So, according to
Garner Magic Quadrant. Tableau has spent more than six years as a leader. However, with the
increasing interest in data science, artificial intelligence, and machine learning, Tableau may be left
behind if it doesn’t innovate quickly. You can see from the issues with 2017 financials reporting
Forbes concerns with Tableau profitability
These are the limiting aspect of Tableau
1. Scheduling or notification of reports:
Tableau does not provide the feature of automatic refreshing of the reports with the help of
scheduling. There is no option of scheduling in Tableau. Therefore, there is always some manual
effort required when users need to update the data in the back-end.
2. No Custom Visual Imports
Tableau is not a complete open tool. Unlike other tools like Power BI, developers can create custom
visuals that can be easily imported Tableau. So, any new visuals need to be recreated instead of
imported.
3. Custom formatting in Tableau:
Tableau’s conditional formatting and limited 16 column table displays are pain points for users.
Also, to implement the same formatting to multiple fields there is no way a user can do that for all
fields directly. Users need to do that manually for each field which is very time-consuming.
4. Static and single value parameters:
Tableau’s parameters are static and always single value can be selected using a parameter.
Whenever the data gets changed, these parameters need to be updated manually every time. There
is no way a user can automate the updating of parameters.
5. Screen Resolution on Tableau Dashboards:
The layout of the dashboards gets disturbed if the tableau developer’s screen resolution is different
from end user’s screen resolution for example if the dashboards have been created in a screen
resolution of 1920X1080 and are being viewed in 2560X1440 then the layout of the dashboards will
get distorted a little bit. Also, their dashboards are not responsive. So you will need to create a
dashboard for mobile and desktop.
6. Limited Data Preprocessing.
Tableau is strictly a visualization tool. Tableau Desktop allows you do to very basic preprocessing.
This includes joining and blending data. Also, you have the ability to change data types. In an ideal
world, most data would be exported in perfect tables. However, data cleansing is a necessary step.
In most cases, an analyst needs to build a data model with recurring to format the data. This
requires a tool such as Altyrex, Power BI, Python or even Excel to preprocess data prior to loading.
In 2018, introduced their own data preparation tool called Tableau Prep. You can read the results of
Tableau Prep vs Altyrex

244 LOVELY PROFESSIONAL UNIVERSITY


Notes
Unit 14: Sharing Your Dashboard

7. Scaling and Pricing for Enterprise


This is the biggest issue with Tableau, it’s a very expensive product to scale across a large
organization. Compared to cheaper and more well-rounded BI tools. Tableau one of the more
expensive option. For security and sharing, the only option is Tableau Server which can $175,000
for an 8 core option and $35 dollars per user. Alternatively, you can use Tableau Online which is
limited but is $35 per user. This can accumulate if you are trying to have a large number of user’s
access reports.

14.6 UseTableau Public


Your story was a hit. You're going to publish it to Tableau Public so that your team can view it
online.
Note: When you publish to Tableau Public, as the name suggests, these views are publicly
accessible. This means that you share your views as well as your underlying data with anyone with
access to the internet. When sharing confidential information, consider Tableau Server(Link opens
in a new window) or Tableau Cloud(Link opens in a new window).

1. Select Server > Tableau Public > Save to Tableau Public.


2. Enter your Tableau Public credentials in the dialog box.

If you don't have a Tableau Public profile, click Create one now for free and follow the prompts.

3. If you see this dialog box, open the Data Source page. Then in the top-right corner, change
the Connection type from Live to Extract.

Learn more: Why did you have to create an extract? And what's an extract, anyway?

4. For the second (and last) time, select Server > Tableau Public > Save to Tableau Public.

LOVELY PROFESSIONAL UNIVERSITY 245


Notes
Advance Data Visualization

5. When your browser opens, review your embedded story. It will look like this:

6. Click Edit Details to update the title of your viz, add a description, and more.
7. Click Save.
Your story is now live on the web.

8. To share with colleagues, click Share at the bottom of your viz.

9. How do you want to share your story?


a. Embed on your website: Copy the Embed Code and paste it in your web page HTML.
b. Send a link: Copy the Link and send the link to your colleagues.
c. Send an email using your default email client by clicking the email icon.
d. Share on Twitter or Facebook by clicking the appropriate icon.
After you've completed these steps, click here to jump to the final section of the tutorial.

14.7 Use Tableau Server


Your story was a hit. You're going to publish it to Tableau Server so that your team can view it
online.

Publish to Tableau Server

246 LOVELY PROFESSIONAL UNIVERSITY


Notes
Unit 14: Sharing Your Dashboard

1. Select Server > Publish Workbook or click Share on the toolbar.


2. Enter the name of the server (or IP address) that you want to connect to in the dialog box and
click Connect.

3. In the Name field, enter Improve Profits in the South.


4. If you want, enter a description for reference, for example "Take a look at the story I built in
Tableau Desktop!"
5. Under Sheets, click Edit, and then clear all sheets except Improve Profits in the South.
Learn more: Share more than just your story.

6. Click Publish.
Tableau Server opens in your internet browser. If prompted, enter your server credentials.
The Publishing Complete dialog box lets you know that your story is ready to view.

Great work! You've successfully published your story using Tableau Server.
Send a link to your work
Let's share your work with your teammates so that they can interact with your story online.

1. In Tableau Server, navigate to the Improve Profits in the South story that you published. You
will see a screen like this:

LOVELY PROFESSIONAL UNIVERSITY 247


Notes
Advance Data Visualization

If you had published additional sheets from your workbook, they would be listed alongside Improve Profits in
the South.

2. Click Improve Profits in the South.


Your screen will update to look like this:

Awesome! This is your interactive, embedded story.

3. From the menu, select Share.

4. How do you want to share your story?


a. Embed on your website by copying the Embed Code and pasting it in your web page
HTML.
b. Send a link by copying the Link and sending the link to your colleagues.
c. Send an email by using your default email client: Click the email icon

248 LOVELY PROFESSIONAL UNIVERSITY


Notes
Unit 14: Sharing Your Dashboard

Summary
 There are different ways to share Tableau Dashboards.
 You can share them with any of your colleagues irrespective of how they were created or
published.
 Here are the primary formats and ways in which Tableau Dashboards can be shared:
 Sharing via Tableau Server/Public
 Sharing as a Dashboard Link
 Sharing as a PDF
 Sharing as a PPT
 Sharing as a Crosstab (Excel or CSV Files)
 Despite the straightforward available ways to share the Tableau content with your colleagues,
business partners, and officials, if you can’t share it directly to the Tableau Server, the Tableau
Reader is a quick option for publishing Tableau Dashboards.
 Tableau Reader can also be used for publishing Tableau Dashboards for those who do not use
Tableau Desktop.

Keywords
 Dashboard creation
 Dashboard Stories
 Data Source
 Data Relationship
 Crosstab

SelfAssessment
1. Following are options to share tableau dashboard
A. Sharing via Tableau Server/Public
B. Sharing as a Dashboard Link
C. Sharing as a PDF
D. All of these

2. _____file only contains the information about the data


A. tds
B. twbx
C. pdf
D. All of these

3. Tableau packaged workbooks have the _____ file extension.


A. tds
B. twbx
C. pdf
D. All of these

4. Default aggregation used for tree map__________


A. Avg

LOVELY PROFESSIONAL UNIVERSITY 249


Notes
Advance Data Visualization

B. Count
C. Sum
D. All

5. The best feature Tableau are except_____________.


A. Collaboration of data
B. Data Blending
C. Real time analysis
D. Data is smaller and more fit

6. How do you find the field is discrete in Tableau?


A. Green color
B. # symbol
C. Blue color
D. None

7. What percent of total profits do the top 10 customer by Sales represent in sample
superstore dataset?
A. 5.03%
B. 17.54%
C. 16.26%
D. 3.50%

8. Which of the following is not a Trend Line model?


A. Linear Trend Line
B. Binomial Trend Line
C. Exponential Trend Line
D. Logarithmic Trend Line

9. Green pills in tableau means


A. Continuous data
B. Discrete data
C. Random Data
D. None of these

10. Blue pills in tableau means


A. Continuous data
B. Discrete data
C. Random Data
D. None of these

11. Creating bar chart options are available in


A. Measures
B. Dimensions
C. Show me
D. All of these

250 LOVELY PROFESSIONAL UNIVERSITY


Notes
Unit 14: Sharing Your Dashboard

12. ________________ is main product and helps to create reports.


A. Tableau Server
B. Tableau Desktop
C. Tableau Reader
D. All of these

13. ______________does not need to connect to any source, but it can read reports.
A. Tableau Server
B. Tableau Desktop
C. Tableau Reader
D. All of these

14. Your data is out in the public once your report is published on to the ___________.
A. Tableau Server
B. Tableau Desktop
C. Tableau Reader
D. All of these

15. Which product only used for report reading ---------------.


A. Tableau Public Server
B. Tableau Desktop
C. Tableau Reader
D. All of these

Answers for Self Assessment


1. D 2. A 3. C 4. C 5. D

6. C 7. A 8. B 9. A 10. B

11. C 12. B 13. C 14. A 15. C

Review Questions
 How to publish a Tableau project?
 What is a TWBX file?
 What is the difference between TDS and TDSX?
 How to share a Tableau dashboard without a server?
 What are the 3 types of Tableau products?
 Write steps to create tableau dashboard?

Further Readings
 "Information Dashboard Design: Displaying Data for At-a-glance Monitoring” by
Stephen Few
 "Beautiful Visualization, Looking at Data Through the Eyes of Experts by Julie

LOVELY PROFESSIONAL UNIVERSITY 251


Notes
Advance Data Visualization

Steele, Noah Iliinsky"

Web Links

 https://www.tableau.com/
 https://intellipaat.com/blog/what-is-tableau/

252 LOVELY PROFESSIONAL UNIVERSITY


LOVELY PROFESSIONAL UNIVERSITY
Jalandhar-Delhi G.T. Road (NH-1)
Phagwara, Punjab (India)-144411
For Enquiry: +91-1824-521360
Fax.: +91-1824-506111
Email: [email protected]

You might also like