0% found this document useful (0 votes)
56 views362 pages

Tableau Document

Uploaded by

Santhosh Pa
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)
56 views362 pages

Tableau Document

Uploaded by

Santhosh Pa
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/ 362

Index

1. Tableau Advantages. 2
1A. Tableau-Naming conventions 20
2. Connections 43
3.1data types 47
3. DWH Concepts 50
4. Axis 55
5. Actions 62
5A. Parameters 71
6. Filters 81
7. Maps, Custom Geo, WMS server 111
8. Calculations, table calculations, quick table calculations 135
8A.YTD-MTD 231
9. Sorting 233
10. Grouping 238
11. Sets 244
12. Bin-Migration-Diffe between bin, sets, group 255
13. Hierarchies 263
14. Clip Boards 266
15. Data Blending 268
16. Charts 274
17. Drop Lines- Trend Lines-Forecasting 288
18. Dash Boards 306
19. Stories 331
20. Pages 352
1. Tableau Advantages
Tableau: It is a business intelligence application, anyone to connect to the data and analyze the data
within a few clicks and it analyses the data in the form of visuals

• Tableau is easy as MS excel but it is powerful enough to satisfy and experts even the
most complex analytical problems

• Tableau is leading the way with not only the features that we need for today but also
the capabilities the we need for tomorrow

• The word tableau is derived from French word called as tableaux which means pictures

• Tableau is having its own patient query language called as VIZQL(visualization query
language)

• VIZQL is combination of SQL and descriptive language for rendering graphics

• VIZQL will automatically convert any data in the form of text to visuals
Tableau Advantages

(1)Visuals Analytics: In tableau we can analyze anything in the form of visuals

• Tableau takes input as text data and its output as in the form of visuals

• By making use of SQL it is converting that textual data into visuals in the background

• the another state of feature for this tableau is it will generate the code by its own

• in tableau no need of writing code manually

(2)Faster Performance: Tableau by making use of its brand new features like tableau data
engine, performance recorder, paralyzed dash boards. It gives performance 100 times faster
than any other tool in the market currently

(3)Any Data: It can analyze any kind of data right from the DWH to Hadoop and from Hadoop to
excel and even from excel to source force data(4)Business Integration: Tableau is tightly
coupled with any kind of business and it perform the analysis of any business very efficiently
and accurately with a lesser amount of time

(4)Web and Mobile Authoring: Another new feature in the tableau is we can securely share the
analyze report to anyone according to their needs over the web and even to their mobiles also.
Just with a single click any user can able to access reports within a minute. In order to see the
report from that mobile the user needs to install the tableau app in their mobiles

Note1:In order to see the report from the mobile the user needs to install the tableau app in
their mobiles

Note2:Currently the tableau mobile app is supported for android and IOS

Tableau Components: In tableau we are having 5 different components

(1)TABLEAU Desktop: In TABLEAU if you want to design or create anything we need to use
TABLEAU desktop.

• TABLEAU desktop is the place where all the development work to be done

• It is core platform for all TABLEAU developers

(2)TABLEAU Server: In TABLEAU if you want to share anything globally then we have to make
use of TABLEAU server. It is a web based component.

• Tableau server allows any user to share the visual analysis with any one by taking help
of web browser

(3) TABLEAU Reader: If we want to share anything on the tableau desktop locally then we have
to use of TABLEAU reader, in simple TABLEAU reader shares the visual analytics locally

(4) TABLEAU Public: If we want to share anything publicly then we have to make use of
TABLEAU public even by analyzing tableau public we can enabled the visual analysis in websites
and blogs

(5) TABLEAU online: any user to perform the rapid fire business analytics in the clouds

 It is hosted version of tableau server in the cloud

 it displays the power of tableau in the cloud

Note: TABLEAU Reader, TABLEAU Public are the free components where as TABLEAU desktop,
TABLEAU server , TABLEAU online are not free. TABLEAU desktop, TABLEAU online and
TABLEAU server are available only in 14 days trail version
TABLEAU History:

 This tableau was invented by 3 members CRIS,PAT,CHABOART they combinely called as CPC
 These CPC are professors in Stanford university, their main theme to build a tool for business
analysis with rendering graphics
 They almost did their research for 10 years and they finally come out from Stanford and give
their tableau in the 2008 at Seattle ,America. finally they released their first version of tableau in
the year 8 th June 2008 and also they got succeeded in incorporating in rendering graphics

Different Versions in TABLEAU

 Tableau 9.0

o Version 9.0.4 - released July 21, 2015

o Version 9.0 - released April 6, 2015

 Tableau 8.3

o Version 8.3.8 - released July 21, 2015

o Version 8.3 - released December 1, 2014

 Tableau 8.2

o Version 8.2.13 - released July 21, 2015

o Version 8.2 - released June 18, 2014

 Tableau 8.1

o Version 8.1.21 - released July 21, 2015

o Version 8.1 - released November 20, 2013

 Tableau 8.0

o Version 8.0.21 - released March 17, 2015

o Version 8.0 - released March 20, 2013

Tableau 7

 Version 7.0.21 released January 8, 2014.

 Version 7.0 released January 17, 2012.


Tableau 6

 Version 6.1.12 released January 11, 2013.

 Version 6.0 released November 10, 2010.

Tableau 5

 Version 5.2.9 released June 23, 2011.

 Version 5.0 released May 28, 2009.

Tableau 4

 Version 4.1.9 released August 4, 2009.

 Version 4.1 released September 24, 2008.

TABLEAU Environment:

There are multiple ways to open the tableau

1.Directly from the desktop as it creates a shortcut icon

2.Click on start and go to all programs click on tableau

3.Drag any data source file and drop into the tableau icon

After opening the TABLEAU the start page of the TABLEAU divided into two sections

1. Data Section: The data section sets only user to connect to new data source or quickly opens
a saved connections. If you save any data source connection, by default all their data sources
will get stored in the TABLEAU repository under data source folder

2. Workbook Section:Work book section shows the images for the work books we have opened
recently. When we are opening the TABLEAU for the first time the work book section will be
blank.as we create any new workbook and if you have save it then those are available in the
workbook section. TABLEAU uses a workbook which is much similar like Microsoft excel.

• It is the place where the complete work to be performed in the TABLEAU. a work book
contains multiple sheets which can either be a worksheet or a dash board.

3. Worksheet:it is the smallest development object in the TABLEAU .a work sheet contains the
single view of the data which contains shelves, legends, and data window.
4. Dashboard:A dash board is a collection of multiple worksheets. Within a workbook we can
create new sheet, we can duplicate sheets, and we can delete sheets even we can hide or show
sheets

• TABLEAU has several ways to view and organize the sheets in our workbook

• workbook is the container for all our work in the TABLEAU

Note: The work book in the TABLEAU is created in the two ways 1.Click on file and select
new 2.Ctrl+N

At a time in the TABLEAU we can open multiple work books

Note :Once the workbook is saved and if you want to open that work book again we are
having multiple ways

A. in the page of TABLEAU in the data section it will automatically shows the workbook
and click on that work book

B. Click on file select open and select the work book and click on open

Data Window: In the tableau workspace first part is called as data window.This data window contains

1.Dimensions

2.Measures

3.sets

4.parameters

This data window appears left side of the workbook

Task: How to hide a data window? how to display it again

Step1:In order to hide the data window to the right of the data click on hide button
Step2:In order to display it again click on the window tab and select show side bar

Tool Bar:The second part of the workspace is tool bar.in the tool bar the list of different options are
available

1.Undo and Redo:In tableau navigating from current step fromprevious step and from previous step
to current step is very simple by making use of undo and redo options in the tool bar. we can easily
navigate from current to the previous step and previous to next.

2.save option:In that tool bar the second option is save option.In table if you want to save anything
click on the save option

3.Connect to data :Even from the tool bar we can able to create the tool bar we can able to create the
connections.
4.createing new work sheet, dash boards:

Creating new work sheet

Creating new dash board

5.Duplicate sheet: If you want to create copy of the current sheet you have make use of this duplicate
things in a work sheet.

7.Auto updates: In TABLEAU tool bar the very import option available is auto update this options works
in two ways .

i) Auto update work sheet.


ii) Auto update quick filter.

By default the auto update is enabled. If you want to disable the auto update uncheck the auto update
work sheet.

8.Run Update: In TABLEAU if you want to perform update manually then you have to make the use of
this run update options.
9.Swapping:In TABLEAU if you want swap the field (on rows column selves interching filled) then we
have to make use of swapping.

10.Sorting:In TABLEAU if you want to perform sorting the tool bar we having two options are available

i) Sorting in the ascending order.

ii)Sorting in the descending order.


11.ABC Option:ABC Option display the values in the data view.

12.Presentation mode: In TABLEAU if you want to display any report in the presentation mode then the
tool bar views presentation mode.

13.Show (or) Hiding cards:In TABLEAU we can display (or) hide the different shelves and legends. If you
want to hide any shelves in the tools bar select show on hide cards and on check the column shelve,
Row shelves ,Filter shelves and marks.

14.Data View fitting in the window:we can fit the data view in different ways. The different ways to fit a
data in window are

i)Normal

ii)Fit width

iii) Fit Height


iv)Entire View

15.Show me Option: It is the place where list of different data views available any user can select views
appropriately view in the show me and the TABLEAU will display appropriate view it show me and the
TABLEAU will displays appropriate view it shows the hightly in tractivity new in TABLEAU.

Cards and Shelves:

Every worksheet contains a variety of different cards that you can show or hide. Cards are containers for
shelves, legends, and other controls. For example, the Marks card is where you control mark properties.
It contains the mark type selector along with controls for Color, Size, Label, Detail, Tooltip, Shape, and
Angle. The controls that are available depend on the mark type.

Cards can be shown and hidden as well as rearranged around the worksheet.
The following list describes each card and its contents.Shelves are the part of every work sheet
 Columns Shelf: contains the Columns shelf where you can drag fields to add columns to
the view.
 Rows Shelf: contains the Rows shelf where you can drag fields to add rows to the view.
 Pages Shelf: contains the Pages shelf where you can split a view into several pages
based on the members of a dimension or the values in a measure.
 Filters Shelf: contains the Filters shelf; use this shelf to specify the values to include in
the view.
 Measure Values Shelf : contains the Measure Values shelf; use this shelf to blend
multiple measures on a single axis. This shelf is only available when there is a blended
axis in the view.
Legends: Well Known objects are called as legends. The different types of legends are
having in TABLEAU are

A. Color Legend: if we want to display the data view in different colors then we will use
this.

B. Size Legends: if we want to display the data view in different sizes then we will use
this.

C. Shape Legend: if we want to display the data view in different Shapes then we will
use this.

D. Map Legend: if we want to display the data in the form of maps then we will use this.

 Quick Filters: a separate quick filter card is available for every filter in the view. Use
these cards to easily include and exclude values from the view.
 Parameters: a separate parameter card is available for every parameter in the
workbook. The parameter card contains controls for changing the parameter values.
 Marks controls the mark properties in the view. There is a mark type selector where you
can specify the mark type (e.g., bar, line, area, etc.). In addition, the Marks card contains
controls for Color, Size, Label, Text, Detail, Tooltip, Shape, Path, and Angle. The
availability of these controls is dependent on the fields in the view and the mark type.
 Title: contains the title for the view. Double-click this card to modify the title.
 Caption: contains a caption that describes the view. Double-click this card to modify the
caption.
 Summary: contains summary of each of the measures in the view including the Min,
Max, Median, Sum, and Average.
 Current Page: contains the playback controls for the Pages shelf and indicates the
current page that is displayed. This card is only available when there is at least one field
on the Pages shelf.
Each card has a menu that contains common controls that apply to the contents of the card. For
example you can use the card menu to show and hide the card. Access the card menu by
clicking on the arrow in the upper right corner of the card.
Swapping: in a TABLEAU if you want to convert rows to columns then we need
swapping

Show me option: it is the place where list of different data views are available. Any user
can select views appropriate by view in the show me and the TABLEAU will displays
appropriate view it shows the highly interactive in TABLEAU

How to Add Title to a report??

Worksheet--->show title-->Double click


How to add caption to the report??

Worksheet-->Show Caption
How to show summary to the report??

Worksheet-->show summary

Reorganizing the work space: In TABLEAU even we can reorganizing the work space also we can change
the positions of the MARKS card ,Filter shelves in whatever way we want.
Note: Even we can reorganize the column shelve and rows shelve also.

TABLEAU Work Space Controls: TABLEAU work space control are different options where we can
navigate from one place to the other place by making use of those controls mainly we are having four
different type of controls.

i) Home: By making use of home control we can go to the start page.

ii) Connect to Date: By making use of this connect to data we can connect to data base.

iii) Sheet TAB: The 3rd control is sheet tab, by making use of this we can able to see the list of sheets
available in the current work book.

iv) Work Space: Using this work space control we can go to the current work space.

Work Sheet: Each work book contains work sheets and dash boards, a work sheet is place where we
build the views use of our data by dragging and dropping fields on to shelves.

In TABLEAU we can create a new sheet in many ways.

i) click on '+' button in the toolbar

ii) click the new work sheet tab at the bottom of work book.

iii) Press control + m on the keyboard.

iv) Right click on the sheet bar at the bottom and select new work sheet.

v) click on the work sheet tab and select now work sheet.

Dash Board: It is a collection of multiple work sheets where we can arrange all the work sheets for the
presentation (or) in order to monitor.

The dash board can be create in the multiple ways.

i) click on the dash board tab at bottom and select new dash board.

ii) click on '+' in the tool bar and select new dash board.

iii) click on dash board tab and select new dash board.

Properties of TABLEAU:

i) PLUG and Play: The installation of TABLEAU is very straight forward just can install and we can work
with TABLEAU within 2 to 3 min only so its just like plug and play kind of functionality.
ii) Any data any time: TABLEAU can analyze any kind of data any point of time by making use of
TABLEAU even we can work in offline which is not possible in other tools.

iii)Beyond reporting: TABLEAU can not only reports the business data but it has the ability to rapidly
analyze and solving the business problems.

iv) See the Answer: In TABLE it helps the user to see the answers very fastly with out demanding for the
manual efforts by writing code.

v)Self service BI:TABLEAU was build in mind by keeping young minds but not for experts.

-> Even the click can create new reports, and gives with out help of it (or) developers.

Tableau Minus Points

 You cannot create custom groups for different dimensions that are critical for business
purposes.
 There is a lack of freedom to create new arrangements of data. One cannot create new
relationships or add business context to one’s data.
 There is a lack of a single business view of information. An enterprise BI solution should provide
a logical metadata layer for creating a single definition of business entities such as customer and
revenue when the data resides in different formats in different systems.
 There is no enterprise reporting, scheduling alerting and notification of time-sensitive
information.
 Tableau is slower than Qlikview when it comes to its in-memory calculations.

1A. Tableau-Naming conventions


Tableau

Introduction:

Tableau software is an American computer software company founded in California in January, 2003 by
Ph.D. student Chris Stolte, Christian Chabot and Professor Pat Hanrahan.The founders moved the
company to Seattle, Washington in October, 2003, where it remains headquartered today. Chris Stolte and
Pat Hanrahan,togetherthey combined a structured query language for databases with a descriptive
language for rendering graphics and invented a database visualization language called VizQL (Visual
Query Language).

 The product queries relational databases, cubes, cloud databases, and spreadsheets and then generates
a number of graph types that can be combined into dashboards(group of worksheets) and shared over
a computer network or the internet.
 Product Versions:Current versions are listed below (as of Feb. 2015) Tableau Desktop version 8.3
and Tableau Server 8.3.
 What makes tableau different from traditional business intelligence tools?
 It’s designed for everyone. There’s no scripting required, so anyone can become an analytics
expert.
 Visualization is the same as a view, and both can refer to either a sheet or a dashboard.

Tableau offers five main products or Components:

Tableau produces a family of interactive data visualization products focused on business intelligence.

 Tableau Desktop
 Tableau Server
 Tableau Online
 Tableau Reader and
 Tableau Public

Tableau Desktop:

 Definition: Tableau Desktop is used to visualize and analyze data, create workbooks,
visualizations, dashboards and stories.
 Tableau Desktop has a Professional and Personal edition which are $1,999 and $999 respectively.
 Tableau Desktop Professional (but not Desktop Personal) can then publish these to Tableau
Server, Tableau Online and Tableau Public.
 All your development is done here. From creating reports, charts, formatting them, putting
them together as a dashboard all the work is done on Tableau Desktop.
Tableau Naming Conventions

Tableau Window:
Parts of Tablaeu Window:

1.Title Bar: This indicates name of the application along with file name.

2.Menu Bar: This includes menus(file,edit, - - - ,Help) and also contains workspace controls at end of the
bar.

Tool Bar icons:This bar displays few short cut icons which are already available in menus.
3.Workspace controls:On the right top corner of tableau window,we can observe four controls in which
every control has its own purpose .

-- Figure of workspace controls

3.a.Start page and Data connection Page: It’s represented by symbol. After clicking on this

( ) control, we can observe connection options on the data window on the left side.If we click on
“connect to data”, we will be moved to “data connection” workspace, from which we can connect to
different data sources

 We can also access “data connection” workspace by clicking on data source control ( )icon
which is next to start page icon.
 On the left side of start page, we can observe saved data connections. Tableau provides four
sample data sources for learning.
Figure: Start page and Data connection Page

3.b.Datasource control: Using this control we can connect to different datasources like files(MS-
Access,MS-Excel,Textfile etc.,) and can also connect to servers

------- Symbol of data source control

3.c.Multiple worksheet page: This page is represented by using this symbol.This page displays
all worksheets in one workbook. The below picture is displaying 15 worksheets in one workbook.
Figure: Multiple worksheet display

3.d. Worksheet control: The first control icon among four control icons is the worksheet control.
Figure: Worksheet displaying Continent and Department wise Sales.
Figure: Data view

4.Data Window: This window includes datasources,dimensions,measures,sets and parameters.

Dimensions:Dimensions(are identified by blue color in tableau window) are discrete in nature and they
include tables from datasources.

Dimensions shelf contains filtering and sorting elements,text,dates or geographical fields.

Measures: Measure (are identified by blue color in tableau window) are continuous in nature.Measure
is nothing but to sum up.All numeric values can’t be measure values.It contains numbers that we use in
formulae.

Sets:
Figure: Data window

4.1.Parts of Data Window:

a. Dataset: Data sources are referred as dataset.

b. Data subsets: Tables are referred as data subsets.


c. Data Elements: Columns in the data subsets are referred as data elements.These are classified into
five types which is shown in the below figure.
Figure: Classification of Data Elements from Data window
5.Work area: This is the area or place where we create reports based on requirements.Data view and
Worksheet are similar names to work area.

Figure: Work area


Worksheet:

Figure: Picture of Worksheet which displays Department and Continent wise Sales.
Figure: Worksheet explaining few terms

5.1.Parts of Work area:

There are two parts in work area:

a. Shelves and b. Table

5.1.(a)Shelf: A shelf is an area on the visualization screen where you can drop pieces of data so that tableau
can act on them. There are four kinds of shelves:

1. Columns
2. Rows
3. Pages
4. Filters
5. Marks
Columns and rows shelves: These are used to express data in our worksheet. Dimensions and measures
can be displayed in any order or either shelf by using “swap” tool from tool bar .
Figure: SUM(sales) by rows and Continent by columns
Figure: SUM(sales) by columns and Continent by rows

Pages shelf: Any field placed on pages shelf generates on auto-scrolling filter. It’s used to create
animated visualizations in tableau desktop.
Figure: Pages shelf and show history controls

Filter shelf: Any field placed on filter shelf enables a filter for that dimension or field. The style of filter
control is dependent on whether the field is continuous or discrete.

Mark card shelf:

Tableau applies color, shape, size to visualizations using the view/mark cards.

 Visual details are added to the chart by dragging and dropping field shelves on desired mark card
type.
 Multiple fields can be placed on color, label, size, detail and tooltip buttons.

Color: Expresses discrete or continuous values

Size: Expresses discrete or continuous values

Label: One or more fields can be expressed as label on marks

Detail: Disaggregates the marks plotted

Tooltip: Makes fields available to tooltip without disaggregating data.

Shape:Express discrete or continuous fields


Figure: Displaying about mark card shelf
5.1.(b)Table:
Figure: Worksheet displaying Caption,Summary,Table,Title

6.Dashboard:A dashboard in tableau is a collection of individual worksheets that we have created and
gathered into one bigger worksheet. We can observe the list of sheets displayed on left side of work
area.
Figure:Dashboard displaying blended axis and dual axis.
Naming Conventions:

2.Connections
Creating Data Connections in TABLEAU: Establishing a database connectivity between TABLEAU desktop
and data source

In TABLEAU we are having 2 types of connections

1.Live connection 2.Extract connection

1.Liveconnection: If you define connection type as live there is a live communication path between
TABLEAU and the data source

How to Establish a live connection:


Step1:Create a sample text file with the following data save with emp

Empno Empname

1 Ram

2 Somu

3 ramesh

Step2:inworkspace controls click on data source symbols

Step3:Select text file and open

Step4:Select Live connection ==> click on goto worksheet

save as .twb(tableau work book)

How to Refresh a Live Connection:

Select datasource-->Right click-->Refresh

Data Liveconnection TABLEAU Desktop

2.Extract(.TDE) connection: The Extract connection first connect to the data source and takes the
snapshot of the data source and places the snap shot into tableau data engine.
ThisTABLEAU data engine reads the data from the snapshot and it creates a local copy of the data source
in the form of TABLEAU data extract file(TDE) which gets stored in the data sources folder of the
TABLEAU repository.

Tabular .TDE
Snapshot created
Data Engine

Data source TABLEAU Desktop


Extract
Connection

How to Establish a Extract connection:

Step1:Create a sample text file with the following data save with emp

Empno Empname

1 Ram

2 Somu

3 Ramesh

Step2:inworkspace controls click on data source symbols

Step3:Select text file and open

Step4:Select Extract connection ==> click on goto worksheet

save .tde file(tableau Data Extract)


How to Refresh a Extract Connection:

Select datasource-->Right click-->Extract---> Refresh

double click datasource-->edit-->add filters

When we add filters here its at TDE level not data source level

Note:if you are connecting to the low performance data and if you want to improve the performance
then go with the Extract Connection.

The extract connection makes use of one powerful engine is called as TABLEAU data engine.

The TABLEAU data engine is the high performance analytical. it makes use of the memory available on
the local machine. the TABLEAU data engine will creates the local data copy in the form of TABLEAU
data extract(TDE)
Above picture Emp datasource is Extract connection,emp2data source is Live connection

Note:can we convert a live connection to Extract connection

Yes we can convert

Select data source of live connection-->right click--Extract data-->extract-->Save the .TDE file

Note:can we convert aExtract connection to Live connection

Yes we can convert

Select data source of Extract connection-->Uncheck the use extract connection

thetde file is remains same

the TDE file limitation is 4 GB

 If we are connecting to the high performance data bases then the best practise is to go for the
live connection
 If we are connecting to the low performance data bases and if we want to improve the
performance the best practise is to go for Extract connection
3.1data types

Data TypesAll fields in a data source have a data type. The data type reflects the kind of information

stored in that field, for example integers (410), dates (1/23/2015) and strings (“Wisconsin”). The data

type of a field is identified in the Data pane by one of the icons shown below.

Icon Description

Text values

Date values

Date & Time values

Numerical values

Boolean values (relational only)

Geographic values (used with maps)

Change Data Type in the Data Source Page


 Sometimes Tableau may identify a field with a data type that is incorrect. For example, a field
that contains dates may be identified as an integer rather than a date.
 To change the data type for a field that was part of the original data source (as opposed to a
calculated field), go to the Data Source page. If you are using an extract, be sure to make all
necessary data type changes before creating the extract.
 If you wait until after you create your extract to change data types for one or more fields, your
data may not be accurate.
 For example, if a floating-point field in the original data source is interpreted as an integer by
Tableau, and you create your extract before changing the field's data type, the resulting floating-
point field in Tableau will have some of its precision truncated. For information on changing
data types on the Data Source page,.

Change Data Type in the View


 To change a field's data type in a view (which is the only place you can change the data type for
a calculated field) right-click (control-click on a Mac) the field in the Data pane, select Change
Data Type, and then select the appropriate data type.
Note: Sometimes the data in your database is more precise then Tableau can model. When you add
these values to the view a precision warning will appear in the right corner of the status bar.

STRING
 A sequence of zero or more characters. For example, "Wisconsin", "ID-44400", and "Tom
Sawyer" are all strings. Strings are recognized by single or double quotes. The quote character
itself can be included in a string by repeating it. For example, ‘O''Hanrahan’.

DATE/DATETIME
 A date or a datetime. For example "January 23, 1972" or "January 23, 1972 12:32:00 AM". If you
would like a date written in long-hand style to be interpreted as aa date/datetime, place the #
sign on either side of it. For instance, “January 23, 1972” is treated as a string data type
but #January 23, 1972# is treated as a date/datetime data type.

NUMBER
 Numerical values in Tableau can be either integers or floating-point numbers.
 With floating-point numbers, results of some aggregations may not always be exactly as
expected. For example, you may find that the SUM function returns a value such as -1.42e-14
for a column of numbers that you know should sum to exactly 0.
 This happens because the Institute of Electrical and Electronics Engineers (IEEE) 754 floating-
point standard requires that numbers be stored in binary format, which means that numbers
are sometimes rounded at extremely fine levels of precision. You can eliminate this potential
distraction by using the ROUND function
 Operations that test floating point values for equality can behave unpredictably for the same
reason. Such comparisons can occur when using level of detail expressions as dimensions, in
categorical filtering, creating ad-hoc groups, creating IN/OUT sets, and with data blending.

BOOLEAN
 A field that contains the values TRUE or FALSE. An unknown value arises when the result of a
comparison is unknown. For example, the expression 7 > Null yields unknown. Unknown
booleans are automatically converted to Null

3.DWH Concepts
Dimensions and Measures:In DWH always the data exists in two tables

(1)Master Table: Master table contains the information about the business

 Master table always contains a primary key


 master table values will never be duplicated it always contains textual information
 master table always contains primary keys+textualinformation

(2)Transaction Table: foreign key tables are also known as transaction tables

 It may or may not have unique records


 it always contains metrics(numeric)
 Metrics are measuring points of business(For example marks are the metrics of student,
deposits are metric points of banks
 so metrics are nothing but numbers which are used to analyse the business. if you want to
analyse the success or failure of a super market business by making use of sales metrics

Note:without master table transaction table cant exists because without business no transaction will
takes place

Difference between master and transaction table:

chance of using master as a dimension is 99% chance of using master as a fact is 1%

chance of using Transaction as a fact is 99% chance of using Transaction as a dimension is 1%

Sr.No. Data Warehouse (OLAP) Operational Database(OLTP)


1 It involves historical processing of It involves day-to-day processing.
information.

2 OLAP systems are used by knowledge OLTP systems are used by clerks, DBAs, or
workers such as executives, managers, database professionals.
and analysts.

3 It is used to analyze the business. It is used to run the business.

4 It focuses on Information out. It focuses on Data in.

5 It is based on Star Schema, Snowflake It is based on Entity Relationship Model.


Schema, and Fact Constellation Schema.

6 It focuses on Information out. It is application oriented.

7 It contains historical data. It contains current data.

8 It provides summarized and It provides primitive and highly detailed data.


consolidated data.

9 It provides summarized and It provides detailed and flat relational view of


multidimensional view of data. data.

10 The number of users is in hundreds. The number of users is in thousands.

11 The number of records accessed is in The number of records accessed is in tens.


millions.

12 The database size is from 100GB to 100 The database size is from 100 MB to 100 GB.
TB.

13 These are highly flexible. It provides high performance.


Dimension:In which angle we want to analyse the business or we want to see the data is the simplest or
best way of the dimension.

For example company wise growth,customer wise sales,month wise profits etc

the way i want to see the data is the simplest definition for the dimension

Fact:based on what metric we can analyse the business is called fact

for example profits,percentage,sales etc

Note:Facts always represents the transactionswhere as dimensions always represents the master

facts always contains foreign key+ Metrics information where as dimensions always contains
primarykey+textual information

Types of Dimensions: Again the dimensions are divided into 9 different types

1.SCD(slowly changing dimension):if the data in the dimension is changing over the period of time then
such kind of dimension is called as SCD

For example : In the employee dimension data will change over period of time

2.RCD(Rapidly changing dimension):if the data is changing rapidly then such kind of dimension is called
as RCD

For example : age change time to time

3. UCD(Unchanged dimension):If the data is constant and it won't change then such kind of dimension
is called as UCD

For Example:Trafficsignals,surnames,country names

4.ConformedDimension:It is a dimension which is shared by the multiple business areas

java
6 to 9 time
dwh

oracle

so working on same timings


5.shrunken dimension: subset of one dimension or sub part of one dimension is called as

shrunken dimension

For Example: quarter is the shrunken dimension of the year

6.Roll playing dimension: One dimension is playing multiple roles in the fact table is called Roll playing
dimension

For Example: take date dimension the date dimension contains date of order,date of delivery,date of
invoice,date of shipping

in the roll playing dimension one dimension contains multiple foreign keys in the fact table

7.Degenerated dimension: It is a dimension where all the values gets stored in a fact table, not in
separate dimension table.

 Degenerated dimension always contains the dimension keys, it won't contains any other values
 if we maintain a separate table for the degenerated dimension these values separately gets
stored in the dimension and fact table
 as here these values are same if you store them in two tables it may consume space.
 so for that reason directly we can store all the values in a fact table
 Degenerated dimension is the only dimension which is the part of fact table

8.Junk(Use less) dimension: It is a dimension where we store junk data.

 It is a single table with a combination of different and unrelated and different data values like
flags(flag means true or false),indicators and some other unwanted data
 Junk dimension is mainly used to avoid the large no of foreign keys in the fact table
 it is oftenly created to manage the large no of foreign keys created by the rapidly changing
dimension

9. inferred dimension: If you want to load the data from a dimension into the fact and if the dimension
table is empty and if you want to load the data simply we can add the surrogate key column to the
dimension and we can load the data into the fact

 if the dimension is empty except the surrogate key then such a dimension is called as inferred
dimension

Surrogate key:it is the artificial primary key.it is automatically generated by the system by making use of
sequence

Sequence:it is the database object which automatically get incremented whenever it is used

Types of Schemas:In DWH totally we are having 3 different types of schemas


1.Star Schema:If all the dimension tables are directly attached to a file then such kind of schema is
called star schema

2.snowfalke schema:

 Some dimension tables in the Snowflake schema are normalized.

 The normalization splits up the data into additional tables.

 Unlike Star schema, the dimensions table in a snowflake schema are normalized. For example,
the item dimension table in star schema is normalized and split into two dimension tables,
namely item and supplier table.

3.star Flake or Mixed or Galaxy schema:The combination of start and snow flake is called star flake
schema

Note:Always star schema is good in performance .reason being as star schema contain fewer tables so it
is more easy to fetch the data and analyse the data

Types of Facts or measures:

Facts or Measure=Numerical data+Foreign keys

depending on the measure values the facts are 3 types

1.Additive Fact:it is type of fact where it supports all the group functions

(sum,min,max,avg,count)

for example on profit we can apply all the group functions which gives the meaningful output

2.Semi-Additive facts: it is a fact which supports only the few of the group functions.

for example if we take account balance on the account balance we can apply max or min which gives
the meaningful output where as apply any group function it won't give meaningful output

3.Non-Additive facts:it is a type of measure where we can't apply any type of aggregations

for example we will take on percentages we can't apply any group functions

Note:Any currency will take as additive

Fact Tables: Based on the fact the fact tables are divided in to 3 types.
i) cumulative fact table.

ii) Snap shot fact table

iii) Fact less fact table

cumulative fact table: It describes what happened over a period of type time this cumulative fact table
contains always the additive measures.

Eg: profit over 2 years.

Snap shot fact table: It describes what happened over the particular instance of time .This snap shot
fact table contains semi additive and non additive fact.

Eg: Profit over month (or) week

fact less fact table: It is a fact table which always contains a key without facts (or) measures.

4.Axis
Working with measures:

Axis(Horizontal part is called axis)

We can work with measures in 3 different ways

1.Individual Axis: if you are creating a separate axis for each measure on the data view then such kind
of view is called as individual axis

Task: Design a view for state wise total sales and profits in a separate axis

step1:drag the state to the row shelf, sales to the column shelf

step1:drag the profit to the column shelf. It will automatically create an individual axis for both sales
and profits
we can changes axis wise here in the marks

2.Blended axis or axis blending: The concept of mixing the axis for the two measures is known as axis
blending.

 Blending means simply combining or mixing. If we blend the axis all the measures will state to
the single axis so that all the marks shown on a single pane
 so in the blended axis all the values for each measure is shown along one continuous axis
 in order to blend the multiple measures simple drag one measure to the existing axis of another
measure
 when we blend the measure TABLEAU creates two new fields with names
measure names, measure values
 Measure names contains all the names of the different measures which are participating in
blending all the measure values will get store in the measure value field

Creating Blended axis:

Step1:drag state to the row shelf, sales to the column shelf

Step2:drag the profit and drop into the existing axis

Step3:drag the shipping cost and drop into the existing axis
second method : click on show me-->select side by side bars
In Blended axis we will have only one axis

3.Dual Axis: The third way to compare the multiple measures in the TABLEAU is by creating a dual axis.
In the dual axis we are having two independent axis that are placed on top of each other.dual axis are
useful if you want to compare the measures having different scales and units.for example profit and
discount

 if you want to create a dual axis. Drag the measure and drop into the other end of axis.It will
automatically create dual axis

Task: Design a view to display the customer segment wise sales and discounts

step1:Drag the customer segment and drop into the column shelf. Drag the sales into rows and discount
drop into the other end of the axis. it will automatically create a new axis and it will create a new field
which contains the measures.

Notes: Max we can create max we can add up four layered axis using dual axis, two on one column and
two on the row shelf
Combinational Charts:Combination charts are views that use multiple mark types in the same sheet. For
example, you may show sales per state as bars with a line across the bars showing average profit per
state. You can also use combination charts to show multiple levels of detail in the same view.

 in this charts usually we combines two different charts in a single pane

Task: Design a combination chart for the customer segment wise discount and total profits

Step1:drag the customer segment to the column shelf and discount to the row shelf

Step2:drag the profit and drop into the other end of the axis

step3:click on discount in the marks card and select bar

Step4:click on profit in the marks card and select line

Step5:click on ABC. it will automatically displays the values in the combination chart

Because each measure can have customized marks, you can customize the level of detail, size, shape,
and colour encoding for each measure too.
To customize the marks for a measure:
1. Select the Marks card for the measure that you want to customize. There is a Marks card for
each measure on the Rows and Columns shelves.
Select a new mark type for the measure. Any changes to the mark type, shape, size, color, detail and
other mark properties will be applied to the selected measure. For example, in the view below
the SUM(Sales) Marks card is active. The Mark Type has been changed to Bar and whenCategory is
placed on Color on the Sum (Sales) Marks card, the encoding and level of detail is only applied to the
SUM(Sales) marks. The SUM(Sales Plan) is not broken down by Category.

Select the All Marks card to modify properties for all measures at once.
Note: for the axis blending we can't create a combinational charts because in the axis blending all the
measure values are combined and displayed in a single field called as measure values field

6. Actions
Actions: In Tableau actions are mainly used to add the interactivity and context to the data.

 In Tableau by making use of this actions we can add the interactivity between multiple
worksheets ,files to the worksheets
 using this actions we can use the data in one view to filter the data in another view.After
filtering the data even we can call the attention to the specific results by highlighting them
There are 3 types of actions in Tableau
1.Filter Action
2.URL Action
3.Highlight Action

1.Filter Action: Filter actions are used to enable the interactivity between multiple worksheets
 This filter action allows the used to send information between worksheets
 in filter action we need to define the source sheet and the target sheet
 using the filter action we can send the information from the source sheet to the target
sheet by displaying only the related information
 filter actions adds the interactivity at the worksheet level and at the dash board level. at
the work sheet level it adds the interactivity in between multiple worksheets

Task: Design an action to enable to communication between two work sheets. If you are click on 1st
worksheet it should display 2nd worksheet

A. First worksheet contains region wise year wise data

B. second worksheet contains state wise year wise data

C. If we click on in the region to display the fields dependent on that region

Step1:Create worksheet name as a region. Drag region to rows and order date to the column shelve
Step2:Create second worksheet name as state. Drag state on to the column, order date in to rows

Step3:on a worksheet select worksheet>Actions. In the actions dialog box click add action and then
select filter
Hover: Rest the pointer over a mark in the view to run the action. This option works well for highlight
and filter actions within a dashboard.

Select: click on mark in the view to run the action. This option works well for all types of actions

Menu: right click a selected mark in the view and then select an option on the context menu. this option
works well for filter and URL Actions

Step4:Specify what to do when the select is cleared in the view. You can select from the following
actions

Leave the filter :Leaves the filter on the target sheets. the target views in the dashboard will show the
filtered results
Show all values: changes the filter to include all values

Exclude all values: changes the filter to exclude all values. this option is use full when you are building
dashboards that only show some sheets if a value in another sheet is selected

2.URL Action: URL actions are mainly used to enable the communication and interactivity between work
sheet and web page. also in the URL actions we can able to add files and other web based resources
outside of the tableau

 URL actions is just a hyperlink that points the web page, file or any other resources
 URL actions are mainly used to add more information to the data view in the tableau

Task: Drag the state to the row shelve

 Open any web browser and type california wiki and copy the URL
 click on worksheet tab select actions and select URL
 Give the name as California and select the source sheet as only the sheet that contains state in
the URL.Just place the California URL and select the run action as menu and click on ok
3.Highlight Actions: In tableau highlight actions allows to call the attention to the particular part of the
data view and dimming the other part of the data view

All selections is saved in the workbook. we can perform the highlight in multiple ways

A. Using worksheet or dash board tab

B. using the colour legend highlighting

C. Using the tool bar highlighting option

Example: Sales in to the column. Continent in to the row.worksheet-->Actions-->add action


selected part in first will be highlighted in next sheet
5A. Parameters
Parameters

What is the parameter:

Parameters are dynamic values that can replace constant values in calculations, filters, and
reference lines
You may want to set up a view that can be modified to show different measures. You can set up
this view by using a parameter control and a calculated field. The calculated field replaces the
measure on the view and changes as the parameter control is changed.

Create the parameters:


Step 1: Connect to your data source.

Step 2: From the Data window drop-down menu, select Create Parameter.

step3: Right click on parameter

Step4:Select a create parameter click on

In the Create Parameter dialog box will be display

Create the parameters and calculated fields

These steps use the Superstore sample to create a new parameter while you build the
calculated field that will take advantage of it.

Step 1

Select Analysis > Create Calculated Field.


Step 2

In the Calculated Field dialog box, for Name, type Column 1 Category.

Step 3

Next to Parameters, click Create, and in the Create Parameter dialog box, complete the
following steps.

1. Name the parameter appropriately so that viewers can tell what changing it will do. This
example uses Select Column 1 Heading.
2. For Data type, select String.
3. For Allowable Values, select List, type None as the first value in the list, and then
press Enter.
4. Complete the list by typing the names of the additional dimension fields that you want
to expose through the parameter.

Note: This example uses the customer name, customer segment, region, department,
and category fields. These are all dimensions of the same data type (string). If you
wanted to include a measure such as profit in this list, one option would be to convert
the measure to a string value. You would do this when you build the calculated field,
using the STR() function. This article covers only the single data type scenario.

The Display As aliases default to the field name, and for this exercise you can leave
them as they are.

Click OK to return to the Calculated Field dialog box.


Step 4

Repeat the previous step to create the following additional parameters:

 Select Column 2 Heading


 Select Row 1 Heading
 Select Row 2 Heading

Tip: Instead of typing each value in the list, click Add from Parameter to add them from Select
Column 1 Heading.

Step 5

In the Calculated Field dialog box, for Formula, build the following calculation:

CASE [Select Column 1 Heading]


WHEN 'Customer Name' THEN [Customer Name]
WHEN 'Customer Segment' THEN [Customer Segment]
WHEN 'Region' THEN [Region]
WHEN 'Department' THEN [Department]
WHEN 'Category' THEN [Category]
ELSE ''
END

Confirm that the status message indicates that the formula is valid, and then click OK.

Note: ELSE accounts for the None value that you included in the parameter, and it returns an
empty string.
Step 6

Create three more calculated fields, one for each of the additional parameters you created:

Calculated field
Parameter name
name

Select Column 2
Column 2 Category
Heading

Select Row 1 Heading Row 1 Category

Select Row 2 Heading Row 2 Category

The basic formula for each calculated field is the same as in the previous step, except that you
reference a different parameter in each CASE statement.

Give viewers a way to interact with views

Now you expose the parameter control so users can select the categories they want to display.

Step 1

For each parameter you created, do the following:

In the Parameters pane, right-click the parameter and select Show Parameter Control.

Step 2

From the Dimensions pane, drag the calculated fields you created to the Columns and Rows
shelves.
Step 3

From the Measures pane, drag a measure to the view. In this example, Sales is placed
on Label on the Marks card.

Step 4

Test your parameters by selecting fields in the parameter controls.

Tips:

 Sort the dynamic dimension fields alphabetically.


 Hide field labels for rows and columns.

Step 5

Reset all parameters to None and publish the workbook to Tableau Server.
Viewers can set up their own reports, save their parameter settings, and share views with
others.

Create the two identical parameters

Create a parameter where the values are the names of the measures you are going to select.
For this example, create two identical parameters, named Placeholder 1 Selector and
Placeholder 2 Selector.

Step 1

Connect to your data source. This example uses the Sample - Superstore data source.

Step 2

From the Data window drop-down menu, select Create Parameter.

Step 3

In the Create Parameter dialog box, do the following tasks:

1. Type a Name for the parameter. For this example, type Placeholder 1 Selector.
2. In the Data type drop-down list, select String.
3. For Allowable values, select List.
4. In the List of values area, type the names of the measures you want available for the
analysis.
5. When finished, click OK.
Step 4

Repeat steps 2-3 to create a second parameter and name it Placeholder Selector 2.

Create calculated fields that change measures

There are two options for the calculation. You can either change measures or you can change
aggregations. For either option, you create two calculated fields. For this example, these two
calculated fields are named Placeholder 1 and Placeholder 2. Follow the steps below to create a
calculated field that swaps measures in the analysis.

Step 1

Select Analysis > Create Calculated Field.

Step 2

In the Calculated Field dialog box, write a formula that follows the structure shown below:

CASE [Parameter]
WHEN "Measure 1 Name" THEN [Measure 1]
WHEN "Measure 2 Name" THEN [Measure 2]
WHEN "Measure N Name" THEN [Measure N]
END

For this example, the formula is:

CASE [Placeholder 1 Selector]


WHEN "Discount" THEN [Discount]
WHEN "Order Quantity" THEN [Order Quantity]
WHEN "Profit" THEN [Profit]
WHEN "Sales" THEN [Sales]
WHEN "Unit Price" THEN [Unit Price]
END

Step 3

When finished, click OK.

Step 4

Create another calculated field just like the first one, but this time name it Placeholder 2 and
use the Placeholder 2 Selector parameter. The formula for the second calculated field is below:

CASE [Placeholder 2 Selector]


WHEN "Discount" THEN [Discount]
WHEN "Order Quantity" THEN [Order Quantity]
WHEN "Profit" THEN [Profit]
WHEN "Sales" THEN [Sales]
WHEN "Unit Price" THEN [Unit Price]
END

When you use these calculated fields in the view, the parameter control will let you switch out
which measure is used.

Examples on parameter in calculation field:


Display dynamically year,quarter,month,week wise sales based on the year selection:

create parameter:

Right click on parameter----------->select Create Parameter.------->click on .

Name : parameter

Data Type : String

Current value: Year

Allowable value: select (list)

list of values created

click on ok.

In the Create Parameter dialog box will be display:

Let us go to calculation field:

Just drag on the calculation field "dynamic" file in coloum self

Drag on the sales in row self


Convert date to the exact date

Right click on columns in dyndate---->Exact date

Right click on columns in dyndate---->Discrete.

6.Filters
In tableau by using filters we can restrict unwanted data by displaying only the required data.

Advantages: Filters will improve the performance and the data view contains the required data. In
tableau we can apply filters for

1. Textual or character data

2. Numeric or Number Data

3. Date Data

1. Filtering Textual data: In Tableau textual data can be filtered directly from the data view or by
making use of filter shelf.
Task: Filtering Textual data by adding fields to the filter shelf. Design a view for state wise sales. For
those states whose name is starting with “A”.

Step1: Drag the state to the row shelf and sales to the column shelf.

Step2: Drag the state and drop on to the filter shelf


Step3: select none and check only the states starting with A in the general tab
Step4:Click on apply and then ok and final report looks like below
While filtering the textual dimension in filter shelf we can filter the dimension in four different ways

1. General 2.Wild Card 3.condition 4.Top

1. General: In general tab we can filter the data in 3 ways


A. Select from list: Here we can able to select the list of values manually all at a time, none at a
time, few at a time and even we can exclude all the values, few of the values, none of the
values.
B. Custom Value List: Here we have to enter the list of values manually
C. Use All: If you want to use all the options then we have to select use all
2. Wildcard: While Filtering the textual data if new don’t want to know the complete name and if
you know the only part of the string or single character and if you want to perform filtering then
such kind of filtering is called wild card filtering. As here we are filtering the data based on a
single character that single character is known as Wild card.
Using the wildcard we can perform the filtering in two ways

A. Including Wild card

B. Excluding Wild Card

Task: Display the state wise sales for those states whose name contains “s”
Step1: Drag the state to the row shelf and sales to the column shelf

Step2: Drag the state to the filter shelf and click on wild card

Step3:In the match value enter S and select contains click on apply and click on ok
Final out put looks like below

Note: While performing the filtering using wildcards that filtering is not case sensitive

While filtering the character data using wildcard we can filter in four ways

Contains, Starts with, Ends With, Exactly matches

3.Condition:Filtering the textual data using the condition tab.In Tableau if you want to filter the textual
data based on some condition then we have to make use of condition tab

Task: display the states whose sales is more than 50000

Step1:Dra the state to the row shelf and sales to the column shelf

Step2:Drag the state to the filter shelf


Step3: click on condition tab select by field and select sales sum more than 50000

Final output looks below


4.Top: If you want to filter the top based on the top n analysis then we have to create filter based on
the top tab

Task: Display the top 10 states based on their total sales

Step1: Drag the state to the row shelf and sales to the column shelf

Step2: Drag state to the filter


Final Output looks below

2. Filtering the Measure data: In tableau we can filter the measures by taking all the individual vales and
also by making use of the combined values

Task: Design a view to display the country wise total sales ,whose total sales more than 300000

Step1: Drag the country to the row shelf and sales to the column shelf
Step2:Drag the sales to the filter shelf and select sum

Step3: while filtering the sales click on at least and specify the at least values as 300000 and click on ok
Step4:Drag the country and drop into the colour legend

Final output looks below


Task:Design a view to display countries wise total sales,whose totasl sales in between 200000 and
400000

Step1:Drag country to the row shelf and sales to the column shelf

Step2:Drag the state to the filter shelf and select sum click on range of values specify the values as
200000 and max value as 400000
Final output looks below
Task:Design a view to display the country wise total sales whose total maximum sales is not more than
1 lakh

Step1:Drag the country to the row and sales to the column shelf

Step2:Again drag the sales to the filter shelf and select sum and click on next
Setp3:click on atmost and specify the value as 100000 and click on apply and click ok
While filtering the measure on the grouped records or on the individual values we can perform the
filtering in 4 different values

A. Range of Values :if you want to filter the measure based on a particular range(Based on min and
max value) then we should filter the measure using range of values
B. At least: If you know only the minimum value and if you don’t know the max value of the
measure then we should filter the measure using at least
C. At Most: If you know only the Maximum value and if you don’t know the min value of the
measure then we should filter the measure using at most
D. Special: While handling the null values in measure this special option is used

Task:Design a view to display country wise sales for those countries whose individual sales value more
than 50000

Step1:Drag the country to the row shelf and sales to the column shelf

Step2:Again drag sales to the filter shelf and select all values and click on next

Step3:Select at least and specify 50000 click on apply ok


Final report looks below
Note: It is not recommended to perform the filtering on measures because as the measures contains
large amount of data it may degrade our performance. So instead of applying on measures directly
create sets and perform the filtering
3. Filtering the date Data: In Tableau the date can be filtered in 3 different ways

A. Relative Dates: If you want to filter the dates for a specific period of time then we have to go with
relative dates

B. Range of Dates: If you know the starting and ending values of the date fields it means that if you know
the fixed range of dates then we have to go with the range of data

For example if you want to find the sales from 1mar2014 to 29 apr2014 as here we know about the fixed
range then we have to go with range of dates

 If you don’t know the ending date even we can filter the data using starting date option
 If you don’t know the starting date even we can filter the data using ending date option
 In order to handle the null values we have to go with the special values
D. Discrete Dates: If you want to filter the each individual dates as oppose to the range of dates
then we have to go with the discrete dates. This type of filter is called as discrete date filter
.Because we are defining discrete values instead of range

Task: Design a view to display the 2011 and 2012 sales

Step1: Drag the order date to row and sales to the column shelf

Step2: Drag order date and drop into the filter select years and click next

Step3: In general tab select 2011 and 2012


Task:Design the view to display the country wise sales for a period between 1june2013 to31july2013

Step1:Drag country to the row and sales to the column shelf

Step2:Drag order date and drop into the filter select range of dates and click next

Step: Select starting date as 1june2013 and ending date as 31july2013


Quick Filter: Another type of performing filtering the tableau is by making use of a quick filter. It allows
the user to filter the values dynamically directly from the data view. This quick filter adds the
interactivity and dynamism to the data view…we can add n no of quick filters for the data view in the
tableau..quick filter can be enabled for the textual data ,numeric data ,date data

Task: Design a view to display the country wise sales for the year 2013 whose sales are in the range
between 2013 whose sales are in the range between 10 lakhs and 15 lakhs .for those countries which
doesn’t contains v in their names using quick filter

Step1: Drag the country to the row shelf and sales to the column shelf

Step2: Right click on order date select show quick filter .In the quick filter uncheck all the years except
2013

Step3:Right click on sales and select show quick filter and select range 10 lakhs to maximum

Step4:Again right click on the country click on drop down box to go to edit filter ..go to wild card enter V

Step5:Drag the country and drop into the colour shelf


Note: Even we can add Quick filters fields which are not part of the data view

Filter Sharing Options:Even in the tableau we can share filter globally across multiple worksheets.

 By making use of this feature we can define the filter in one sheet and simply we apply the filter
in the respective sheets
 Upto tableau 7.0 we are having two options for sharings or we can share the filters in 2 ways
1.Local 2.Global
 From Tableau 8.0 we can share the filters in 3 ways
1.Only this Worksheet:It indicates the filter get applied only the current worksheet
2.All using the datasource:It means this filter will get apply to all the sheets which are using the
data source
3.Only to the selected worksheets:I indicates if you want to share the filter for the selected
worksheets then we should go this option.it is a new option that doesn’t available in Tableau7.0

Task: Design a global filter for the region wise month wise sales for the months jan and june and
apply this filter for all the sheets using data source
Step1:Drag region to the rows and sales to the columns shelfs
Step2:Drag the order date to the column shelfs
Step3:Right click on order date and select months
Step4:Right click on months order date and select show quick filter
Step5:From the list of months un check all the months and select only jan and June
Step6:Right click on the filter select apply to worksheets and select all using this data source

Context Filters :By default all the filters in tableau are computed independently, it means each filter
access all the rows without depending on other filter.

 In Tableau if you want to define dependent filter then we have to make use of Context-Filter.
 Context-Filter act as the independent filters all other filter that we define (or) set will act as
dependent filter because they process only the data that precede to the context filter.

ADVANTAGES :

1).The Context Filter is mainly used to create the dependent top-n Filters.

2).It improves the performances.

3).If you have lot of filters (or) if you are having larger data sources the query may be slow, we can set
one (or) more context filters to improve the performance.

NOTE: Even through if we define normal filter first and the context filter next, Tableau will computes
context filter first and later it will compute the normal filter.

NOTE: In order to perform the context filter a temporary table is created automatically by Tableau when
we set the context. It will mainly used for relational data sources .For EXCEL, MSAccess, TEXT Files the
temporary table created as access table.

For SQL-Server, MYSQL, ORACLE data sources must have permission to create a temporary table.

TASK4: Design a view to display the top 10 items based on sales for the furniture department.

Step1: Drag item to row and sales to column shelve.

Step2:Right click on item select filter and select top 10 sales Sum click on apply and click on ok.

Step3: Drag the department and Drop into filter shelve and select any furniture department.

Step4: Right click on department in the filter shelve and select add to context. it will display top 10 items
of furniture department.

Step5: Drag the item and Drop into color legend.


NOTE1: Context defines an environment, where when the similar groups of resources are available.

Note 2: Always the context filter is indicated in the GRAY color.

NOTE 3: Even the always the context filter will appear on top of the filter shelve. we can’t change the
position of the context filter in filter shelve.

NOTE4:If we Remove context from the filter the filter will appear on the filter shelve itself by convert in
to normal filter.

TASK5: Design a view to display the top 10 states for the year 2010

Step1: Drag the state to rows and Sales to column shelve.

Step2: Right click on the state and select filter go to top and select top 10 sales sum, Click on apply, Click
on ok.

Step3: Drag the order date to filter shelve and select year and click on Next.
Step4: Select Year 2010 and right click on the order date in filter shelve and add to context.

Task6: Design a view to display the top 10 items for California state in the year 2010.

Step1: Drag the State and items Drop into the row shelve and sales to the column shelve.

Step2: Right click on Order date and select Show Quick Filter in the year, select only the year 2010.

Step3 : Right click on Order date in the filter shelve and select Add to Context.

Step4: Right Click on the state and select show quick filter and select California.

Step5: Again right click on state and select add to context .

Step6: Drag the item into the filter shelve and select top 10 sales sum click on apply and click on ok
button.

Step7:Drag the item And drop in color Legend.

It will automatically display the top 10 items for state California in the year 2010.

NOTE: We can add one or more context filters for a single data view.

DATA-SOURCE FILTER: From tableau 8.1 the new feature in available in tableau is data source filters.
This allows the users to perform the filter at the data source level.

TASK: Perform the filtering at the data source level for the year 2013 technology data.

Step1: Right click on data source and select edit data source filter
Step2:In the edit data source click on add and select department and select technology and click on ok.
Step3:Again Edit Data source and click on add and select field order date and select year 2013 and click
on ok.
Step4: click on view data in the data window and see the data.

6. Maps, Custom Geo, WMS server

TABLEAU MAPS
Definition of Map:
What is a Map?

A map is a symbolic depiction highlighting relationships between elements of some space, such
as objects, regions, and themes.
Many maps are static two-dimensional, geometrically accurate (or approximately accurate)
representations of three-dimensional space, while others are dynamic or interactive, even
three-dimensional. Although most commonly used to depict geography, maps may represent
any space, real or imagined, without regard to context or scale; e.g. brain
mapping, DNA mapping and extraterrestrial mapping.
Types Of Maps In Tableau
1) Symbol Maps
2) Filled Maps

1) Symbol Maps

Symbol Maps are simply maps that have a mark displayed over a given Longitude and Latitude.
Using the “Marks” card in Tableau you can quickly build up a powerful visual that informs users
about their data in relation to its location.

Minimum Requisite:

 1 Geographical Dimension
 0 or more Dimensions
 0 to 2 Measures

The first thing you are going to need is geographical data, this means that you either have to
have the Longitude and Latitude for the data points you want to show or you have fields of data
that you can match up to the geographical roles in Tableau for example Country, City, Postcode
etc.

As you can see we already have the Country, State, City and Postal Codes matched to the roles
so any one or all of these can be used.
Data fields having
Geographical roles

Generated Latitude
and Longitude
Steps for creating a symbol map to show Country-wise sales and profit:

1) Drag the two Measure Geographical Dimensions (Longitude) and (Latitude) into Columns
and Rows respectively.

2) Double click on the Country field and Tableau will move this onto the level of detail.
Note: All the Country/Region are represented by dots (i.e symbol)

3) If you click on Show Me, you will see that symbol maps is selected automatically once you
compete Step-2.

Note: On the top left corner of the map you will find 4 symbols as given below:-

Zoom In

Zoom Out

To highlight a selected area on the map

Back to normal
4) Drag Country/Region into Label and Color, Sales and Profit into Label present under Marks
tab.

Result: All the countries are displayed in different (dot symbol) colors with their respective
SUM(Sales) and SUM(Profit) values.
2) Filled Maps

Filled maps are great ways to show concentration by location, where location is a distinct area
on the map with borders separating it from other areas. We see these very often with election
results data, where certain regions are shaded a certain color according to how they voted.

The filled map mark type uses geocoding to fill a polygon with a color based on data. The
primary use of the filled map mark type is for creating choropleth maps (also known as
thematic maps or data maps). The area to be filled is defined by the geographic fields used in
the view.

Minimum Requisite:

 1 Geographical Dimension
 0 or more Dimensions
 0 or 1 Measure

Different methods for creating Filled Maps

Method -1:

1) Drag the two Measure Geographical Dimensions (Longitude) and (Latitude) into Columns
and Rows respectively.
2) Double click on the Country field and Tableau will move this onto the level of detail.
3) Drag Country/Region into Label and Color, Sales into Label present under Marks tab.

4) Select Filled Map present under Marks tab.


5) All the Country/Region are filled with different Colors along with their respective
SUM(sales) values, as shown below.
Method -2:

1) Drag the two Measure Geographical Dimensions (Longitude) and (Latitude) into Columns
and Rows respectively.
2) Double click on the Country field and Tableau will move this onto the level of detail.

3) Drag any measure (Sales) into Color present under Marks tab and click on Edit Colors to
change the color. Automatically a filled map is generated as shown below.
Method -3:

1) Drag the two Measure Geographical Dimensions (Longitude) and (Latitude) into Columns
and Rows respectively.
2) Double click on the Country field and Tableau will move this onto the level of detail.

3) Click on Show Me and select filled maps. Drag and drop Country field into Color. A filled
map is generated as shown below.
TASK 1: Building a basic symbol map in the TABLEAU for the different states of USA.

STEP 1: click on state geographical fields. It automatically create maps with different states.

STEP 2 : select only states belonging to USA and select keep only.

STEP 3: Drag the state field and drop into the color.

STEP 4: By default it will create a symbol map in TABLEAU with all the state belonging to USA.

TASK 2: Building filled maps in TABLEAU for the different states of USA.

STEP 1: Click on the states geographical field, drag the state and drop into color, it will create a
symbol map

STEP 2: Click marks card and select filled map.

Step 3: Drag the state and drop into the label.

TASK 3: Design a filled map to display the state wise sales and profits of USA and also enabled
the user to select the required state on the map at run time.

STEP 1: click on the state geographical field.

Step 2: Drag the state and drop into color.

Step 3: Click on marks card and select filled map.

Step 4: Drag the state, profit, sales to the label.

Step 5: Right click the state and select quick filter.

TASK 4: Design a symbol map for the quantity orders in the ASIAN Continent.

STEP 1: click on the country geographical field.

Step 2: Right click on continent select show quick filter.

Step 3: Uncheck all the continents except Asia.

Step 4: Drag the order Quantity and drop into the label.

Step 5: Drag the country and drop into color.


Step 6: Drag and drop the order quantity to size. It will display size of the symbol based on
order quantity.

NOTE : In the TABLEAU we can able to build the maps in online and offline.

TASK 5: Designing style maps in TABLEAU.

Here we can design the maps in styles.

1. Normal
2. Gray.
3. Dark

The default style is gray.

 In TABLEAU we can build the maps in offline ,online.


 If we are building the maps in online even we can add the data layer and map
layers also ,where as in off line we can’t the add data layer and map layer.
 In the online mode TABLEAU connects to the remote server and fetches the data.

Step 1: Click on the state geo graphics.

Step 2: click on map tab go to map options select the style as either normally gray (or) dark
even adjust the washout place in the requirement, even add the map layer and data layer
which are in the online mode.

NOTE : In TABLEAU we can build the maps in the online mode by default.

NOTE : If you want to build in the off line mode click on map tab go to background maps and
select on line.

 If you want to design a maps in offline mode click on the maps tab and go to
background, select the mode either offline (or) online and set as default.

TASK 6: Design a map to display the state wise profits for state belongings to India, for the
different year in each department.

Step 1:click on the state geographical field.

Step 2: Right click on the country and select show quick filter.
Step 3: from the list of the countries check only India and uncheck everything.

Step 4: drag the profit and state into the label.

Step 5: Drag the department Drop into the row shelve and order date into the column shelve.

Step 6: Click on label and click on edit, and edit the profit label and state label and display them
in a single line, click on apply and click on ok.

TASK 7: Design a map to display the state wise sales and profits for the India in a dual axis.

Step 1: Click on the state geographical field.

Step 2: Select only the state belongs to India and select keep only.

Step 3: Drag one more latitude and drop to the row shelve.

Step 4: In the marks card of the 1st latitude drag the profit into labels. In the marks card of 2 nd
latitude drag the sales into size.

Step 5: In the marks card of the 2nd latitude select pie chart and drag the department into the
color legend of the latitude 2 marks card.

Step 6 : In the 1st latitude of marks card select filled map and state into the color.

Step 7: Right click on second latitude in the row shelve and select dual axis.

Step 8: After selecting dual axis in a single map it combines both the single map and filled map.

NOTE: In TABLEAU is not default property identifying the geographical fields even we can add
the geographical property by right click on field and go to geographic property and select the
available property based on field.

Custom Geo coding:


Building maps manually in TABLEAU: In TABLEAU we can build maps with our own data, even
with the our own latitude & longitude fields with the help of the of batch geo coding, the
process of building the maps on our own data without using automatically generated latitude &
longitude is known as Custom geo coding.
Example - Importing Numeric Postcodes
This example demonstrates how to custom geo code data in Tableau. Follow the steps below to
import numeric postcodes into Tableau and create a new postcode geographic role.

1. Create a .csv file. For more information, see Create an Import File.

Note: To add German Postcodes to the existing Country hierarchy, include a column for
Country (Name) in the .csv file.

2. Save the .csv file in a folder on your local computer.


3. Create a schema.ini file. For more information, see Create a schema.ini File .
4. Save the file as schema.ini in the same folder as the .csv file.
5. Import the custom geo coding files into Tableau. For more information, see Import
Custom Geo coding.
6. Assign the new geographic role to a field. For more information, see Assign Geographic
Roles.
7. Plot the postcodes on a map.
After assigning a new geographic role to a field, drag the field to a map view to plot the
data. For more information on how to create map views, see Build a Map View.
The German postcodes will be placed in your map view. Each mark in the view
represents a postcode, whose location was specified in the custom geocoding data you
imported.

TASK 1: Implementing Custom Geo coding on a single table (or) Single file.

Step 1: Crate an excel file with the following data


country, state, city, Adress, pincode.

India,ap,hyd,mitivanam,500072

Step 2:Open Google & enter batch Geo Coding , click any batch geo coding website & copy the
data from the excel file & paste it in to the input select the delimeter TAB click on geo code.

Step 3: Copy the output from the batch geo coding & paste it in to the excel.

Step 4: Remove all the copied data except latitude, longitude data & for the latitude data give
the field name as latitude & for the longitude data give the field name as longitude & save the
file as excel geo coding.

Step 5: In TABLEAU click on connect to data & MS excel & select that custom geo coding file,
click on open.

Step 6: In the workbook connection window sheet1 & Data connection window selectlive
connection.

Step 7: click on state geo graphic field in order to create the map automatically.

Step 8: If you want to create map with our own geo coding fields, Drag the longitude field to the
row shelve.(latitude, longitude field which we created).

Step 9: Drag the state to the color shelf & Address to the label Shelve.

TASK 2: Implementing the custom geo coding on joints.

Step 1: Modify the existing data file by removing the latitude and longitude from the sheet 1
and copy into the sheet 2.

Step 2: copy the city data from the sheet1 & paste it in to the sheet2 and save it.

Step 3: Right click on data source click on refresh.

Step 4: Again right click on source & select edit data source connection multiple tables click on
add table and select sheet 2 and click on ‘join’ and join sheet1 and sheet2 with common
dimensions using common column city.

Step 5: Drag the longitude from the sheet2 in to column

Step 6: Drag the address from the sheet1 to the color and to label shelve.

Step 7: Now it display a map with a latitude & longitude from the sheet2 & Address from the
sheet1.
TASK : Performing the custom Geo Coding in the import method.

 In TABLEAU even we can perform the custom geo coding from a .csv file.
 Steps to perform the custom geo coding from a csv file.

Step 1: Click on map tab go to geo coding and select import geo coding.

Step 2: Select the location of the file and click on import.

NOTE: Import the file which contains latitude and longitude and place the file in the folder.

Step 3: If we want to remove the file from the geo coding select map tab.

(68-76)

Wms servers:-
Advanced Maps:-

Wms servers:- By default in the TABLEAU we can add the back ground the map in two ways.

1) Online mode.
2) Offline mode.

*) If the online mode maps and offline maps are not meeting your requirements even we can
addd our own background maps from the wms server .wms stands for web map service servers.

*) These wms server are available in two ways

1) As a free service

2) As a paid service

*)In real time normally the client will buy their own background maps from the wms server.

To select a new map source:


 Select Map > Background Maps and then select the map source you want to use.

Add a WMS server


1. Select Map > Background Maps > WMS Servers.
2. In the WMS Server Connections dialog box, click Add.
3. In the subsequent dialog box, type the URL for the server, and then click OK.

You can add as many map servers as you need. Each WMS server is displayed in the list of
background maps on the Maps menu. The map sources will be saved with the workbook and
available to anyone you share the workbook with. You can also export the map source to a file that
you can share with others so they can quickly connect to it.

Export a WMS server


After you add a WMS server, you can export it to a file you can share with others so they can quickly
connect to it.
To export a WMS server:
1. Select Map > Background Maps > WMS Servers.
2. In the WMS Server Connections dialog box, select the server you want to export as a map
source, and then click Export.
3. In the Export Connection dialog box, type a name for the file and choose a location. The
file will be saved as a Tableau Map Source (.tms).
4. Click Save.

The Tableau Map Source includes any default map options settings you have specified. For
example, the map source will include any custom set of map layers you have specified to show by
default.
Note: If you change the map options defaults you should export the map source again to include the
new settings in the map source file.

Import a map source


1. Select Map > Background Maps > WMS Servers.
2. In the WMS Server Connections dialog box, click Import.
3. In the subsequent dialog box, navigate to the saved map source file (.tms), select it, and
then click Open.
Import a map source
1. Select Map > Background Maps > WMS Servers.
2. In the WMS Server Connections dialog box, click Import.
3. In the subsequent dialog box, navigate to the saved map source file (.tms), select it, and
then click Open.
Use a WMS map source
After you have imported a WMS map source into Tableau, or connected to a WMS server, you can
create a map view using the WMS background map that was created when you imported the map
source or connected to the server.
To create a map view using a WMS background map:
1. In Tableau, select Map > Background Maps, and then select a WMS background map to
use in the view.

2. Add a geographic field to the view.

3. Select Map > Map Options, and then select the map layers you want to show in the view.
For more information, see Set Map Options.
Task1:- Add a custom background maps for the state wise sales.

Step1:- Open any web browser and enter neo wms.sci.gsfc.nasa.gov.

Open the neo wms site and copy the path in the address bar.

Step2:- Open TABLEAU and click on map tab go to background maps and select wms server

Step3:- click on add and paste the neo wms server in to

Step4:-close the wms server connections window click on state geographic field ,click on map tab
and go to back ground maps and select ‘Neo Wms’.

Step5:- Again click on maps tab and go to map options in the map layers of the map options select
only one of the layer.

Step6:- Drag the sales to size and color

Step7:-If we want set this background of map as default click on map and go to background maps
and select set as default.

Note:- If you save the wms source it will automatically sales that map source in to the map sources.

Note:- Folder of the TABLEAU Repository that TABLEAU maps source will get stored with the
extension .dot TMS (TMS mean TABLEAU MAP SERVICE).
Image processing: In TABLEAU if you want to perform visual based analysis by taking the back
ground images then we need to analyse the databy taking the image dynamically.

Task: Design image processing for category wise sales and each category takes 3 times and
in the output represent the item in the form of images and perform the analysis.

Step1: Create a excel document with two sheets one sheet contain the category information and
2nd sheet contains the item information.

Category sheet
Item Sheet
Category Item
Item x y
computer Desktop
Desktop 100 50
Computer Laptop
Laptop 100 50
Computer Keyboar
Keyboard 100 50
d
Pendrive 100 50
Peripheral Pen
s drive Scanner 100 50

Peripheral Scanner Printer 100 50


s

Peripheral Printer
s

Step2: Save this excel file as image processing and download all the item images from the
google.

Step3: Connect to the excel sheet in TABLEAU by connecting to both the sheet product and
items using multiple sheets.

Step4:drag the x and y coordinates to the columns and row shelves.

Step5: click on the map tab go to back ground images select images processing

Step6:In the background image window click on add image and click on browse select the
desktop image and click on open.
Step7: for the x field and for right enter the value as 100 and for y field and for top enter the
values as 50.

Step8:click on option and click on add.

Step9:click on items and select the desktop and click on ok click on apply and click on ok.

Step10:Repeate the same steps for all other items available.

Step11:Right click on both the X and Y axes and uncheck show header.

Step12:Right click on the category and select show quick filter, In the quick filter check only the
particular category item.

Step13:Finally create a dash board and drag this image processing sheet in to the dash board
and create another work sheet which contains the sales of this items.

8.Caluculations,table calculations, quick table calculations


Calculation

 To Extract meaningful results from your data,it is sometimes necessary to modify the
fields that tableau extracts from your data source. Tableau provides a calculation editor
for customizing and creating fields and also supports ad hoc calculations that you create
on shelves as you work in a view
 Note: You can use all of the following calculations if you are using a relational data
source, however, multidimensional data sources do not support aggregations and
binned data.
 Every time with the default fields (or) existing fields in the TABLEAU ,It is not possible to
derive the meaningful result from the data.
 Sometimes we need to create the new fields in the TABLEAU Known as calculated fields.
 These calculated fields are the reusable fields we can define them once and we can use
them ‘D’ no.of times
 When we create any calculated fields all those calculated fields will get stored in the
TABLEAU workbook which gets stored in the TABLEAU repository.
 For Example: Product, SP ,CP
P1 , 100 ,80
P2 , 50 ,35
P3 , 40 , 28
-------------------------------------------------------------
Product wise Profits
Profit =SP-CP
--------------------------------------------------------------
Product Profit
P1 20
P2 15
P3 12
 Here “Profit” is a calculated field . which get stored in workbook of table all repository.
It is not existing in the data source.

Task:- Displaying the product wise total profit

product.txt

product,unitsordered,unitshipped
p1,100,80
p2,50,35
p3,40,28
Step1: Create a calculated field by clicking on the analysis ,select calculations fields and
create calculation field after connecting to the product data.
Step2:In the calculated field specify the name as calculation1 the formula as
sum([Unitsordered])-sum([Unitshipped]) click on ok.

Step3:In the dimensions open the product table drag the product to row shelve and
calculation1 into the column shelve drag the calculation1 into the color and click on abc.
Note: If we create a calculated measure in the TABLEAU and in the calculated field in
the formula tab if we use any aggregation function the aggregation of that calculated
measure in the work sheet is indicated with AGG.

Note: In the calculated field we can add the parameters, we can add the fields ,we can
add the different types of function available in the TABLEAU.

Note: If we create any calculated field that field name is prefixed with equal to (=).

Functions in TABLEAU:

Number Functions:
1) ABS Function: ABS is also called absolute value function .
ABS Function takes the input as a number ,it ignores the sign of the number
weather is negative (or) positive and just display the number.

Syntax:- ABS (Number)


Example:-
1) ABS(99) =99
2) ABS(-99)=99

Task1:- Implementation ABS function in TABLEAU.

Step1:- click on the analysis field and select create calculated field specify the name as ABS
example in the formula tab ABS(-100) + ABS(100) click on ok.

Step2:- Drag the ABS example to the row shelve and right click on ABS example and click on
dimension.
2.TRIGONOMETRIC FUNCTION :

 The different trigonometric function available in the TABLEAU are Sin,Cos,Tan Cot.
 The different inverse trigonometric function available in TABLEAU are Asin,Acos,Atan.
 These function are mainly used navigation, engineering ,physics, Geometric.
 For example: These function are mainly used to perform the analysis like finding the
distance b/w two sea shores (or) the average length of costal area of a city …..etc.

3. Cyclometric Funtion:

 The inverse of the trigonometric function are called as cyclometric function (or) inverse
trigonometric functions.
 The different cyclometric function available in TABLEAU are ASIN ,ACOS,ATAN,ATAN2.

Task1: Implementing trigonometric function and cyclometric function in TABLEAU.

Step1:- click on the analysis tab and select create calculated field specify the name as cos and
specify cos(PI()/3). Click on apply and click on ok.

Step2:-create another calculated field and specify the name as acos and specify the formula as
degrees(Acos(0.5)) click on apply and click on ok.
Step3:- Drag the cos function to the row shelve and Acos function to the row shelve.

Step4:- Right click on Acos and select dimension

SIN,COS,TAN,COT Function:

Syntax:-

COS(RADIANS)=NUMBER

SIN(RADIANS )=NUMBER

TAN (RADIANS)=NUMBER
COT(RADIANS)=NUMBER

Inverse Trigonometric Function :-

Asin,Acos,Atan

Syntax:-

ACos(Number) =Radians

ASin(Number)=Radians

ATan(Number) =Radians

 Inverse Trignometric function takes the input as number and it display the output as
radians.
 If you want to convert the radians to degrees use the degrees function

The ‘Acos’ and ‘Asin’ the n

Note: If you specify the values out of range in the inverse trigonometric function if display
NULL.

4) Degrees Function: Degrees function takes the input as ‘radians ‘and it display the output as
degrees

Eg :- Degrees(PI()/5) =36.0

5) Div Function:- Div is also called division function

Syntax:- Div(Number1,Number2)

Note: The division function divides the number1 with number2 and it will displays the output as
quotient.

6) Exp Function : Exp is also called as exponential function

Syntax :- Exp(Number)

Eg:- Exp(7) =e^7

7) LN Function : LN is one of the Logarithmic function available in the TABLEAU.

 LN takes the input as number at it returns the natural Logarithmic values of number, If
the number is grater then it returns 0.
 If the number is less than or equal to zero then it returns NULL
Syntax: LN(Number)

If number >0 return logerithanmic value

Number <= then it returns NULL.

8) Log Function : It takes input as number along with the [base] and it display the logarithmic
values of number along with the base.

 If [base]is omitted it takes default base as 10.

Syntax :Log(Number,[Base1]) [ ]……. That field is optional

< > …………that field is mandatory

Eg :- Log (1) =Log10

9) Max and Min Function: Max returns the max of an expression across all the records

Max returns the min of an expression across all the records

10) PI Function :Returns the numeric constant PI

11) Power Function: The power function takes the input as number and if powers that number
with the specified power.

Syntax:-

Power(number, power)

Eg:- Power(10,3) =1000

12) Radians : Radian function will convert s any number (or) degrees to the radians.

Syntax:- RADIANS(Number/Degrees)=Radians.

Eg:- RADIANS(PI()/3) =0.0183

13) Round Function : Round function takes the input as the decimal number and it rounds that
number based on the no.of decimal places.

Syntax :ROUND(Number,[no.of decimal places])

Eg :- Round(45.421234567,2) =45.42
Round(45.421234567,3) =45.42

Note : While rounding if next number is 5 (or) more than 5 it adds 1 to the current decimal
place

If next number < 5 then it display same decimal value.

Task :- Implementing round function in TABLEAU.

Step1:- create a calculated field by clicking on the analysis tab and specify the name as round
and enter the formula as ROUND(45.4567,-1) Click on ok.

Step2 : - drag the round function to the row shelve right click on the round and select
dimension.

Output:- ROUND(45.4567,-1) =45

Here if we take -1 then it will rounds the value be form the decimal point 5 is eqal to 5 so it
will adds 1 to 4 .so we get output as 50.00

Note: If the no.of decimal places are negative it will try to round the values from the left of the
decimal point.

While rounding it current number is or more then 5 it adds 1 to the previous value

If num < 5 then it display same previous value.


14) Sign Function : Sign function takes the input as number.

Syntax: Sign(number)

If number is +ve it returns +1

If number is –ve it returns -1

If number is zero it returns 0

Eg:- Sign(-100) =-1

Sign(100) =1

Sign(0) =0

15) SQRT Function: The SQRT is also called Square root function and it will takes input as
number and it will display square root of that number.

Syntax: SQRT(Number) =Number.

Eg :- SQRT(100) =10

16) SQARE Function : Square function takes the input as number and it will gives square of that
number .

Syntax: Square(number)

Eg : square(10) =100

17) ZN Function: This function is also called as zero number functions.

ZN takes the input as number (or) field

If the number values is not null then it display that number values

If the number value is null then it display zero.

Syntax: ZN(expression)

Task : Implementing ZN function in TABLEAU.

Step1:- create a sample on the text with the following data.

Product ,sales
P1 ,200

P2 , 100

P3 , 400

P4,

P5,

P6,

zn function.txt

Step2 :- Save the notepad in the desktop with name data.

Step3:- connect to the text file from the TABLEAU.

Step4:- create a new work sheet in the TABLEAU drag the product to the row and sales to
column shelve by default it will display null for p4 ,p5,p6.

But here our requirement is if we get any null data in place of that null we have to display zero.

Step5:- click on analysis tab and select create calculated field enter the field name as ZN sales
and in the formula ZN(sum[sales]) click on ok.

Step6 :- Drag the products to row and ZN sales to the column shelves .now it will display zeros
in place of null.
Note: In number function must commonly used function are ABS,ROUND,SIGN,ZN Function.
STRING FUNCTIONS:

1) ASCII Function: It returns the ASCII Number of the string .It takes input as string and gives
output as ASCII Number of starting character of the string.

Syntax:- ASCII(‘STRING’)

Eg :

ASCII('A') = 65

ASCII(‘TABLEAU’) =84 ( : . ASCII Number of ‘T’)

ASCII(‘tableau’) =116 (:. ASCII Number of ‘t’)

Note : while specifying the input parameters in the string function we need to specify the input
string with in single quotes (‘ ‘) (or) double quotes ( “ “).

Note: The ASCII value of upper case letters and lower case letters are different.

Task :- Implementing ASCII in TABLEAU.

Step1: click on the analysis and select create calculated field specify the field name as ASCII
and in the formula tab enter ASCII("TABLEAU") click on ok.

Step2: create another calculated field name as ASCII2 and enter formula as ASCII("tableau")
click on ok.
Step3: Drag the ASCII,ASCII2 to the row shelve right click both ASCII AND ASCII2 click on
dimension
2) CHAR FUNCTION: If we won't know character for a particular number we will use this char
function
 character function takes the input as ASCII number (or) integer and gives the output as
character based on ASCII code number
 The reciprocal of ASCII function is char function

Syntax: CHAR(Integer)

converts the given integer ASCII code into a character

Example: CHAR(65)='A'

CHAR (84) =’T’

TASK :- Implementing char function in the TABLEAU

Step1:- create a calculated field with name char and in the formula enter CHAR(84) click on ok.
Step2: - Drag the char and drop in to the row and see the output character output is T.

3) BOOLEAN FUNCTION : In Boolean function the output is either ‘True’ (or) ‘False’.
The different Boolean function available in string calculations are
A. Starts with
B. End with
C. Contains
D. Isdate

These function takes input as string and outputs either True (or) False.

A) Starts with :

Syntax:- STARTSWITH(‘String’,’searching sting’)

Eg:- STARTSWITH(‘TABLEAU’,’TA’)=True

STARTSWITH(‘TABLEAU’,’BB’)=False

 In starts with it contains string and search string if string is start with search string it will
give True otherwise display false
TASK : Implementing starts with in TABLEAU.

Step1:- create a calculation field with name starts with and formula as
STARTSWITH("TABLEAU","TA") And click on apply click on ok.

Step2:- Drag the starts with to the row shelve and it display output as True.

B) Ends with :

Syntax: ENDSWITH("String","searching string")

Eg:- ENDSWITH(‘TABLEAU’,’AU’) =TRUE

ENDSWITH(‘TABLEAU’,’EA’) =FALSE

 If the search string is matching the ending characters of the string it will display true,
otherwise it will display false.

TASK :- Implementing ENDS WITH in TABLEAU.

Step1:- Create a calculated with name ‘ends with’ and formula as


ENDSWITH(‘TABLEAU’,’AU’) click on ok.
Step2:- Drag the ends with and drop into the row shelve.

Note : In the Boolean function if you specify the input string in the upper case and if you
specify the searching string in the lower case if you specify the exactly matching search
string in lower case then it will display ‘false’ even through if the values are matching.

Eg: ENDSWITH(‘TABLEAU’,’au’)=false

C) Contains:

Syntax: CONTAINS("Input string","searching")

 In the search string is existing in input string that it display true,if it is not existing then it
displays false.

Eg:- CONTAINS(‘TABLEAU’,’BL’)=TRUE

CONTAINS(‘TABLEAU’,’BB’)=FALSE

CONTAINS (‘TABLEAU’ ,’bL’)=FALSE

TASK:- Implement CONTAINS IN TABLEAU.

Step1:- Create a calculated field with name contains and formula as


CONTAINS("TABLEAU","BL") Click on apply and click on ok.
Step2 : Drag the contains to row shelve.

D) IS Date function : Is date function takes input as string and it the string is valid date then
it displays True ,of the string is not valid date then it displays false.

 The default date format in the TABLEAU is “month day ,year”

Syntax:- ISDATE(‘DATE’)

Eg : JUNE 8,2014

Eg: ISDATE(’08-06-2014’)= TRUE

ISDATE(‘08062014’)=FALSE

TASK: Implementing ISDATE In TABLEAU.

Step1: Create calculation field with name ISDATE and formula as ISDATE("08-06-2014") and
click on ok
Step2 :- Drag ISDATE to row shelve and check whether it is displaying True (or) false.

Step3 :- Again right click on ISDATE function modify the input string as following
ISDATE("08062014") Click on ok.

Step4:- Again Drag ISDATE to row shelve.

Note: In TABLEAU the Boolean function fields are prefixed with ,equal to T/f(=T/f)

4.Trimming Functions: In TABLEAU the different data trimming function available are

A. TRIM

B .LTRIM

C.RTRIM

 These functions eliminates the trialing spaces and leading spaces from a given string
 Leading means the spaces that are in the left side of the string and trialing means the
spaces that available the right side of the string.

Syntax:- TRIM("string")

LTRIM("string")

RTRIM("STING")

Eg:- TRIM(" TABLEAU ")= ‘TABLEAU’

LTRIM(‘TABLEAU‘) =’TABLEAU ‘

RTRIM(‘TABLEAU‘) =’TABLEAU’

TASK: Implementing trimming functions in TABLEAU.

Step1: create a calculated field with name trim in the formula tab enter TRIM(" TABLEAU ") just
click on ok.
Step2:- drag the trim field to the row shelve apply the len function on the TRIM and check
weather TRIM is eximinating the empty space (or) not.

5)LEN FUNCTION : LEN Function also called as length function ,it takes in put as string and it
display the length of the string.

Syntax: LEN(“STRING”)
Eg: LEN(“TABLEAU”) =7

6) LEFT ,RIGHT ,MID FUNCTION: Left function takes the input as string and no.of character
from left and it display the no.of character from the left.

Syntax:- LEFT(string,no.of-character-fromleft)

Eg:- LEFT(‘TABLEAU’,3)=TAB

 Right function takes input as string and it display no.of character from right.

Syntax:- Right(string,no.of chars from right)

Eg:- RIGHT(‘TABLEAU’,3) =EAU

 Mid function takes the input as string and also takes starting position and in starting
position it will display the noo.of character

Syntax: MID(String ,starting position, no.of character)

Note: even in the TABLEAU we can create the caliculates fields with the function names also

Eg: MID(‘TABLEAU’,2,2) =AB

7)FIND: find function takes the input as the string and it search for sub string in that string if
the sub string is existing it gives the starting position of the string and also optionally we can
specify the starting position in the input string for searching .

Syntax: FIND(INPUT_STRING ,Sub String ,[START])

Eg: FIND(‘TABLEAU’,AU) =6

TASK 1:- Implementing find function in TABLEAU.

Step1:- create caliculated field with name find,in the formula tab enter FIND("TABLEAU",'A')
click on ok.

Step2:- drag the find and drop to rows.


Step3:- Right click on find and select dimension it display value as 2.

Step4:- Again right click on find click on edit and in the formula FIND(‘TABLEAU’,A,3) click on
ok.

8.REPLACE FUNCTION: Replace() takes the input as string and in the input string it will
search for the searching string ,of the search is exist it will replace the search string with
replace string.

Syntax: REPLACE(String ,search-string, replace-string)

Eg: REPLACE("ORACLE","ORA","MIRA") =MIRACLE

TASK1:- Implementing Replace function in TABLEAU.

Step1:- Create a caliculated field with name replace and in the formula tab enter

REPLACE("ORACLE","ORA","MIRA") Click on ok

Step2: Drag the replace field into Rows.

9.Space Function : Using the Space function we can provide the space b/w two strings.

Syntax:- SPACE(NUMBER)

 Space function takes input as number and it provides no.of spaces.

Eg:- ‘BI’+’SPACE’(2)+’ETL’=’BI ETL’

SPACE(2)=” “

Task: Displaying only the first name from the customers

Step1:Right click on the customer name and create a calculated field with name finding space and in the
formula tab enter FIND([Customer Name]," ")

Step2:- Again create another calculated field with name first name and in the formula tab enter

LEFT([Customer Name],[FindingSpace]-1)
Step3:-find the first name length by creating another calculated field with name first name-length in the
formula enter LEN([FirstName])

Step4:-Drag the customer name to the rowshelfs, first name to rows and first name-length to column
shelf

Task2:-Display only the customer name except the first name

Step1:-created a calculated field on customer name right click on customer name and click on create
calculated field and field name as except first name and formula as

MID([Customer Name],[FindingSpace]+5)

Step2:-Drag the customer name into row shelf except first name in row shelf
Note1:-we can use one calculated field inside another calculated field

Note2:-calculated fields are reusable. We can define them once and reuse them any times.

Parameters:

In tableau using the parameters we can pass the values dynamically from the worksheet without
opening and modifying the calculated field every time.

 In tableau we can create different types of parameters like


1. Integer parameters
2. String parameters
3. Float parameters
4. Boolean parameters
5. Date parameters
6. Date&time parameters

 If we create the parameters all those parameters are visible in the parameters tab of
the data window
 We can pass all values to the parameters in 3 ways based on the types of parameters.
The three ways are
1) All 2) list 3) Range
 Even we can modify the parameters after declaring them also
 Just Right click on parameters and select edit and just modify the parameters
 If u wants u display the parameters in the data window right click on parameters
and select show parameter control. it will display in worksheet(or)data window
Note: parameters are re-usable components .we can define parameters once and we can use them in ‘n’
no. of calculations

TASK:-Display the container wise total profits and in the container check whether the small box large
box and medium box are available (or)not. if they are available display the particular container take
another container as falls

Step1:-Here container is a parameter. Create a parameter by clicking Crete and specify the name as
containers and data type as String, allowable value as list that in the list of values small box, largebox
and medium box and click ok

Step2: create a calculated field on the container with name container-checking.in the formula tab create
CONTAINS([Container],[containers])
Step3:-Drag the container to row and profit to the column shelves. container-checking to the row shelf

Step4:-Drag the container-check in the color

Step5:-Right click on the parameter and select show parameter control.

NOTE: where ever we find the word dynamism always the parameter should come into picture

TASK:-Display only the midname from the customer name; display only the last name from the
customer name

Step1:-Right click on the customer name and create calculated field with name find space and in the
formula tab give FIND([Customer Name]," ")

Step2:- Again create calculated field on customer name, create name as Except-first name and formula
as MID([Customer Name],[find space ]+1)
Step3:-Right clicks on except first-name and create calculated field with name find space2 and formula
as FIND([Except-first name ]," " )

Step4:-Right click on except first-name and create calculated field with name except first,mid and
formula as MID([Except-first name ],[find space2 ]+1)

Step5:-Right click on except first-name and Crete calculated field with name mid name an formula as

Left([Except-first name ],[find space ])

Step6:-Drag the customer name, except firstname,except first,mid,midname to row shelf’s


TASK:-Display, state wise, region wise,profits.Design the dynamism in such a way that if u click on
central region it should display the states along. with particular region along with their profit also

Step1:-Drag the state and region to the rowshelfs and profit to columns. Create parameter as region
Step2:-Drag the region to filter and click on condition tab formula and enter formula, before entering
the formula create a parameter on region

Step3:-Enter the formula as[Region]=[region parameter]


Step4:-Right click on parameter and show parameter control

3.Date Calculations:

The 3’rd types of functions available in the calculation are date functions

(A).Year function: year function takes the input as date and its returns only year from the date.

E.g.:year (jun 11,2014)=2014

Syntax: YEAR(Date)=year from date


(B).Month function: month function takes the inputs as date and it returns only the month from the
date

Syntax:-MONTH (Date)=month from date

E.g:- Month (Jun 2011, 2014)=jun

(C)Day function: Day function takes the input as date and it return only the day from the date

Syntax: Day (date)=day from month

e.g.: DAY (jun 11.2014)=11

TASK:1 Implementing month ,day, year function in the TABLEAU.

Step1:- create a caliculate field with name year and in the formula tab enter YEAR([Order Date]) click on
ok.

Step2:- Drag the orderdate into row shelve and right click on that field and click on dimentions again
right click on measure and change the property to discrete.

Step3:- Again create a caliculated field with name month and in the formula tab enter MONTH([Order
Date]) click on ok.
Step4:- create another caliculated field with name day and in the formula tab enter DAY([Order Date])
click on ok.

Step5:- convert month and day to dimensions then from dimensions drag the month and day to row
shelve.

D) DATEADD FUNCTION: DATEADD FUNCTION adds a particular interval to the input date based on the
date field (or) based on the date part.

Syntax: DATEADD(Date part,interval,input-date)

Eg: DATEADD(‘Year’,2,’jun’,2014)=jun 11,2016

TASK:Implementing DATE ADD FUNCTION in TABLEAU (or) ADD one year to current year and one
month to the current month and one day to current day and display the output in such a way that
with the view is displaying the current year we should display the next year with the view is display
the current month we should display the next month.

Step1:-create a caliculated field with name next year and in the formula tab enter .
DATEADD('year',1,[Order Date]) click on ok.

Step2:- create another caliculated field with next month and in the formula tab enter
DATEADD('month',1,[Order Date]) Click on ok.

Step3:- create another caliculated field with next day and in the formula enter DATEADD('day',1,[Order
Date]) Click on ok.

Step4:-Drag the next day ,next month,next year to the row shelve along with the year,month,day.
Note: In the date add function if you take the date part in the upper case the function won’t work
always we have to specify the date part in the lowercase.

E).Date Diff function: Date diff function display the difference between starting date and ending date
date based on the date part.

Syntax: DATE DIFF (date part, starting date, ending date, [starting –week day])

DATE DIFF (‘year’, doj, dol) =3

TASK: Implementing date function in tableau by finding the avg shipping time between the order date
shipped date based on country wise.

Step 1: Create a calculated field with name avg shipping time and in the formula write

DATEDIFF('day',[Order Date],[Ship Date]) click on ok .

Change calculated field from sum to avg

Step 2:Drag the country to row shelf, drag the order date into row shelf and right click on the order date
click on exact date and then change to discrete value

Step 3: drag the ship date into row shelf and right click on the ship date click on exact date and then
change to discrete value

Step 4:Drag the calculated field into row shelf and change to discrete
NOTE: Date diff function also accept the part in the upper case .

F)Date name function :date name function display the sub part of date in the form of string.

F)date part function :date part function display the suppart of date in the form of number or integer

syntax : datepart (date –part ,input-date, [string- week date ])

eg: datepart(‘month’ #jun 11, 2014 #)=6

TASK: Implementing the date name and date part function in tableau

Step 1:Create calculate filed with name current month and in formula write DATENAME('month',#2004-
04-15#) click on ok.

Step 2:Crete another calculated field with name current month number and in the formula write
DATEPART('month',#2004-04-15#) click on ok
Step 3:Drag current month and current month number to row shelf.

Note :Date name function display the date values based on the input date

Note: Always keep the hard codded date values in between the hashes (#) in TABLEAU.

G) ISDATE FUNCTION: ISDATE() FUNCTION is the Boolean function in the dates.

 ISDATE Function checks weather the input date is valid (or) not.
 If the input date valid it returns true,if input date is not valid it returns false.

H) TODAY FUNCTION: In TABLEAU TODAY Function display current date.

I)NOW FUNCTION : NOW Function display the current date along with the current time also.
J.Date Trunc: Date trunk ( ) is mainly used to perform the truncating of the dates

Syntax:Datetrunc (Date part, input-date,[starting-week day])

E.g.: Datetrunc (‘quarter’,’14-jun-2014’)=1-apr-2014

Datetrunc (‘month’,’14-jun-2014’)=1-Jun-2014

Datetrunc (‘Week’,’14-jun-2014’)=8-jun-2014

Datetrunc (‘year’,’14-jun-2014’)=1-jan-2014

4) Type Conversion Function:- This function are mainly used to convert the data from one type to
another type.

The different type conversion functions available are

i) INT
ii) FLOAT
iii) DATE
iv) DATE TIME
v) STR
 Suppose take 1.123

1 -> integer .123 -- >Decimal part

i) INT : It convert any data type to integer.


Eg:- INT(1.123) =1
ii) FLOAT :It convert any data type to float .
Eg:- FLOAT(1) =1.0
iii) DATE : It convert any data type to date.
iv) Date time:- Date+time.
v) STR:- It convert any data type to string .

TASK:- Implementing int and float function in TABLEAU.


Step1:- create a caliculated field with name int and in the formula tab enter int(12.23) click on ok.

Step2:- Drag the int and drop into the row shelve.

Step3:- Right click on the int and check dimention.

Step4:- Right click on int and click on edit and in the formula tab enter float(12) click on ok.

Step5:- Goto the work sheet and check.

Step6:- Again right click on the int and in the formula tab enter int(12.23)+float(12) click on ok

TASK2:- Implementing STR() in TABLEAU.

Step1:- create a caliculated field with name length of the customer ID and in the caliculated field
LEN(STR( [Customer ID])) click on ok

Step2:- create a new sheet and drag the customerid into row shelve and length of customerId in the
row shelve.
Step3:- Right click on the length of customerId and select dimention and the pproperty as discrete click
on ABC.

NOTE:- Along with the actual data fields tableau will create on more additional field called as no.of
records which indicates the total no.of records in the data source.

5) AGGREGATE FUNCTION:- Aggregate() function are mainly use to combine the individual data and it
display the group value.

 The different aggregrate(0 available are SUM,MAX,MIN ,AVG,VARIENCE,STANDARD DEVIATION


ETC.

TASK:- Design a view to display the year wise,dept wise,total sales ,avg sales ,max sales and min sales.

Step1:- drag the order date and drop into row shelve.

Step2:- Drag the department and drop into row shelve .

Step3:- Drag the sales and drop into the column shelve.

Step4:-click on the analysis tab select create caliculation field specify the field name as average sales and
in the formula tab avg(sales).Repeat the samestep for min(sales) and max(sales).
Step5:- Drag the avg(sales),min(sales),max(sales) into the column shelve.

Step6:- click on the sum(sales) in the marks card and drag the dept and drop into the color.

Step7:- Again click on the min(sales) drag the dept drop into the color.
TASK:- Design a view to display the state wise total profits ,no.of item and profits per each item.

Step1:- drag the Staterow

Profitcolumn

Itemcolumn

Right click on the item go to measure and select count.

Step2:-create a caliculated field with name profit per item and in the formula tab
int(sum([Profit])/count([Item])) click on ok.

Step3:- Drag the profit per item to the column shelve

Step4:- click on profit per item marks card and click on state and drop into the color.
Median ():It displays the median of the numbers based on the even no. of numbers and odd no.
of numbers.

If the numbers are even it will display the average of 2 numbers where as the number is odd it will
display the mid number.

For e.g., if count of number is odd 10, 11, 12 = 11

If count of number is even 10, 11, 12, 13 = (11+12)/2 = 23/2 = 11.5

Syntax: MEDIAN (Expression)

Task: Implementing median in Tableau

Note: On the text files and on the excel files if you want to use the median function we need the data
extract, with the live connection it is not possible to use the median function

Step1:- Create a sample text file with the following data numbers

Number

100

111

122

Save the file with name sample data.

Step2:- In the tableau connect to the text file with the import connection
Step3:- Create a calculated field on the numbers by right clicking on the numbers and select create
calculated field specify the name as median and in the formula write MEDIAN([Number]) Click on
‘OK’.

Step4:- Drag the median and drop into the rows click on ‘abc’

Step5: Add one more number in the sample data file as 124 and save the changes

Step6:- Refresh the extract connection and check the median value.

ATTR() function: Attr is also called as Attribute function.


ATTR is mainly used to aggregate the dimensions.

ATTR function take the input as expression and in that expression if the data contains same list of
values then the ATTR function returns that value. If it contains different values then it returns _ for
dimension and null for measure.

Syntax: ATTR([Expression])

Task: Implementing ATTR function in Tableau/

Step1: Create a notepad with same list of values

sales 100,

100,

100,

100,

Step2: save the notepad and connect to the Tableau


Step3: Create a calculated field with name ATTR and in the formula write ATTR([Sales])

Step4: Drag the ATTR field into the rows and it will display the number 100

Step5: Modify the data text file by adding a new value ‘101’ save the data text file.

Step6: Refresh the data connection and now it will display ‘Null’ in the ATTR.

Steps to perform aggregations in Tableau:

1) We can’t mix aggregate field with non – aggregated field.


e.g., sum(sales) * profit = invalid

2) On the aggregate field again we can’t implement an aggregation

e.g., sum(Avg(Sales)) = invalid

3) We can’t evaluate aggregated field with individual field.

e.g., MIN(Sum(Sales), Profit) = invalid

However MIN(Sum(Sales), Sum(Profit)) = Valid


4) We can’t combine aggregate fields with constant

e.g., Sum(Sales) * 7 = valid

5.Logical Calculated Functions:


In Tableau logical calculations are mainly used to perform the conditional evaluation based on the
condition.

 The logical function will check whether the given data value satisfies the required condition
or not.
 If that satisfies the condition it will display the required value else display other value.
 Logical calculations are mostly performed with KPI’s
 KPI: Key Performance or Progress Indicator
 KPI is one type of performance measurement
 Any organization uses the KPI’s to evaluate the success or failure of the business.
 To evaluate success in terms of making progress towards strategic goals of an organization.
 Some times the KPI’s are also called as Key Success Indicators. Because an organization
defines and measures progress toward the organization.

Always the KPI’s are define on the measures.

(i) If and only If (IIF) function: It performs single condition evaluation


Syntax: IIF(condition_check, then, else)

If condition is satisfying it will display “THEN” part

If condition is not satisfying it will display “ELSE” part

Task: Design a view to display state wise sales and measure the performance in each state by
taking sales KPI.If the sales more than 20000 then indicate the field name in green color, if
the sales <200000 then indicate the sales in red color.

Step1: Drag the state and sales, drop into the row and columns

Step2: Create a calculated field with sales and in the formula tab write

IIF(sum([Sales])>200000,"Greeen","Red")
Step3: Drag the sales KPI and drop into the color change the color Green to green and red to “Red”m

KPI
Task: Design a view to display the region wise customer segment wise discount, sale ratio.

Step1: Drag the region and drop into columns and drag the customer segment to rows

Step2: create a calculated field with name discount – sale – ratio and in the formula tab enter

IIF([Sales]!=0,[Discount]/[Sales], 0) click on OK

Step3: Drag discount – sale – ratio field and drop into columns

Step4: Right click on discount sales ratio and convert the aggregation to average. Right click on the
discount – sale – ratio go to default properties select number format, select percentage and select
the decimal places and click on ‘OK’
Task: Design a view to display the region wise customer segment wise average discount ratio
or discount sale ratio for the sale amount more than 2000 and encode it in the view with the
department.

Step1: Drag the region and customer segment to rows and column shelfs

Step2: create a calculated field with name average discount –ratio and in the formula tab enter

IIF([Sales] >2000, [Discount]/[Sales], 0) click on OK

Step3: Right click on discount ratio and convert the aggregation to average. Right click on the
discount – ratio go to default properties select number format, select percentage and select the
decimal places and click on ‘OK’

Step4: Drag average discount –ratio field and drop into columns

Step5: Drag the department into color and click on ‘abc’


Task: Design a view to display the region wise customer segment wise discount based on
sales range from 1000 to 10000 and allows the user to change the sales range dynamically in
the data view.

Step1: Drag the region and drop into columns and drag the customer segment to rows

Step2: Create a parameter, specify the parameter name as Sales range, data type as Integer and
allowable values as range, in the range of values check minimum, maximum and step size and enter
the minimum values as 1000 and maximum values as 10000 and step size as 1000.

Step3: create a calculated field with name average discount – ratio and in the formula tab enter

IIF([Sales] >[Sales range], [Discount]/[Sales], 0) click on OK


Step4: Drag average discount –ratio field and drop into columns

Step5: Drag the department into color click on ‘abc’

If Statement:
In Tableau if you want to perform the multiple condition evaluation then we have to make use of
the If Statement

Syntax: If([condition], THEN,[Expression]

ElseIf[condition], THEN, [Expression]

--------------------------------------------

--------------------------------------------

--------------------------------------------

Else [Expression]

END

e.g., Continent wise

If select sales then <sum of sales>

Elseif select profit the <sum of profits>

Elseif select discount then <sum of discount>

Else

End
Task: Design a view to display the dynamic measures for the continent based on the user
selection (In a single view based on the continent display the sales, profits, discount,
unitprice, ordered, quantity based on user selection)

Step1: Drag the continent and drop into rows

Step2: Create parameter, name it as measure, select the data type as string, allowable values as list,
and in the list of values enter sales, profit, discount, unit price, order quantity, click “OK”

Step3: Create a calculated field, name it as dynamic measure and in the formula tab write

If [measure] ='sales' THEN sum([Sales])

ElseIf [measure]='profit' THEN SUM([Profit] )

ElseIf [measure] = 'discount' THEN sum([Discount])

ElseIf [measure] = 'unitprice' THEN sum([Unit Price])


ElseIf [measure] = 'order quantity' THEN sum([Order Quantity])

Else 0

END

Click “OK”

Step4: Drag the dynamic measure and drop into column shelf

Step5: Right click on the measures parameter and select show parameter control click on ‘abc’

Step6: These kinds of data view are called as dynamic views or adhoc views.

Spot Lighting Calculations:


Based on the data view if we are coloring the values depend on one calculations then these kind of
calculations are called as Spot Lighting calculations.
Task: Create a spot lighting calculations for the category wise customer segment wise total
sales in the form of a text table and spot light the data view for the categories whose sales
more than 20000 with green color and whose sales <20000 with red color.

Step1: Drag the categories to row shelf and customer segment to the column shelf, drag the sales
and drop into text

Step2: create a calculated field with name spot lighting calculation and in the formula tab

IIf(sum([Sales]) > 200000, 'Good','Bad')

Step3: Drag the spot lighting calculation and drop into the color
Task: Design a view to display the categories wise margins

Step1: Drag the categories drop into rows

Step2: Create a calculated field with margins and in the formula tab

IIF(sum([Sales])!=0, sum([Profit])/sum([Sales]),0)

Step3: Drag the margins and drop into the column and click on ‘abc’ and drag the category drop into
color

Step4: Right click on margin goto default properties goto number format select percentage and click
“OK”

Task: Design a view to display the margins for the dynamic dimensions based on the user
selection. The required dimension are continent, department, region, category, customer
segment, country

Step1: Create a calculated field with name margin and write in the formula tab as
IIF(sum([Sales])!=0, sum([Profit])/sum([Sales]),0) click “OK “ and drag the margin into rows

Step2: create a parameter name as dimension and select data types as string allowable values as list
and in the list of values

Enter continent, department, region, category, customer segment, country and click Ok

Create a calculated field with name dynamic dimension and in the formula tab enter

If [dimension] = "continent" THEN [Continent]

ElseIf [dimension] = "department" THEN [Department]


ElseIf [dimension] = "region" THEN [Region]

ElseIf [dimension] = "category" THEN [Category]

ElseIf [dimension] = "customer Segment" THEN [Customer Segment]

Else "No Dimension"

END

Click “OK”

Step3: Drag the dynamic dimension and drop ino the columns and right click on parameter and
show parameter control

Sep4: Drag the dimension parameter and drop into color legend

Step5: Select the required dimension from the list and see the color changes in the data view.
ISNULL and ISDATE:
IsDate, IsNull two Boolean functions that are available in the logical functions of the TABLEAU

IS NULL:
Syntax: ISNULL (expression)

IS NULL function checks whether expression is NULL or NOT.

IF it is NULL it display TRUE, if the expression is not NULL then it will display FALSE

ISDATE Function:
It takes input as string if the string is a valid date and then it will display TRUE otherwise it will
display FALSE

Task: Design a view in order to display the state wise sales and if the user selects any state it
should display only that particular state in the map and the required measure value along
with the measure name and the currency indicator.

Sep1: Creae a parameter with name state selection and specify the data type as string and allowable
value as List.

Step2: Selec add from field and selec state and click OK. It will automatically adds all the states to
the parameter
Step3: Create a calculated field with name dynamic state and in the formula enter

If [State] = [state selection ] THEN [State] END

Click ok

Step4: Right click on the dynamic state go to geographic role and select state or province
Step5: Click on the dynamic state field it will automatically create a map

Step6: Right click on the state parameter and select show parameter control

Step7: Drag the dynamic measure and drop into the labels

Step8: Drag the dynamic state and drop into the labels

Step9: Drag the measure selection parameter which we created yesterday and drop into the label

Step10: Right click on the measure selection parameter and select show parameter control

Step11: Click on label shelf and click on text and place the parameter and dynamic measure in the
same line click on “OK”

Step12: Right click on dynamic measure goto default properties goto number format select
currency standard and select the required currency indicator and click on “OK”

IFNULL() Function: IFNULL() takes input as two values if the 1st value is NULL it displays the
2nd value If the 1st value is NOT NULL it display the 1st value only

Syntax: IF NULL ( value1, value2)

Return value1 if it is not NULL


Returns value 2 if value 1 is NULL

E.g., IF NULL (1,2) = 1

IF NULL( , 2) = 2

CASE() Function:
Case function is the another way to perform multiple condition evaluation

Syntax: CASE(expression) WHEN <value1> THEN <RESULT1>

WHEN <value2> THEN <RESULT2>

WHEN <value3> THEN <RESULT3>

ELSE <RESULT>

END

Task: Design a view to display the user selection date part wise total profits, if the user
selects any date part it should display only that particular date part in the data view.

Step1: Create a calculated field with name Year and in the formula tab write

YEAR([order date] click OK

Step2: Create a calculated field with name ‘Quarter’ and in the formula tab

DATEPART(‘quarter’,[order date]) click OK


Step 3: Create a calculated field with name month as in the formula tab write MONTH ([orderdate])
click on ok

Step 4: Create a calculated field with name week and in the formula tab write
DATEPART(‘week’,[orderdate]) click on ok

Step 5: Create a calculated field with name day and in the formula tab write DAY([orderdate])

click no ok

step 6: By default all there calculated field will gets created in the measures. Convert all these

Measures into dimensions.

Step 7: reate parameter with name ‘date selection’ select type as string and select allowable values as
list in the list of allowable value select year, quarter, month, week and day click on ok
Step 8 : Create a calculated field with name ‘Dynamic date’ in that ‘dynamic date’ calculated field write
the following formula.

Case [date selection]

When "year" then [Year]

When "quarter" then [Quarter]

When "month" then [month]

When "week" then [week ]

When "day" then [day]

End
Step 9: Right click on the date-selection parameter and select show parameter control and select the
required date filed
Task: Design view to display the customer segment wise total profit and color the view dynamically
based on the geographic fields namely region, country,state and also table the view dynamically
bvased on the user selection along with profit.

Step1: Create parameter name as ‘demagraphic field’type as string and list of values enter
region,country,sate click on ok

Step2:Create calculated field with name ‘dynamic coloring’ in the formula write

Case [demagraphic field]

When "region" then [Region]

When "contry" then [Country]

When "state" then [State]

end

Click on ok

Step 3:Drag the customer segment into the columns and drag the profit and drop into the rows

Step 4:Drag the dynamic coloring and drop into to the color and again drag dynamic coloring and drop
into lable along with profit

Step 5: Right click on geographic field parameter and select show parameter control.

Step6: In the parameter change the demographic field based on selection the color could change .
TABLE CALCULATIONS :
 Table calculations are the calculations that are applied to the entire values in the table.
 The table calculations can be performed in two ways
1) Automatic Way
2) Manual Way
 In order to perform the table calculations we need to define two things.
1) What type of calculations we are performing.
2) Where we are performing the calculations (or) computations.
 Again where we are performing the calculations is having two parts
A) Addressing Fields.
B) Partitioning Fields.

A)Addressing Fields:

 It indicates how we are addressing the calculations field.


 Addressing fields define part of table where we are applying the calculations.
 Addressing fields mostly be dimensions.

B)Partitioning Fields:

 The dimensions that define how we are dividing the data view to perform the calculations (or)
How we are grouping the data fields perform the calculations are known as portioning fields.

Addressing Options: In Tableau we are having the list of addressing options.

1) TABLE ACROSS

2) TABLE DOWN
3) PANE ACROSS

4) PANE DOWN

5) TABLE ACROSS THEN DOWN

6) PANE ACROSS THEN DOWN

7) CELL

1.TABLE ACROSS:

 If you are select the Addressing option as table across tableau performs (or) address calculation
along the entire table moving horizontally.

2.TABLE DOWN:

 If we select the addressing options as table down TABLEAU performance the computation
along the entire table vertically.

3.PANE ACROSS:

 If we select addressing option as pane across tableau perform the calculation across each pane
horizontally.
4.PANE DOWN:

 If we select the addressing option as pane down tableau perform the calculation across each
pane vertically.

5.TABLE ACROSS THEN DOWN:

 If you select the addressing options as table across then down, Tableau computes or address the
table across the horizontally first then down the table vertically.
6.PANE ACROSS THEN DOWN:

 If you select the addressing option as pane across then down ,tableau compares address across
the pane horizontally first then down the pane vertically.

7.CELL:

 If You Select the addressing options as cell TABLEAU perform the computation across each cell
in the data view.
TASK: Design a view to continent wise year wise total sales and their sales growth.

Step1) Drag the continent and drop into rows, Drag the order-date and drop into rows, Drag the sales
and drop into columns.

Step2) Click on marks and select bar charts

Step3) Drag the continent and drop into color.

Step4) Right click on sales and select create table calculation and select the type of calculations as
difference and addressing field as pane down, click on apply ,click on ok.
Step5) Drag the existing sales into area of differencing sales.
TASK: Design a view to display the year wise, quarter wise, total profits in each customer segments in
a single axis along with profit growth.

Step1: Drag the Order date and drop into rows.

Step2: Drag the customer segment and drop into columns.

Step3: Drag the profit and drop into the columns.

Step4: Right click on profit select add table calculation and select the calculation type as difference and
select the addressing field as pane down click on apply, click on ok.
Step5: drag the profit and drop into existing axes.
Note: All the Table calculated fields are indicated with triangle.

Note: In the table calculations even the calculations can be performed based on the next value, previous
value, last value, first value.

DIFFERENCE FROM:

Task: Design a view display the department wise, year wise, total sales and sales difference in each
quarter.

Step1: Drag the department and order date to row shelve.

Step2: Drag another order data and again drop into columns and sales to columns.

Step3: Right click on sales select add table calculations and select type as difference from along pane
down and display the values difference from previous click on ok.
Step4: Drag sales to existing axes.

Step5: Drag measure values from columns to text, measure names to columns.

PERCENT DIFFERENCE FROM:

 If you want to display difference in terms of % then we have to make use of %difference from.
 It is the effective way to representing the growth of any business effectively
TASK: Design a view to display the growth of the business on the different year for each quarter based
on dept in the form of text table and displays the sales and difference in same pane in terms of %.

Step1: Drag the department and order date to row shelves.

Step2: Drag the Quarter and sales to columns.

Step3: Right Click on sales select and add table calculations, type as a percent diff. from along pane
down click on ok.

Step4: Drag sales to Existing axes, Measure values from columns to label.

Step5: Drag Measure Names from marks to rows shelves.

Step6: In measure value pane the sales first add sales diff. Next.

Step7: Click on text edit select the measure values and measure the size of the label click on bold.
PERCENT FROM CALCULATION:

 It is mainly used to find the absolute change of a particular item.


 It is having the similar functionality like percentage difference from.
 Whereas percentage difference from display the percentage by taking difference into
consideration whereas ‘percent from’ display the percentages by tacking a particular defined
value into consideration.

TASK: Design a view to find the absolute change of all quarter when compared with Q4 for each
department in each year in the form a text table.

Step1: Drag the order date and drop into the columns drop the departments and again order date to
rows.

Step2: Right click on order date and select quarter.

Step3: Drag the sales and drop into the columns. Right click on sales and select the table calculations
select type as percent from and calculate along pane down and display value as a percentage of last click
on apply and click on ok.
Step4: Again Drop the sales and drop into the existing axis. Drag the measure value and drag into the
text. Drag the measure name drop into columns.

PERCENT OF TOTAL CALCULATIONS:

 It takes the all values of a given field and find the total of all the values and it displays the
percentage of each item when compared with the total.

TASK: Design a view to display the department wise quarter wise total sales for each year and the
contribution of each quarter sales in the total year sales for each year in the form of a text table

STEP1: Drag the Department and quarter into the row shelve, drag the order date into column shelve.
Step2: Drag the sales and drop into the columns.

Step3: Right Click on sales and select add tables calculation select category type as percentage total
select the summarized value from pane down click on apply click on ok.

Step4: Again drag the sales and drop into the existing axes.

Step5: Drag the Measure value from columns into text.

Step6 : Drag the measure name from marks into columns.


PERCENTILE CALCULATIONS:

Percentile=(No. of values<=current value/total values)*100

 Percentile computes the percentile for the set of values.


 This percentile calculation mainly used to see how many values are falling behind the current
value.
 These percentile calculations ignore the Null values.
 For example if you want to know how many students falling behind the current student we can
use percentile.

Task: Design a view to display the continent wise total sales and sales percentiles for each year in the
form of a text table.

Step1: Drag the continent and drop into rows, drag the order date and drop into columns.

Step2: Drag the continent and drop into rows, drag the order date and drop into columns.

Step3: Right click on sales select add calculations select cat-type as percentile select the addressing
fields as table down and click on ok.

Step4: Drag the sales and drop into existing axes.

Step5: Drag the measure value from column into text.

Step6: Drag the measure names from marks into columns.


NOTE: The other way to perform the table calculation is by making use of the quick table calculation
automatically computes particular calculation in the table down way.

 If you want to change the addressing options, Right click measure and go to compute using and
select table across.

TASK: Design a view to display the continent wise year wise total sales, sales growth, sales growth
percentage, percentile, percentage contribution of one continent across the four different years in the
form of text table and single axes, Using Quick table calculations.

Step1: Drag the continent and drop into rows, Drag the order date and drop into columns.

Step2: Drag the Sales and drop into columns and right click on it, select quick table calculations and
select difference.
Step3: Again drag the sales and drop into the existing axis.

Step4: Again right click on sales in the measure values shelve and go-to quick table calculation and select
percent difference from.

Step5: Again Drag the sales and drop into the existing axis.

Step6: Again right click on sales ion measure values shelf and go-to quick table calculation and select
percent from.

Step7: Again drop the sales and drop in-to the existing axis. Again right click sales in measure values
shelve and go to quick table calculation and select percentile.

Step8: Drag the measure names from rows to columns, drag the measure values and drop into the text.

Step9:Right click on all the sales field where we perform the table calculation and select compute using
table across.
RANK CALICULATIONS:

Calculating the ranks will be 4 ways

1. Unique
2. Dense
3. Competition
4. Modified competition

UNIQUE: uniquely displays the ranks even through if the values of the particular measure or metric is
repeating.

DENSE: it allocate the distinct ranks to the measures or Metris the dense ranks will not eliminate the
next immediate rank.

COMPETITION: competition is the new way of defining ranks in tableau.

 In competition is the values of measure is distinct it displays the distinct rank.


 It is the value of measures is responding ‘n’ no. of times competition assigns the same rank to
the repeated values and for the next immediate rank , it will add for the no. of times the value is
repeating to the current rank.

Note: dense rank mainly used to display the distinct rank for distinct values.

MODIFIED COMPETITION: if the values are distinct displays the distinct ranks.

 If the values are repeating ‘n’ times it will add ‘n’ to the current rank and display the next
immediate rank.

Note1:-competition: if values are distinct, distinct ranks. If the values are repeating ‘n’ times, if allocates
same rank to the repeated ranks and add ‘n’ to the rank and displays to the current rank.
Note2:- modified competition if the vales are distinct, distinct ranks .if the values are repeating ‘n’ times
it will add ‘n’ to the current rank and display the next immediate rank.

TASK:Design a view to display the ranks for the student for the following data based on marks.

students S1 S2 S3 S4 S5 S6 S7 S8 S9 S10

marks 99 98 98 97 97 96 95 95 94 93

Step1:- connect to the text file with the above data from the tableau.

Step2:- drag the student for the row shelve and marks to the column shelve.

Step3:-right click on the marks select add table calculation select the calculation type as rank and
compute along table down and rank type as unique apply ok.

Step4:- again drag the marks and drop into column select the cal-type as rank running along table
down and the rank type as dense apply ok.

Step5:-again drags the marks to the column shelve repeat the same and select rank type as competition.

Step6:-again drags the marks to column shelve repeat the same and select the rank type as modified
competition. Drag the marks and drop into column click on abc.

Note : if the rank values are repeating, competition and modified competition are shipping the next
immediate rank.

NOTE: Competition: If values are distinct, distinct ranks. If the values are repeating ’n’ times, it allocates
same rank to the repeated ranks & add ‘n’ to the ranks & display to the current rank.

NOTE: Modified competitions : If the values are distinct, distinct ranks.

If the values are repeating ‘n’ times it will add ‘n’ to the current rank and display the next immediate
rank.

TASK: Design a view to display the ranks for the student for the following data based on marks.

Student Marks

S1 99

S2 98
S3 98

S4 97

S5 97

S6 96

S7 95

S8 95

S9 94

S10 93

Step1: connect to the files with the above data from the tableau.

Step2: Drag the students for the row-shelve and marks to the column shelve.

Step3: Right click on marks select add table calculation select the calculation type as rank and compute
along table down and rank type as UNIQUE apply ok.

Step 4: Again Drag the marks and drop into columns select category type as rank running along table
down and rank type as dense apply ok.

Step5: Again drag the marks to the columns shelves repeat the same and select the rank type as
competitions.

Step6: Again drag the marks to column shelve repeat the same and select the rank type as modified
competition. Drag the marks and drop in to columns click on ok.

NOTE: If the rank values are repeating, competition and modified competition are skipping the next
immediate rank.

TASK: Design a view to display the continent wise total sales and their distinct ranks (Dense Rank)

Step1: Drag the continent and drop into columns.

Step2: Drag the Sales and drop into Columns.

Step3: Right Click on the sales and select add tables calculations and select the calculation type as rank
and select the rank type as Dense rank and click on ok.

Step4: Drag the sales and drop into existing axis.

Step 5: Drag the measure values to label and drag the measure names and drop into the columns.
Task: Design a view to display the continent wise , country wise, Discrete Ranks. If the user selects any
continent, it should be Display only the countries Under that Continent.

Step1: Drag the continent and country to rows, Drag the sales to columns.

Step2: Right click on the sales select add table calculation select dense Rank.

Step3: Create a parameter with name parameter continents with type string and add all the continent
name to the parameter by taking the allowable volume as list click click on ok.

Step4: Drag the continent and drop the filters drag the country to filters ,Right Click on that, select add
to context filter.

Step5: Again right click on continent and in general tab use all in the condition in formula click on edit in
the formula tab write continent=parameter-continent apply ok.

Step6: Drag the country to color.

RUNNING TOTAL:

 In TABLEAU running totals are only used to perform the cumulative calculating, Cumulative
calculating means adding all the Previous values to the current values.
NOTE: In running total based on the result of the 1st calculation again we can perform the secondary
calculation.
MOVING CALCULATIONS:

Moving, continuous data

 Here the values are very dynamic(changing time to time)

Eg: stock market ‘A’ changes…..4hrs(20times)

 Here averages calculated based on previous values and next values.

Eg: Securities data, financial data.

 Moving calculations are mainly used to smoothen the short term fluctuations on the securities
data in order to analyze the long-term trends.
 While performing the moving calculation, this moving calculations takes previous, next values
and also current values takes consideration in order to calculate the stabilized values.
 Normally these moving calculations are performed on the security data and stocked data.
 Normally in the stock market there are main fluctuations every day on the data, so it’s really
hard to find the stabilized value normally we will take the aggregation as average in the moving
calculations and also these moving calculations are performed on data which is moving
continuously (or) on the continues data.

Task: Design a view to display the year wise stabilized discount.

Step1: Drag the order date and drop into the rows and drag the discount and drop into columns.

Step2: Right Click on the order date and select continuous.

Step3: Right click on discount select add table calculation and select cat-type as moving calculations and
select aggregation average and previous value as 3 and next value as 3 and select include current value
click on ok.

TASK: Design a view to display the date wise average discounts based on 3previous values and next 3
values by taking exact date into consideration.

Step1:Drag the order date and drop into columns and drag the discount and drop into rows.

Step2: Right click on order date and select exact date.

Step3: Right Click on Discount select add table calculations and select cell type as moving calculations
and moving along table across aggregation value as average previous as 3 next 3 and check current
value and check null if there are not enough values click on apply and click on ok.
NOTE: Without writing formula directly from the data view we can perform the quick table calculations.

NOTE: Even in the moving calculation also we can add a secondary calculation.

NOTE: After adding the table calculation if you want to remove the table calculation from field right click
on that field and select clear table calculations.

Performing Table Calculations Manually:

 In tableau another way to perform table calculations by writing the formulas manually.

Table Calculation Functions:

1) FIRST () Function: The FIRST () Function displays no. of rows required to go to the 1 st place (or) 1st
row from the current locations.
2) LAST () Function: The LAST () function displays no. of rows required to go-to the last row (or) last p-
lace from the current location.
3) INDEX () Function: INDEX () will simply display the row number in the table in the TABLEAU.
4) RANKING Function: In TABLEAU the other way to find the ranks is by writing the ranking functions
manually.
 The different ranking functions available i.e

i) RANK
ii)RANK-DENSE
iii)RANK-MODIFIED
iv) RANK-UNIQUE.

i) RANK Function: The RANK function is used to find the completion rank in the tableau.
Syntax: RANK(Expression,[sorting])
ii) RANK-DENSE Functions: It is mainly used to find the Dense ranks (or) distinct rank in the
TABLEAU.
Syntax: RANK(Expression,[sorting])
iii) RANK-MODIFIED Functions: It is mainly used to find the modified ranks in TABLEAU.
Syntax: RANK (Expression,[sorting])
Sorting can either ascending or descending

iv)RANK-UNIQUE Functions: It is Mainly used to find the Unique ranks in TABLEAU.

SYNTAX: RANK(Expression,[sorting])

Sorting can either ascending or descending

TASK: Design a view to compute the competitive ranks and sales ranks manually and sort the data
manually using the function.

Step1: Drag the continent and drop into the rows drag sales and drop into columns.

Step2: Create a calculated field with name sales rank and in the formula

RANK(SUM([Sales]),’asc’) click on ok.

Step 3: Drag the sales rank and drop into columns click on abc.It will automatically displays Rank in
ascending order.

4)RANK-Percentile functions: It is Used to compute the percentile manually in the TABLEAU

SYNTAX: RANK-PERCENTILE(Expression,[sorting])

Sorting can ascending or descending

TASK: Design a view to display the continent wise sales and their percentiles and sort their percentile
manually.

STEP1: Drag the continent to row shelve

STEP2: Create a calculated field with name RANK-PERCENTILE in formula tab write

RANK-PERCENTILE (SUM([Sales]),’asc’) click on ok

Step 3: Drag the Rank-PERCENTILE to rows and Right click on that field go to default properties and
select percent and click on ok.

5)RUNNING Function: In TABLEAU the running function are used to perform running calculation
manually.

 The different running calculation functions are


1) Running average
2) Running maximum
3) Running minimum
4) Running sum

1) Running Average: It performs the Cumulative average of the input expression.

Syntax:-

Running-AVG(input-expression)

i. Running sum:- it perform the cumulative summing of the input expression

Syntax:-

running –sum(input expression)

ii. Running min and running max :-it performs the cumulative computation of minimum values
and the maximum value in the input expression

Syntax:-

Running- max(input-expression)

Running- min(input-expression)

Task: Design a view to perform the running averages of the country wise sales manually and on the
output perform a secondary rank calculation manually.

Step 1: Drag the country drop into row .create a calculated field with name ‘rank of running avg’in
formula tab

Rank(running-AVG(AVG([sales]))) click on ok.

Step2: Drag the rank of AVG into columns and country into the color.

Step 3: Drag the rank of AVG and drop in size in order to display the rank based on the bars.

Step 4: Click on drop down in size window and select edit size and select size very as range click on
reversed click on apply and click on ok.

TASK: Above Task in maps.

Step 1: Click on country geographical field drag the rank and drop into the label and again drag the rank
select edit size and select the size vary as by range and click on reversed click on apply click on ok.

Step2: Drag the country drop into color.

NOTE: On the running calculations again we can take one more running calculation as the secondary
calculation.
6) LOOKUP() Functions: OFFSET indicates Starting and Ending positions.

 LOOKUP function is displays the expression based on the offset.


 Offset indicates the number of rows from the current row.

Syntax: LOOKUP (expretition,[offset])

 This offset is optional.


 If the offset is not mentioned then look up doesn’t take any values.

Task: Design a view to display the current year sales and the next year sales in the same sheet.

Step 1:Drag the year and drop into row shelve and drag sales and drop into columns.

Step 2:create the calculated field with name ‘look up’ and in formula tab write

Lookup (sum([sales]),1)

click on ok.

Step3:Drag the look up and drop into the columns.

Step 4:Drag the order date and drop into color and click abc.

Task: Design a view to perform year wise total sales and display the difference from 2012 sales.

Step 1:Drag the order date and drop into the columns and drag the sales and drop into rows.

Step 2; Create a calculated field with names ‘comparing the sales with 2012’ and in the formula tab

(sum([sales]))-Lookup(zn(sum([sales])),LAST()-1)

click on ok.
Step 3:Drag the ‘comparing sales with 2012’field into row shelve click on abc.

NOTE: Percentage difference=(current month-Previous month sales)*100

Hear we have take last(-6)((or)first(5)for june sales.

k-means analysis means based on the value we will compare the other value.

Task: Design a view display the month wise sales and compare all month sales with JUNE.

Step1: Drag the order date and drop into columns and drag the sales and drop into rows.

Step2: Right click on order date and select month.

Step3: Create calculate field with name comparing all month sales with June sales and in formula tab
write as

Step 4: Drag the ‘comparing all month sales with June sales field to row shelve.

Step 5: Drag the month and drop into color. click on ‘abc’.

7. SIZE() Function: Size function displays total number of sales we are having in superstore.

Step 1:Drag the customer name and drop into rows.

Step2 :Create a calculated field with name size and formula tab write SIZE() click on ok.

Step 3:Drag the size into columns.

8. TOTAL () Function: Total function returns total of the input expression.

SYNTAX:TOTAL(Input expression).

Task:-Design a view display the state wise total sales.

Step 1:Drag the state and drop into rows.

Step 2:Create the calculated field with name ’total sales’ and in formula tab write TOTAL(sum[sales])).

Click on ok.

Step 3:Drag the total sales drop into columns.

Task:- Design a view to compare the 2013 sales with all other sales.

Step 1: Drag the year and drop into column.

Step 2: Create a calculated field with name “comparing the 2013 sales” and in formula tab write.

Step 3: Drag the ‘comparing 2013 sales’ field into rows click on abc.
9. WINDOW FUNCTION:

Product sales diagram:

 If you want to take only the three values average continuously then we are the windows
functions.
 In TABLEAU by making use of window functions we can display the values based on the starting
position and ending position.
 The different types of window functions available are
1)WINDOW –AVG
2) WINDOW-SUM
3) WINDOW-PERCENTILE
4) WINDOW-STANDARD DEVEATION
5) WINDOW-VARIANCE
6) WINDOW-MAXIMUM
7) WINDOW-MINIMUM

SYNTEX:- WINDOW-Function(EXPRESSION.[START],[END])

Eg: WINDOW-sum(sales,0,2)

Eg: Product of sales . WINDOW-sum(sales,0,2)

Task:-Design a view to display the year wise total sales and the total of current year with the next two
years, average of current year with next two years, MIN of current year with next two years and MAX
of

Current year with next two years based on sales in separate fields.

Step 1: Drag the order date to rows and Drag the sales to columns.

Step 2: Create a calculated field with name windows sum and in formula tab write

WINDOW-sum(sum([sales]),0,2) Click on ok.

Step 3:create a calculate field with name WINDOW-avg(sum([sales]),0,2)

Step 4: create a calculate field with name WINDOW-minimum and in formula tab write

WINDOW-MIN(sum([sales]),0,2)

Step 5: create a calculated field with name WINDOW –max ansd formula tab write

WINDOW-MAX(sum([sales]),0,2)

Step 6:Drag all the window functions and drop into the existing axis.
NOTE: In the window function if you omit the starting and ending then it will take from first value to the
last value

Standard Deviation: Square root of variance is called as standard deviation .

Standard deviation= Formula

STANDARD DEVIATION AND VARIENCE: In probability and statistics standard deviation it measure the
amount of variation the values are having when compared with the average

 Standard deviation is simply the square root of variance


VARIANCE:-(x-x) FORMULA

Hear x --->indicates each observation values


Lambda (symbol)----->mean of all the values
N---->Indicates total no .of observations

Standard Deviation: Main o WINDOW-STDEV(sum([sales])) click on ok.

how the values are spared out when compared with mean.

 Standard deviation and variance are very useful while performing the statistical analysis.

Task: Implementing standard deviation and variance in TABLEAU display the year wise sales and
standard deviation along with variance.

Step 1:Drag sales and drop into the columns drag order to rows.

Step 2:Create a calculated filed with name ' standard deviation sales and in formula tab write

WINDOW-STDEV(sum([sales])) click on ok.

Step 3: Create another calculated filed with name 'variance' and in formula tab write

WINDOW-VAR(sum([sales])) click on ok.

Step 4:Drag the two calculated filed standard deviation sales and variance into column shleve.clock on
abc.

Steps to find Variance and Standard deviation:

Step 1: Find the mean of all the observations.

Step 2: Find the difference between each observation and mean value

Step 3: square the difference and performing summation of all the values

Step 4:Devide the summed value with no. of observations.


Step 5:find the square root of the values

Note:- in the tableau we cannot combine two aggregation functions but we can combine one window
aggregation function with another normal aggregation function.

For example :- window-sum (avg([sales])) ----- valid

Sum(avg([sales]) ----------------- not valid.

TASK:- DESIGN A VIEW to display the year wise department wise total profits and average profit of all
the departments in each year and compare which department profit of all the 3departments every
year.

Step1:- drag the department and drop into rows drag the profit and drop into the columns

Step2:- drag the order and drop into rows.

Step3:- create one more calculated field with name ‘window-avg’ and in the formula tab.

Window_avg(sum([profit]),0,2)

Step4:- create one more calculated field with name ‘profitKPI’ and compare sum([profit]) is more than
window average.

Formula:- sum([profit])> window_avg (sum([profit]),0,2) click on apply on ok.

Step5:- drag the ‘profit –KPI’ and drop into color.


TASK:-(v.v.v.imp) Design a view to display the continent wise year wise total sales and indicate the
continents whose sale more than 500000 in green tick and the continents whose sale less than 5
lakes in red cross.

Step1:-drag the continent and drop into rows, drag the order date and drop into column.

Step2:- drag the sales and drop into the label.

Step3:- create a calculated field with name sales KPI and in the formula

Sum([sales])>500000 click on ok.

Step4:-in the card select shape drag the sales kpi and drop into shape.
Step5:-click on shape in the marks card in the shape palate select kpi and check dreen tric for true and
select red cross for false and click on apply and click on ok.

Step6:-click on the label and uncheck show mark labels.

Step7:- in the total bar select entire view.


Note:- these kind of report s are called as kpi reports or score cards.

Ytd :----- year to current date ------ yoy growth

Mtd :---- month to current date ------mom growth

8A.YTD-MTD
YTD & MTD

The relative date filter enables flexible analysis of time periods. Sometimes, however, you might want to
see both year-to-date (YTD) and month-to-date (MTD) values for a particular measure on the same view.
To accomplish this task, you can create date calculations.

Create calculated fields for YTD and MTD sales

Step 1

Select Analysis > Create Calculated Field.

Step 2

In the Calculated Field dialog box, complete the following steps.

1. For Name, type YTD Sales.


2. In the Formula box, type the formula below.
3. When finished, click OK.

IF [Order Date] <=TODAY() AND DATEDIFF('year',[Order Date],Today())= 0 THEN [Sales] END


Step 3

In the Measures pane, right-click the YTD Sales calculation, and then select Duplicate.

Step 4

Right-click the new copy of the field, select Edit, and make the following changes to the calculation:

1. For Name, type MTD Sales.


2. In the Formula box, change instances of year to month.
3. When finished, click OK.

IF [Order Date] <=TODAY() AND DATEDIFF('month',[Order Date],Today())= 0 THEN [Sales] END

Step 5

From the Measures pane, drag YTD Sales to the Columns shelf.

Step 6

From the Measures pane, drag MTD Sales to the YTD Sales axis, and when you see an icon with a double horizontal
ruler, release the mouse button.
This shows the two measures on the same axis:

Alternate Search Terms:year-to-date, month-to-date, calculation,

9.Sorting
Sorting: Display your data in ascending or descending order based on other fields or custom formulas
using computed sorts. in tableau sorting a data means arranging dimension members in a specified
order. tableau supports computed sorting and manual sorting

In the computed sorting we can sort the data in four different ways

1.Data source Order: in the data source order TABLEAU will sort the data according to the data in the
data sources.

2.Alphabetical order: In this order TABLEAU will sort based on first character of the value .It will not sort
the data.

3.Field:Even using the field also it will sort the data based on some condition

4.Manual:In the manual way we can sort the data according to our way
Task: Perform the computed sorting on the state wise sales and sort the states in all possible available
ways

Step1:Drag the state to the rows and sales to the columns

Step2:Drag the state to the colour legend

Step3:Right click on state and select sort order either ascending or descending and select sort by either
data source or alphabetical order or field or in manual way click on apply and then click on ok

Note: Tableau order the data according to the data source by default

Note: even we can sort the data from the axis or from the headers

Note: From the toolbar also we can sort the data either ascending or descending

Task: Perform the computed sorting year wise, category wise total average discounts and sort the
data based on each category

Step1:Drag the category to the row shelf and order date to the columns

Step2:Drag the discounts to the label

Step3:Right click on category and select sort and select sort by field discount average and sort order as
descending click on apply ok
Step4:click on analysis and click on go to tab and click show rows grand total
Manual Sorting: The second way of arranging the data in an order is in the manual way.In the manual
way we need to arrange the data values in our own order.This type of sorting is helpful if you want to
arrange the data in some specific order.

Task: Manually sort the region wise sales by arranging west region to the top and central region at the
bottom.

Step1:Drag the continent to the row and sale to the column shelf

Step2:drag the continent to the colour legend

Step3:Manually select the south america and drop into the first place

Step4:click on ok
Aliases: In tableau we can create the alias names to the field values .Aliases can be created only for the
dimensions. alias is nothing but an alternate name.

Task: Design a view in such a way that display South America as SA and north America as NA

Step1:Right click on continent go to default properties and select alias and enter south for south region
and similarly edit all the regions and click on apply ok

Step2:Drag the continent to the row shelf and sales to the column shelf
Note: We can't create the aliases for the measures

Note: We can able to create the aliases for the sets

Note: we can do the nested sorting in tableau

10.Grouping
Grouping: In tableau if you want to organize the data at higher level we need to combine the data at the
higher level in order to store all the similar objects at one place.

 A group is a combination of all the similar dimensions members and measures that make higher
level categories
 In tableau the groups can be created in multiple ways directly from the data view ,by selecting
marks in the data view
 In a single data view we can create multiple groups and that field will get added in the data
window separately or in other words if we create any group automatically a new field get add in
the data window
 on the newly created group field we can't perform any calculation
Task: Create a group from the data view. Display groups in data view, group all the office related
categories in one group and documented related categories in to the document group and the
computer related categories into the computer group.

Step 1:Drag the categories to the row,sales to columan shelve.

Step 2:Select all the office categories in the toolbar select group members.

Step3 :Select all the document categories in the toolbar select group members it will automatically
created a group.Right click on edit Alias and select enter names as document group and click onOK

Step 4:Select all the computr categories in the tool bar select group member it will automatically
created a group.Right click on created group and cick on edit alias and enter name as computer groups
and click on ok.
Step 5:Agine drag the category to the row shelle in order to see the group witch categorys belongs to
witch groups.

Task 2: Designing a group using the marks in the data view ,for the order priority wise total sales and
profits.

Step 1:Drag the profit to row and sales to column shelves.

Step 2:Drag the order priority to the level detail shelve (space under the detail and tooltip is called as
level detail shelve).select the values whose values is more than 2 lacks in tool tip select group members.

Step 3:Immidiatly after selecting the group members TABLEAU will place all the members in a group and
rest of the members in the other group.
Note: The main difference between grouping the at header level in the data view is marks will
automatically add other group and display all other members in a separate colour .While if you create a
group under header it will display all groups in same colour.

Groping the data from the data window:

In TABLEAU even we can group the data from the data window ,immediately after creating group from
the data window it will create a separate field for the particular group.

Task: group the customer names in such a way that place all the customers whose name starts with 'Z'
in one group and rest of the customer in the other group.

Step 1:Right click on customer name and select create group

Step 2:In the create group window select the first customer name starting with Z and hold your shift
button select the last customer and click on group and give group name as 'Z group'.
Step 3:Select the first customer in the list hold shift button select the customer and click on group and
give. group name as other (or) simply click include other in the button to create other group click on
apply and click on ok.
Step 4:Drag the customer name(group) to the row and customer name to the row shelve.

Note:-If we want un group all the members at time ,we have one option rest in the edit group window,
click on that reset click apply and ok.

Note:-We can able to create a group on the multiple dimensions but we can't create a set on the
multiple dimensions.

Note: IF we want to ungroup the members in the data view just select the group in the data view and
the tool tip select undo

Note: even we can move the members from one group to the other in the edit group window

Note: Even on the maps we can able to create the sets and groups

Note: We can combine a group field and normal data field into single field in the tableau
Note: Even we can combine the two groups into single group using combined field option but we are
not having any combine group option

Note: Even we can able to create a group on the measure but we cant create a set on the measure

Note: If we create any group on the measure that group will get automatically stored in the dimension

Note: even we can able to combine a measure group and dimension group using combined field option

Note: Always sets and groups contains the default properties equal into the dimension

Note: If we combine two groups it will create a new field not a new group where as if we combine two
sets it will create a new set

11.Sets
Sets: Subset of some data is called as set.

 These sets are the custom fields that stores the subset or sub part of data based on some
condition.
 A set can be based on computed condition or based on a specific data point in the data view. By
using the sets we can compare and able to perform analysis based on the subset of data.
 TABLEAU displays the sets at the bottom of the data window and labels them with a set icon.
 TABLEAU we can able to define 2 types of sets
A. Constant Sets
B. Computed Sets

A. Constant Sets :The values in the constant set won't change, Always they are static.
B. Computed Sets: The Values in the computed sets changes when the underlying data changes,
based on some condition or TOP

 Whenever if you drag any computed sets or constant sets in to the columns or row shelf's it will
be displayed in the In/Out mode..
In-->Indicates in members of the set or members which are part of the set
Out-->Indicates Out members of the set or members which are part of the set

Task: Create a constant set in TABLEAU for top5 customers based on profit

Step1:Drag Customer name to the row shelf and profit to the column shelf
Step2:click on sorting button in the tool bar in order to display the customers based on profits in
the descending order

Step3:In the data view specifically select top 5 customers and select create set
Step4:In the create set window give the set name as top5 customers and click ok

Step5:Drag the top5 customers set to the row shelf


Step6:Right click on top customers select show members in the set.it will automatically displays
the members of the set
Note1: Always sets can be created only on the dimensions. it is not possible to create a set on
the measure because measures always contains the continuous data where as dimension
contains discrete data.
Note2: Even though if we convert a measure to discrete it is not possible to create a set on the
discrete measure
Note3: if we convert a measure to dimension then we can able to create a set on the measure
Combined Sets: In TABLEAU even we can combine the sets based on single dimension in order
to compare the members in both sets. When we combine two sets it will create a new set in
four different ways

To Combine multiple sets into a new combination set,right click two sets in the data pane and
select create combined set
1.All members in both sets
2.Shared members in both sets
3.only the members which are part of the left set
4. only the members which are part of the right set

Note1:it is not possible to create a combine set on the multiple dimensions ,always combined
set can be created based on only the single dimension
Note2:we can create a combine set based on two other combined sets

Example: Sales data to determine how many customers that purchased in 2011 also purchased
in 2012

Step1:Drag the customer name field to the row shelf


Step2:Drag the order date field to the filter shelf
Step3:In the filter field dialog box select years and click next
Step4:In the filter dialog box select 2011 and click ok
Step5:Back in the view press ctrl +A to select all of the customers

Step6:Right click the selection and select create set


step7:In the create set dialog box that opens, type a name for the set. in this example we will
call the set "Customers 2011"
step8:when finished click ok
step9:right click order date on the filters shelf and select filter

step10:In the filter dialog box change the filter to only include 2012 instead of 2011 and then
click ok
step11:again press ctrl+A on your keyboard to select all of the customers
step12:in the view right click the selection and select create set
step13:in the create set dialog box that opens type a name for the set.this set will be called
Customers 2012
step14:when finished click ok
step15:in the data pane select both the Customers 2011 and Customers 2012 by holding the ctrl
key on your keyboard as you select
step16:righ click the selection and select create combined set
step17:in the create set dialog box type a name for the new set .in this example we will call the
set customers20112012
step18:make sure the correct two sets are selected in the drop down menus
step19:select the option to include shared members in both sets

step20:when finished click ok


step21:at the bottom of the workbook click the new worksheet tab
step22:in the new worksheet drag the customer name dimension to the row shelf
step23:click the customer name field menu and select measure-->count(distinct)
step24:finally from the sets area of the data pane drag customers20112012 field to the filter
shelf..

12.Bin-Migration-Diffe between bin,sets,group


Data Binning(BINS): In TABLEAU it is not possible to create a set on measures, if we want to create a set
on measure we want to create some set kind of data then we need to design a bin.

 Bins are useful to organize the values of a measure into discrete points.
 In TABLEAU Bins are create only for the relational data sources this feature is not supported for
the multidimensional data sources.
 In TABLEAU if you create a bin, it will automatically create a new dimension, this is because we
are creating.
 The different categories of data for the continuous numeric values.
 Measures are fields that typically contain numeric information, such as sales or budget figures.
When you place a measure on a shelf in Tableau Desktop, it creates an axis. However,
sometimes you might want to organize the values of a measure into discrete groups.
 For example, suppose you have a measure that holds the ages of customers ranging from 18 to
90. Rather than break a view down by every age, you may want to analyze based on age groups
(18 to 25, 26 to 33, and so on.). You can create these ranges by binning the data.
 Say you are analyzing the sales performance for a retail store. One way to look at sales is in the
form of a histogram, so you can see sales less than $500, between $500 and $1000, and so on.
To build a histogram, first you would bin the sales total values into categories.

The following exercise builds upon this idea using the Superstore sample. You can download the
attached Tableau workbook, binning_measures.twbx, to follow along.

Create Bins

Step 1

Open a new workbook and connect to the Superstore sample.

Step 2

In the Measures pane, right-click Sales) and select Create Bins.

Step 2

In the Create Bins dialog box, specify the size of the bins. In this example, type 500 in the Size of
bins text box.
Step 3

Under Range of Values, click Load to load the minimum and maximum values for the field you are
binning. This information helps you select a bin size that makes sense for your data.

Step 4

Click OK. Tableau creates a new dimension called Sales (bin).

Step 5

Drag Sales(bin) to the Rows shelf.


Notice that sales values are broken into $500 bins. Each bin label designates the lower limit (inclusive) of
the bin’s range. For example, the bin labeled $1,000 contains numbers equal to or greater than $1,000,
but less than $1,500.

Step 6

From the Measures pane, drag Sales to the Columns shelf.

Step 7

Right-click Sales on the Columns shelf and select Measure (Sum) > Count.

In the final view, each bar represents the number of transactions with sales amounts within each bin.
You can now see that most sales at this superstore are for less than $500.

Create a calculated field to further customize bins

After you examine the result of the sales bin exercise in the previous section, you might determine that
the values above $8,500 are outliers and should be grouped together. To group them, you can create a
calculated field, and then create a bin from the calculation.

Step 1
In the Measures pane, right-click the measure you are interested in (in this case, Sales) and select Create
Calculated Field.

Step 2

In the Calculated Field dialog box, complete the following steps.

1. Specify the name. This example uses Adjusted Sales.


2. In the Formula text box, build a formula to round the outliers to the value you want to use. This
example uses the following formula:

IF [Sales] >= 8500 THEN 8500


ELSE [Sales] END

3. Confirm that the status message indicates that the formula is valid, and then click OK.

Step 3

In the Measures pane, right-click Adjusted Sales and select Create Bins.

Step 4

In the Create Bins dialog box, do the following

1. For Size of bins, type 500.


2. Click Load to check that the bin size is appropriate, and then click OK.

Step 5

From the Dimensions pane, drag Adjusted Sales (bin) on top of Sales (bin) on the Rows shelf.
The diagram shows all sales that are over $8,500 at the $8,500 level.

Note: In TABLEAU always the bins are indicated with the histogram diagram.
Differences between Groups, Sets and Bins:

Groups Sets Bin

1) We can create Groups on both 1) Sets can create only on the 1) We can created bins only on
Dimensions and Measures. Dimensions. measures.

2)If we create any groups on 2)If we create any set all the 2)If we create any bin TABLEAU
Dimensions (or) Measure it will sets will get separately stored will create a new field for the
create a new field on dimensions. in the set of data window. bin in the dimensions.

3)We can’t create any calculations 3) We can create calculations 3) We can’t created calculations
of group. on sets. on Bins.

4)On group we can create a set 4)We can’t created any 4) We can create a set on the
groups and bins on sets. bin but not create group on bin.

5)In The group it is not possible to 5) In sets we can display all 5)In Bins we can see the values
see all the values(or) members. the members in the form of in lower or upper limit.
IN and OUT.

6)Groups support parameters 6)Sets support parameters 6)Bin also support parameters.

7) We can’t combine two groups 7)We can combine two sets 7)We can’t combine two bins
directly. But we can combine fields directly directly but we can combine
using that fields we can combine two bins using combine fields
two groups. options.
8)If we combine two groups the 8)If we combine two sets it 8)If we Combine two bins the
result will not be a group. It will will create a new set. result will not be a bin, it will
create a new dimension or field. create a new dimension field.

Migration : Moving the object from one environment to the another environment is called migration.

 Normally in the real time each developers will work on one work book but finally at the end of
the developer we will combine all the work books in to one final work book called as master
work book is master workbook can be migrated to he other environment and we can perform
the testing.

Designing a master workbook: The master workbook an be design a in a two levels.

i) At the workbook level.


ii) At the worksheet level.

Task1: create a master workbook at the work book level.

Step1: click on file tab and click on import work book .

Step2: select the required work book and click on ok.

Step3:Repeate the same for all other workbook again click on file click on save specify the file name as
master workbook and save the book type as TABLEAU package workbook click on save.

Task2: design the workbook at the sheet level .

Step1: Open all the source workbook and create a new target work book by clicking on file and clickinf
on new.

Step2: Copy the sheet from the source work books by right click on sheet and selecting copy sheet.

Step3: Go to the target workbook and right click on the target sheet and select the paste sheet in the
way do it for remaining sheets.

Exporting the data directly:

 There are some cases in TABLEAU where we need to export the data directly with out exporting
the workbook
 In TABLEAU data can be exported in multiple ways sub as
i) CSV files
ii) Excel files
iii) Access files (or) .mdb files
iv) Images
Task: exporting the data in the form of CSV from the TABLEAU.

Step1: Right click on the data view and select view data click on export all.

Step2:In the export data window specify the output file name and click on save.

13.Hierachies
Hierarchies: Defining one too many relationships is known as Hierarchy.

In hierarchies we frequently perform

1.Drill Down: Viewing the data from higher level to the lower level is known as drill down.

2.Drill Up: Viewing the data from Lower level to the Higher level is known as drill up.

Creating Hierarchy:

Step1:Drag the column sub category on to the category


Step2:We will get one pop window-->Give the hierarchy name-->OK

Finally Hierarchy looks like below


Drag and drop fields in the data window

Note:You can also create hierarchies by selecting multiple fields in the data window.Right click select
create hierarchy
Note: Even though if we convert any dimension to the measure then we can able to create a section the
dimension. even though here after converting a dimension to measure how we can able to create a set
means dimension contains the independent values

14.Clip Boards

Clipboard
Clipboard: Even in tableau we can analyze the data directly without creating any data connections.

 sometimes you want to pull in data from an outside source for some quick analysis. Rather than
create a whole data source and then connect in tableau, you can copy and paste the data
directly into the application.
 Tableau automatically creates a data source that you can begin analizing.when you save the
workbook, the data source is saved as a tab delimited text file into your tableau repository.
 we can create the clipboards by copying and pasting the data from various applications like ms
excel, ms word and even from the html page also.
 when we copy and paste the data into tableau. Tableau makes use of Microsoft jet engine
 Microsoft jet engine is a data base engine on which several Microsoft products have been built
 Microsoft jet engine copies the data and represents the data in tableau in the form of clipboard

Task: Implementing clipboard in tableau

Step1:Open any web browser and enter 2014 election results , open any link and copy the data.

Step2:Go to tableau click on data and select paste data it will automatically creates a clipboard

Step3:Perform the analysis by dragging the required dimension and measure to columns and rows shelf

select data-->Paste Data

select file-->save to the data source


15.DataBlending
Data Blending is the ability to bring the data from multiple data sources into one tableau view. Data
blending is when you blend data from multiple data sources on a single worksheet.the data is joined on
common dimensions.

Data Blending Rules:

1. At least one matching column should exists in both the data sources

2. At least one matching record should exist in both common columns

In data blending we are interacting with 2 types of data sources

Primary Data Source: it is the primary data source from which we are joining the data to other data
sources. Primary data source which is marked as blue colour data source.

Secondary Data Source: it is the other data source looking for common type field here we call it as
linking field. Secondary data source which is marked as orange colour data source.

Linking Field :It is reference field which is in orange colour

There are 2 types of data blending

1.Automatic Data Blending

2.Manual Data blinding

1.Automatic Data Blending:

Step1:Open a new work book and connect to sample superstore


Step2:Connect to data and connect to sample coffeechain

Click data window ,select dataEdit Relationships for customized field to link matching records will
display here
The Common field will display in orange colour..According to the requirement drag the common field
here it is state field into row and sales field of the both data sources to the column field

2. Manual Data Blending:

If the column names are not matched then we go with the manual data blending

Step1:Open a new workbook and connect to sample superstore


Step2:select dataconnect to data and connect to sample coffee chain

Step3: Click on data window, select dataedit relationships for customized field to link

In the relationship dialog box choose primary data source and secondary data source
Step4:Drag the order date field into rows and sales field of the both data source into column field.
Advantage:

 The advantage of data blending is we can combine the data from the different sources and we
can perform the analysis in a single worksheet
 In tableau adding a secondary data source or secondary connection to the worksheet is very use
full when we have the data in the multiple data sources and the data if you want to integrate
into a single analysis
 in data blending we can combine the data from the different technologies text file, db, online
data etc

16.Charts
There are 3 varieties of charts are there in tableau

1.Uni variety(Analysis with only one measure)

2.BI-Variety(Analysis with 2 measures)

3.Multi Variety(Analysis with 2 or more measures)

Tables: Tables in the tableau are great way to represent large amount of data in the smaller area.

In tableau we are having 2 types of tables

1.Text table: For the text table the minimum requirements are one or more dimension and one
or more measure
2.Highlight table: The minimum requirements for highlight tables are one or more dimension
and one measure. The highlight table highlighting the value of measure based on value change
in tableau.(Greater value will be on strong colour)
 Note: In the output view text table will displays all the measure values where as highlight table
highlights the value of a measure based on the value range in the tableau
 Note: Both the highlight table and text tables are uni variety charts
 Note: the tables are also called as cross tabs

2.Bar charts or Histograms: In tableau we are having 2 types of bar charts

A. Horizontal Bar chart

B. Vertical Bar Chart

Again the vertical bar chart is divided into two types

B1:Stacked bar chart

B2:Side by side bar chart

 Bar chart is the great way to compare the data across various categories
 in the bar chart length of each bar indicates value of the particular category
 Bar chart is the easy way to understand the different categorical information such as country,
state, region, years, months etc

A. Horizontal Bar chart: the minimum requirement for Horizontal Bar chart is zero or more dimension
and 1 or more measures
B. Vertical Bar Chart

B1:Stacked bar chart: first type of vertical bar chart is stacked bar chart. The minimum requirement for
stacked bar chart is one or more dimension and one or more measure.

B2: SIDE BY SIDE BAR CHART: The 2nd type of the vertical bar chart is side by side bar chart. The
minimum requirement for side by side bar chart is one or more dimensions and one or more measures
and also side by side bar chart requires at least 3 fields.
Note: in the horizontal bar chart each value in given category is represented with a separate bar. Where
as in stacked bar all the values of given category is represented in a single bar vertically.

 Side by side bar chart requires at least 3 fields.


 In side by side bar chart one field data is placed inside the another field (nested table) and it
represents the another inside field data value separately in each bar vertically.

Note: the horizontally bar chart and vertical bar charts are the uni-variety charts.

3.Line charts: line chart is the gateway to compare the categorical data over the period of time.It is
mainly used to analyse the trends over the period of time .

Types of line charts: We are having 3 different type of line charts

A. Continuous line chart B. Discrete line chart C. Dual line chart

(A)Continuous line chart :- it requires at least one date field, 0 or more dimension, and 1 or more
measures.
(B) discrete line chart : it require chart at least one date field ,0 or more dimension and 1 or more
measures. It requires one discrete date field.

(C) dual line:-it requires at least one date field which is of either continuous or discrete, 0 or more
dimension and 2measures.

Note:- the continuous line chart requires continuous date field where as discrete line chart requires
discrete date field dual lines requires two measures.

4.AREA CHART:- area chart in the tableau are mainly used to indicate the growth of particular category.

 Area chart is an extension of a line chart


 An Area chart shows the line of a measure how it growing and also fills the area below the line
based the value of the measure.
 Area chart are the great way to compare the growth of a particular category.

In tableau we have two types of area charts

A. Continuous area chart

B. Discrete area chart

A. Continuous area chart:-it requires one date field,0 or more dimensions and one or more measures.

2.Discrete area chart:- it requires one discrete date field , 0 or more dimensions and 1 or more
measures.

Note:-the discrete area chart and the continuous area charts are the uni-variety charts.
Note2:-discrete area chart requires discrete date field where as continuous area chart requires
continuous date field

5.CIRCLE CHART :In tableau we have two types of circle charts.

A. circle views

B. side by side circle

Circle charts are the another way to represent the categorical data in the form of circles.

(A)circle views: in order to create circle views in the tableau it requires 1 or more dimensions and 1 or
more measures

(ii)Side-by-side circles: It requires at least 1 or more dimensions and 1 or more measures


It requires at least 3 fields

Note: Both the circle views and side by side circles are Uni-Varity charts

(6)Other Uni-variety charts:

(A) Packed Bubbles: Packed bubbles is the another way to represent the each categorical data based on
their measure value

It requires at least 1 or more dimensions and 1 or 2 measures


(B) Pie chart: It is the another way to represent the data in the form of slices

Note: For the effective look of the pie chart and for the best practice don’t create a pie chart with more
than 5 slices

8. Heat Maps: The another way to represent the categorical data is heat maps. A heat map is a visual
representation of number in a table (or) in the form of grid in such a way that the bigger numbers are
encoded by dark colours (or) bigger sizes and the smaller numbers are encoded by smaller size (or) light
colours, this type of representation of data makes the readers pattern very easier, and the reader can
able to analyze the data very fast. The minimum requirements for the heat map are1 or more dimension
and 1 or 2 measures

10.Tree maps: From Tableau 8.0 the new chart added in the Tableau is Tree map.This Tree maps are not
available upto 7.0.

 Tree maps are another way to represent the number of data view by filling the portion of tree
map by thicked colour if the value is more and it fills the tree map with light colour if the value
of field is less.
 Tree map requires 1 or more dimensions and 1 or 2 measures
11.Gantt chart: Gantt view is the modified representation of the bar chart

 It is a new feature in the Tableau 8.1 in order to create a gantt view requires
 Continuous date field, 1 or more dimensions 0 or 2 measures

12.Box – and - Whisker Plots: The another new data view added from the Tableau 8 is Box – and -
Whisker Plots

 Box – and - Whisker Plots displays the distribution of the measure values for a given category in
the form of box
 Box – and - Whisker Plot is also known as Box-plot
 In order to create box and whisker we need 0 or more dimension and 1 or more measure

13.MAPS: In tableau the maps are also comes under uni variety charts
In Tableau we are having two types of maps

A. Symbol Maps:

B. Filled Maps:

Bi Varity charts: Analysis involving in the two measures in the Tableau is known as Bi-Varity charts

The different Bi-Variety charts available in Tableau are

1. Text tables
2. Heat maps
3. Pie charts
4. Symbol maps
5. Horizontal bars
6. Stacked bars
7. Side-by-side bars
8. Circle views
9. Tree maps
10. Bullet graphs
11. All Line charts
12. All Area charts
13. Combination chart
14. Packed Bubbles
15. Box and whisker plots
16. Gantt views

14. Scatter Plot and Bullet graph:

A.Scatter plot: These are oftenly used to identify and to observe the relationship between two
measures or any two variables by looking into the scatter plots any user can quickly observe the trends

 It requires atleast 0 or more dimensions and 2 to 4 measures


 The scatter plot displays the relationship in terms of small circle called scatter

B.Bullet graphs: Bullet graphs are the modified view of the bar chart

 Bullet graphs requires 0 or more dimension and 2 measures


 Bullet gaphs are also the new feature in Tableau 8.0

Multi Varity charts: Analysis involving more than two measures are known as multi variety charts

The different multi Varity charts are

1. Text tables
2. Horizontal, stacked. Side-by-side bars
3. Circle view and Side-by-side circle
4. Continuous and Discrete line charts
5. Different types of area charts
6. Scatter plot
7. Box-and-whisker plots

17.DropLines-TrendLines-Forecasting
Drop Lines

 Drop lines are most useful for distinguishing marks and calling out their position in the view. For
example, in a view that is dense with scatter marks, you can turn on drop lines to show the
position of a particular data point. When you add drop lines a line is extended from the marks to
one of the axes. You can choose to show drop lines all the time or only when a mark is selected.
Note: Drop lines do not display when you publish a view to Tableau Server or Tableau Online.
 To add drop lines to the view, right-click (control-click on Mac) the pane and select Drop Lines >
Show Drop Lines.
 By default, drop lines are set to only show when the mark is selected. You can change this
setting and specify other options in the Drop Lines dialog box.
 Right-click (Control-click on Mac) the pane and select Drop Lines > Edit Drop Lines to open the
Drop Lines dialog box.
 In the Drop Lines dialog box select an axis to draw the line to, whether to always show the drop
lines, and whether to show labels.

For Example:

- Apply Drop Lines on below Pareto chart view.


- Right click on view->Select Drop Lines->click on show drop lines.

- click on any bar it showing look like below image.


Trend Lines

Trend lines, also known as best fit lines, are computed lines that predict data trends. Follow the
instructions below to learn how to add trend lines to your view.

1 Add a Trend Line

From the Analytics pane, drag the Trend Line model to the view and drop it on a model type.
You can select one of the following model types to add to the view.

To remove a trend line, drag the trend line off the view, or select it in the view and click Remove.

2 Exclude Fields from the Trend Line

To edit a trend line, click it and select Edit. In the Trend Lines Options dialog box, if the trend is
considering multiple factors, you can clear any dimensions that you don’t want to include as factors in
the trend line model.
3 Specify Additional Options

Another option in the Edit Trend Lines dialog box is Allow a trend line per color. When you have color
encoding in your view, you can use this option to add a single trend line that models all of the data and
ignores the encoding.
By default, trend lines are shown with upper and lower 95% confidence lines. In a view with multiple
trend lines, these confidence lines can make the view "noisy" and difficult to read. If this is the case,
clear the Show Confidence Bands option.

4 Describe the Trend Line

After you add trend lines, you can use the Describe feature to display statistics on the trend line. For
example, you can see the formula as well as r-squared and p values. To view a description of a single
trend line, right-click the trend line in the view and selectDescribe Trend Line.
To view a description of the entire trend line model, select Analysis >Describe Trend Model.

Adding Trend Lines

When you add trend lines to the view, you can specify how you want them to look and behave.

Add Trend Lines to the View

1. Select Analysis > Trend Lines > Show Trend Lines, or right-click (Control-click on a Mac) on the
pane and choose Trend Lines > Show Trend Lines.

This command adds a linear trend line for each page, pane, and color on the worksheet. You can
continue with the steps below to configure trend lines.

You can also drag a trend line in from the Analytics pane. See Analytics Pane.

2. Select Analysis > Trend Lines > Edit Trend Lines, or right-click on the pane and choose Trend
Lines > Edit Trend Lines to open the Trend Lines Options dialog box.

a. Select either a Linear, Logarithmic, Exponential, or Polynomial model type.

b. For trend models that are considering multiple fields, you can eliminate specific fields
you want to exclude as factors in the trend line model. For example, on a view of sales
across categories and regions, you may want to see the overall sales trend across all
categories, rather than a different line for each region. In this case, you would
exclude Region as a factor:
For more information on excluding factors, see Removing Factors from the Model.

c. Decide whether to exclude color, using the Allow a trend line per color option. When
you have color encodings in your view, you can use this option to add a single trend line
that models all of the data, ignoring the color encoding.

d. Decide whether to Show Confidence Bands. Tableau confidence bands show upper and
lower 95% confidence lines by default when you add trend lines. Confidence lines are
not supported for Exponential models.

e. Select whether to Force the y-intercept to zero. This option is useful when you know
that you want your trend line to begin at zero. This option is available only when both
the Rows shelf and the Columns shelf contain a continuous field, as with a scatterplot.

3. When finished, click OK.

When Can't You Add Trend Lines?

To add trend lines to a view, both axes must contain a field that can be interpreted as a number. For
example, you cannot add a trend line to a view that has the Product Category dimension, which contains
strings, on the Columns shelf and the Profit measure on the Rows shelf. However, you can add a trend
line to a view of sales over time because both sales and time can be interpreted as numeric values.

For multidimensional data sources, the date hierarchies actually contain strings rather than numbers.
Therefore, trend lines are not allowed. Additionally, the ‘m/d/yy’ and ‘mmmmyyyy’ date formats on all
data sources do not allow trend lines.
If you have trend lines turned on and you modify the view in a way where trend lines are not allowed,
the trend lines do not show. When you change the view back to a state that allows trend lines, they
reappear.

Tableau automatically stacks bar marks in many cases. However, trend lines cannot be turned on for
stacked bars. You can turn off stacked marks by clearing the Analysis > Stack Marks option.

Removing Trend Lines

The easiest way to remove a trend line from a view is just to drag it off. You can also click a trend line
and select Remove.

To remove all trend lines from the view, choose Analysis > Trend Lines > Show Trend Lines to remove
the check mark, or right-click (Control-click on a Mac) the pane and choose Trend Lines > Show Trend
Lines to remove the check mark.

Trend line options are retained for the next time you turn on trend lines. However, if you close the
workbook with trend lines turned off, trend line options revert to defaults.

Forecasting:

 You can forecast quantitative time series data using exponential smoothing models in Tableau
Desktop. With exponential smoothing, recent observations are given relatively more weight
than older observations.
 These models capture the evolving trend or seasonality of your data and extrapolate them into
the feature. Forecasting is fully automatic, yet configurable. Many forecast results can become
field in your visualization.
 To turn forecasting on, there must be at least one data and one measure in the view. Chose
Analysis>Forecast>Show Forecast.

The forecasted future values for the measure are now show in the view next to the actual historical
values.

Forecasting Constraints:

 Forecasting is not supported for multidimensional data sources. In Tableau, Multidimensional


data sources are supported only in windows.

In addition , the view cannot contain any of the following:


a)Table Calculations.

b) Disaggregated Measures.

c) Percent Calculations.

d) Grand totals or sub totals.

e) Date values with aggregation set to Exact Date.

Quick Start: Forecasting

Forecasting is a calculation that predicts future trends based on current trends and data. Follow the
Steps below to add a forecast to your view.

1. Build the view: Build a view that show a measure over time. The date or time field can be
discrete or continuous. For example, the view below show sales by month and Year.
2) Add a Forecast to the view: To add a forecast to the view, drag Forecast from the Analytics pane and
drop it on Forecast in the view. The time axis is extended and estimated values are shown.
You can also add a forecast to view by selecting Analysis>Forecast>Show forecast.

3. Change the Forecast options:

You can modify the forecast option by selecting Analysis>Forecast>Forecast options. In the forecast
options dialog box, you can specify how far into the future to estimate, the date part that the forecast is
based on, and the forecasting model to use.
4.View forecast Details:

To view the forecast model and the parameters used to create the forecast,

Select analysis> forecast> describe forecast.


To create a Forecast.

Forecasting required to view that uses at least one date diminution and one measure. For example

 The field you want to forecast is on the Rows shelf and continuous date field is on the
column shelf.
 The field you want to forecast is on the column shelf and a continuous date field is on the
Rows shelf.
 The field you want to forecast on either the Rows or columns shelf and discrete dates are
on either the Rows or columns shelf. At least one of the include date levels must be year.
 The field you want to forecast is on the marks card, and a continuous date or discrete date
set is on Rows, columns or marks.

To turn forecasting on, either right click on the visualization and chose Forecast> show forecast, or
chose Analysis> Forecast> Show Forecast.

With forecasting on, Tableau visualizes estimates future values of the measure, in additional to actual
historical values. The estimated values are shown by default in a lighter shade of the color used for the
historical data.

Prediction Intervals:

 The shaded area in the image above shows the 95% prediction interval for the forecast. That is ,
the model has determined that there is 95% like hood that the values of sales will be within the
shaded area for the forecast period.
 You can configure the confidential level percentile for the prediction bands, and whether
prediction bands are include in the forecast, using the show prediction intervals setting in the
forecast options dialog box.

Clear the check box if you do not want to display predictions bands in forecast. To set the prediction
interval, select one of the values or enter a custom value. The lower the percentile you set for the
confidence level, the narrower the prediction bands will be.

How you prediction intervals are displayed depends on the mark type of your forecasted marks.

Forecast Mark Type Prediction Intervals displaying using

Line Bands

Shape, Square, Circle, Bar or pie Whiskers

In the following example, forecast data is indicated by lighter Shaded circles, and the prediction intervals
are indicated by line ending in whiskers.
Enhancing Forecasts:

For each forecast value, consider verifying the quality or precision of your forecast by dragging another
instance of the forecast measure from the Data pane to the Details shelf on the Marks card and then
after right clicking the field to open the content menu, choosing one of the available options:

For description of the these options, see forecast filled results.

You can repeater the process to add additional result types for each forecast value. See changing the
forecast result type in forecast field results for information on changing the result type.

By adding such result types to the details shelf, you add information about the forecast to tooltip for all
marks that are based on forecasted data.
18.Dash Borads
A dashboard is a collection of several worksheets and supporting information shown in a single place so
you can compare and monitor a variety of data simultaneously.

Dashboard Objects:

1.Image: You can add static image files to the dashboard. For Example you may want to add logo or
descriptive diagram.

2.Blank: The blank objects lets you add blank areas to your dashboard so you can get the layout just
right..

3.Text: The text objects allows you add a block of text to the dashboard. This is useful for adding
captions ,descriptions, and even copyright information

4.Web Page: The web page objects allow you to embed a web page into your dashboard so you can
combine your tableau content with information from other applications.

New Objects:

1.Tiled:Occupying the entire space of dashboard..sheets can’t be overlapped

2.Floating:will not be Occupy the entire space of dashboard..sheets can be overlapped

Note1:When ever if you modify any worksheet and if you are using the work sheet in the dashboard the
dash board will get automatically updated.

Note2:Even if we modify the worksheet at the dash board level it will automatically reflected in the
worksheet level

Note3:if you want to change visualization in the dashboard select the existed worksheet click on show
me and select required visualization.

Note1:6 to 8 sheets in a dash board for best practices

Note2: We can’t Filter Parameter

Scenario: I have 3 sheets when I select sheet 1 from dropdown corresponding report to be displayed..

when I select sheet 2 from dropdown corresponding report to be displayed. when I select sheet 3
from dropdown corresponding report to be displayed…
Sheet1:

Sheet2:

Sheet3:
Go to sheet1 Create Parameter

In the parameter add all the sheets including all


Create calculated field..AnalysisCreate Calculated fieldGive parametyer name alone
Goto Sheet1Drag calculated field onto filterAdd Sheet1 and all from list

Goto Sheet2Drag calculated field onto filterAdd Sheet2 and all from list
Goto Sheet3Drag calculated field onto filterAdd Sheet3 and all from list

Right Click on parameter and select show parameter control


Scenario: I want to display country wise sales and state wise sales in maps..When we select India
corresponding states sales to be displayed

Sheet1:

Double click on country.. drag sales onto label..drag country onto label..
Shee21:

Double click on states..drag sales onto label..

Go to dashboard
Selecting Reports from INDEX Dashboard:

Sheet1AnalysisCreate calculated field


In the calculated field enter the below formulae
Drag and drop calculated field button onto rows
Go to marksShapes
Create sheet2 with following details
Go to dash board 1
Go to dash board2
Dashboard1
Now if you click on dashboard 1 then we navigate to dash board2 this is called as index dash board
Scenario: If we select year in a dash board corresponding data has to be displayed..

Create sheet1

Create Sheet2
Create sheet3

Go to sheet1Create Quick filter


Go to dashboard add all sheets
Now if we select year corresponding data will be displayed

NOTE: If you want to performing floating at worksheet level click on the specific worksheet uncheck
floating at the bottom.

NOTE: If you want to perform floating at dashboard level above to the layout container click on
floating.

DASHBOARD SIZE: In TABLEAU we can control the size of dashboard using width and height which
appears at the bottom.

 In TABLEAU we having 4 options for dashboard size.


1) Automatic
2) Exactly
3) Range
4) Prevailed sizes.

AUTOMATIC: In This automatic TABLEAU automatically resize the dashboard to fit the workshhet in the
window.

Exactly: In the Exactly dashboard always remains a in the fixed size. If you having more number of
sheets in dashboard we have scroll button.

RANGE: In this the dashboard displays between max and min size.
PREVALID SIZE: In this the list of prevailed size are available the desktop, etc.....

 Based on own screen fitting we can select the sizes.

NOTE: If you duplicate worksheet at the worksheet level it won’t reflect at the dashboard level.

NOTE 2: If you hide a worksheet which is part of dashboard that work sheet will not be hided in the
dashboard level.

NOTE 3: We cannot delete worksheet which is part of dash board , but we can able to hide the sheets.

NOTE 4: If you want unhide a sheet right click on the sheet which appears in the dashboard window and
unselect hide sheet.

19.Stories
Stories:

 A story is a sheet that contains a sequence of worksheets or dashboards that work


together to convey information. You can create stories to show how facts are
connected, provide context, demonstrate how decisions relate to outcomes, or simply
make a compelling case.
 A story is a sheet, so the methods you use to create, name, and otherwise manage
worksheets and dashboards apply to stories.
 At the same time, a story is also a collection of sheets, arranged in a sequence. Each
individual sheet in a story is called a story point.
 Tableau stories are not collections of static screen captures

for example, by publishing a workbook to Tableau Server or Tableau Online—users can interact
with the story to reveal new findings or ask new questions of the data.
There are many different ways to use stories. For example:
 Use stories for collaborative analysis: You can use stories to assemble a sequenced
analysis, for yourself or for collaboration with your colleagues. Visualize the effects of
data changes over time, or perform what-if analysis.
 Use stories as presentation tools: You can use stories to present a narrative to an
audience. Just as dashboards provide spatial arrangements of views that work together,
stories present sequential arrangements of views or dashboards that create a narrative
flow for your audience.
There are different ways to build a story.For example, each story point in a story can be based
on a different worksheet or dashboard. Conversely, each story point can be based on a single
worksheet or dashboard, which you customize for each story point, perhaps adding more
information in each new story point. Often you will want to combine these approaches, using
new sheets for some story points, and customizing the same sheet for other story points.

Quick Start: Stories


A story is a sheet that contains a sequence of worksheets and dashboards that work together to
convey information. Use stories to make your case more compelling by showing how facts are
connected, and how decisions relate to outcomes. You can then publish your story to the web,
or present it to an audience.

Create a New Story

In a Diagramatic Way

To create a story, click the (new story) tab.


Add the First Story Point

To create the first point in your story, drag a worksheet or dashboard to the story and drop it in
the center of the view. Add a caption, and then customize your story point.

Add More Story Points to Build Your Story

To add a new story point based on a different sheet, click New Blank Point. To use the same
sheet in the next story point, clickDuplicate.
Format Your Story

To format your story, click Format > Story. In the Format Storypane, you can change the
background colors for the story and the navigator bar, and change the appearance of the story
title, the captions in the navigator, and the descriptions.
The Story Workspace

As you work on a story, you can use the following controls, elements, and features. Descriptions
are listed below.
Creating a Story

You create a story from existing worksheets and dashboards.

To create a story:
1. Click the New Story tab.
Tableau opens a new story as your starting point:

2. In the lower-left corner of the screen, choose a size for your story. Choose from one of
the predefined sizes, or set a custom size, in pixels:
Note: Choose a size with your target platform in mind, rather than on the platform on
which you are creating the story.
3. To add a title to your story, double-click Story Title to open the Edit Title dialog box. You
can type your title in the dialog box, as well as choose a font, color, and alignment.
Click Apply to view your changes.
4. Drag a sheet from the Dashboards and Worksheets area to the story, and drop it into
the center of the view:

5. Click Add a Caption to summarize the story point.


6. Customize the story point. For more information, see Customizing a Story Point.
7. Click Update above the navigator box to save your changes to the story point:
8. Add another story point. There are several way to add an additional story point:
o Click New Blank Point if you want to use a different sheet for the next story
point.

o Click Duplicate if you want to use the current story point as the starting point for
a new story point. Then customize the view or worksheet in the second story
point to make it different in some way from the original.
o Click Save as a New Point. This option only appears when you begin customizing
a story point. After you do so, the Duplicate button becomes the Save as a New
Point button. Click Save as a New Point to save your customizations as a new
story point. The original story point remains unchanged.
9. Continue adding story points until your story is complete.

Customizing a Story Point

You can customize a story point in any of the following ways:


 By selecting a range of marks
 By filtering a field in the view
 By sorting on a field in the view
 By zooming in or panning on a map
 By adding a description box
 By adding annotations
 By changing the value of a parameter in the view
 By editing a dashboard text object
 By drilling down or up in a hierarchy in the view
After you modify a story point, do one of the following:

 Click Update to save your changes.

 Click the (circular arrow) to revert the story point to its previous state.

Adding a Description
You can add descriptions to a story point. To add a description, double-click Description in
the Dashboards and Worksheets pane. You can add as many descriptions to a story point as
you want.
Note that descriptions:
 Do not attach to marks, points, or areas in the story point. You can position them
wherever you like.
 Exist only on the story point where you add them. They do not affect the underlying
sheet nor any other story point in the story.
After you add a description box, click it to select and position it. When you select a description
box, you can open the menu by clicking the drop-down arrow:
Use the commands on this drop-down menu to edit the description, format the description
text, set its floating order relative to any other description boxes it may overlap, deselect it, or
remove it from the story point.

Format a Story

You can format a story in any of the following ways.

Re-size Captions
Sometimes the text in one or more of your captions is too long to fit inside the height of the
navigator. In this case, you can re-size the captions vertically and horizontally.

1. In the navigator, select a caption.

2. Drag the border left or right to resize the caption horizontally, down to resize vertically,
or select a corner and drag diagonally to resize the caption both horizontally and
vertically.

All captions in the navigator update to the new size.


Fit a Dashboard to a Story
You can fit a dashboard to the exact size of a story. For example, if your story is exactly 800 by
600 pixels, you can shrink or expand a dashboard to fit inside that space. To fit a dashboard to a
story, in the dashboard, click the Dashboard Size drop-down menu and select the story you
want the dashboard to fit inside.

Updating a Story

You can update a story in any of the following ways.

Revising an Existing Story Point


To revise an existing story point, click it in the navigator, and then make changes. For more
information, see Customizing a Story Point. You can even replace the underlying sheet by
dragging a different sheet from the Dashboards and Worksheets area onto the story pane.

Deleting a Story Point


To delete a story point, click it in the navigator, and then click the (delete icon) just above
the box.
If you delete a story point by accident, click the Undo button to restore it.

Inserting a Story Point


To insert a new story point somewhere other than at the end of a story, add a story point, then
drag it to the desired location in the navigator and drop it.

The story point is inserted at the specified location:

Presenting a Story

To present a story, use presentation mode. To switch in and out of presentation mode, click the
Presentation Mode button on the toolbar. To exit Presentation Mode, press Esc or select
the Presentation Mode button in the bottom right corner of the view. For more information on
Presentation Mode, see Reorganizing the Workspace .
You can also publish a workbook that contains a story to Tableau Server, Tableau Online, or
save it to Tableau Public. For more information on publishing workbooks, see Publishing
Workbooks. Once you publish a story, the user can then open the story and navigate from story
point to story point, or interact with stories just as they would interact with views and
dashboards. Web users cannot, however, author stories, or permanently modify published
stories.

Here We Go With an Example 0f Story


This example shows how you can use Tableau to tell a story with data. The story described
below considers the question: Are serious earthquakes becoming more common, or is it just
that some strong earthquakes in recent years are creating that impression?
The story was built from three simple dashboards:
 A map of earthquakes recorded around the world since 2004.
 A line chart showing the number of earthquakes recorded, by year, since 1973
(timeline).
 A different version of same timeline visualization, with earthquakes broken out by
region, and with trend lines added.

Story Point 1
The first story point shows the map with all data included—all earthquakes, across the entire
planet.
Story Point 2
The second story point compresses the time frame and filters out smaller earthquakes—
everything below magnitude 7. The map pans to show the Pacific "Ring of Fire," where the
majority of the large earthquakes occurred.

Story Point 3
In story point 3, the magnitude filter is adjusted to show only "megaquakes" (megathrust
earthquakes of magnitude 8 or greater). The words work with the pictures to move the
narrative forward.
Story Points 4 and 5
Story points 4 and 5 revisit the two most deadly earthquakes in recent history: the 2004 Indian
Ocean earthquake and tsunami, and the 2001 Japanese earthquake and tsunami. You can view
them below.
The first five story points have all used the same underlying dashboard—the author is creating
a compelling visual story just by filtering the data and zooming and panning the map.
Story Point 4
Story Point 5

Story Point 6
Story point 6 uses a line chart to show that more quakes are being reported over time since
1973—a three-fold increase.
Story Point 7
Story point 7 adds two kinds of detail to the simple line chart from story point 6: it breaks out
earthquakes by region, and it adds trend lines, which reduce the variability in the data.
Specifically, the author has duplicated his original worksheet and then dragged region to color
and added a trend line. Here is what the underlying worksheet looks like:
Story Point 8
The final story point filters out weaker earthquakes and shows that what appeared to be a very
clear trend is maybe not so clear. Yes, more earthquakes have been reported in recent years,
especially in the Asia-Pacific region, but could that just be natural variation? Can we be
confident that the trend will continue into the future?
20.Pages
Pages: Pages Shelf in Tableau Desktop and Tableau Server

The Pages shelf is a powerful part of Tableau that you can use to control the display of output

Filter and Display Purposes


 One use of the Pages shelf is to control and fix the axis range across a variety of

dimension choices. In contrast to a single-value quick filter, which automatically changes

the axis range depending on the value you choose, the Pages shelf fixes the axis range

across all page elements.

 In the example view below, as you select a new page using the page icon , notice that

the axis range does not update. This can be very useful for comparative analytics. If you

want the axis range to automatically change, you can use a quick filter. Also note that

Tableau can place the current page value in the title of the view.

Print and Output Purposes

 The Pages shelf should not be used to control page breaks when printing. The Pages
shelf does not control the number of pages to print, the headers and footers of printed
pages, or other similar aspects. When printing a sheet with a dimension on the Pages
shelf, page breaks will be created between the pages that are created by the Pages shelf
based on the dimension.
 In the example view above, the dimension placed on the Pages shelf is called "Sub-
Category," which contains 17 sub-categories. When you print to PDF in Tableau
Desktop, there is a page break between each of the 17 product sub-categories.
Furthermore, when you publish the workbook to Tableau Server or Tableau Public, the
page setup options are respected in the Server view. When you choose to print to PDF,
the resulting PDF includes all 17 pages, even though the embedded view itself shows
only one page at a time.

Pages Shelf

 The Pages shelf lets you break a view into a series of pages so you can better analyze
how a specific field affects the rest of the data in a view. When you place a dimension
on the Pages shelf you are adding a new row for each member in the dimension. When
you place a measure on the Pages shelf, Tableau automatically converts the measure
into a discrete measure.
 The Pages shelf creates a set of pages, with a different view on each page. Each view is
based on a member of the field you placed on the Pages shelf. You can easily flip
through the views and compare them on a common axis, using the controls that get
added to the view when you move a field to the Pages shelf. For example, the view
below shows the Profit vs. Sales by Region for each day throughout the month.
The image below shows days 1, 2, and 3. You would have to scroll down to see other days in the
month.

Discover hidden insights and outliers.


The data for each day is displayed
as a separate page.

When you add a field to the Pages shelf, a page control is automatically added, just below
the Pages shelf:
Use this control to navigate through the pages. There are three ways to navigate through the
pages in a view:
 Jump to a specific page
 Manually advance through the pages
 Automatically advance through pages

Jump to a specific page


Select the member or value you want to view from the drop-down list to display a specific page.

Manually Advance through the pages


You can manually advance through the sequence of pages by doing any of the following:
 Use the forward and back buttons on either side of the drop-down list to navigate
through the pages one at a time.
 Use the Page Slider to quickly scroll forward and backward in the sequence of pages.
 Use any of the following keyboard shortcuts to scroll forward and backward in the
sequence of pages.

F4 Starts and stops forward playback

Shift-F4 Starts and stops backward playback

Command-period Skip forward one page

Command-comma Skip backward one page

Automatically Advance through the pages


Use the playback controls to watch a slide show of the pages in the view. You can play forward
or backward, and stop the playback at any time. You can control the speed of playback with the
speed controls in the bottom right corner of the control. The smallest bar indicates the slowest
playback speed.

Page History
Show page history using the Show History check box. With page history, marks from previous
pages are shown on the current page. Open the drop-down control for history to specify what
marks to show and when to show them.

The history drop-down control has the following options:


 Marks to show history for – select whether you want to show history for just selected
marks, highlighted marks, marks that you’ve manually selected to show history for, or all
marks. To manually show history for marks, right-click (control-click on Mac) the mark in
the view and select an option on the Page History menu.
 Length – select the number of pages to show in the history.
 Show – specify whether to show the historical marks, a line tracing through the previous
values (trails), or both.
 Marks – format the historical marks including the color and how much to fade them if
the color is set to automatic, the marks will either use the default mark color or the
color encoding on the Color shelf.
 Trails – format the lines that are drawn through the historical marks. This option is only
available if Trails is selected in the Show options.
Page trails may not display if there are multiple marks per color on a page. Make sure that the
level of detail for the view is less than or equal to the level of detail on the Pages shelf and on
the Color target. Also, trails are only supported for discrete mark types such as squares, circles,
or shapes. They are not supported when the mark type is Automatic.

Pages on Dashboards
When a dashboard contains multiple views that use the same field on the Pages shelf, you can
control all of the views with a single page control by selecting the Synchronized option. This
option is only available on the page control shown on a dashboard.

Working with Pages in Tableau

Today, we will talk about the "Pages" feature in Tableau. When you drag a field onto the
"Pages" Pane, you get a separate graph for each value in the field. You can then cycle through
the values to create a sort of slideshow on your graph. This is especially useful for showing how
your data changes through time. As usual, we will use the Superstore Sales sample data set in
Tableau.
Step 1:

• Create a Worksheet

Sales by Region

Step 2:

• Drag "Order Date" onto the "Pages" Pane

• Uncheck the "Show History" Box


Sales by Region (with Yearly Pages)

Step 3:

Keep "Order Date" In the "Pages" Pane

In the "Page" Card (top-left where you select which year you want to look at), Check the "Show
History" Box

Add Another Instance of "Order Date" to the "Columns" Pane


Sales by Region and Year (with Yearly Pages)

 Now, you can see the previous values as well. One thing we haven't touched on yet is
the ability to "Auto-Play" a set of pages. On the "Page" Card, you can click the "Play"
Button (looks like a Right-Arrow) to cause the pages to cycle through on their own. You
can alter the speed of the play by selecting on the boxes with the bars in them in the
Bottom-Right corner of the "Pages" Card.
 Also, if you click on the arrow in the Top-Right corner of the "Page" Card, you can set
whether the play will loop or not. So far, we've only been using text tables due to their
simplicity; however, these tools can do so much more. I encourage you to play around
with the "Pages" tool and see what kinds of interested visualizations you can create.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy