Tableau 9 - The Official Guide - Peck, George
Tableau 9 - The Official Guide - Peck, George
600 eee
©0008oe
60
oor 9
the official guide
e000.
CO 600000°®
ae
Gisises
eo_
george peck
+
+
++ t++tableau
Digitized by the Internet Archive
in 2022 with funding from
Kahle/Austin Foundation
https://archive.org/details/tableau9officialoO000peck :
ae girs
60 @e@
80006068
60 600 8@
66696 06
06* ee6ee
haces
<<
66 o@
oeecc
08) @)
\
Ss)KG|
|gu ide
@ 60@ @
® ee 08
ee @ @
ee @ @
eee esee
e808
8
8
. ge. ge
tableau 9
the officialguide
eee e0cece @ sece
ee 0000 008 e8
-~ @ 2@ 2000
Education
Copyright © 2016 by McGraw-Hill Education. All rights reserved. Printed in the United
States of America. Except as permitted under the Copyright Act of 1976, no part of this
publication may be reproduced or distributed in any form or by any means, or stored ina
database or retrieval system, without the prior written permission of publisher, with the
exception that the program listings may be entered, stored, and executed in a computer
system, but they may not be reproduced for publication.
All trademarks or copyrights mentioned herein are the possession of their respective
owners and McGraw-Hill Education makes no claim of ownership by the mention of
products that contain these marks.
ISBN 978-0-07-184329-4
MHID 0-07-184329-9
Information has been obtained by McGraw-Hill Education from sources believed to be reliable. However, because ofthe
possibility of human or mechanical error by our sources, McGraw-Hill Education, or others, McGraw-Hill Education does not
guarantee the accuracy, adequacy, or completeness of any information and is not responsible for any errors or omissions or the
results obtained from the use of such information.
UFFF
= é =
= : —
Gra
= ae iaine en
ee aay —
4 a
eis, Tole i
- ites Vee te
“Wi qhsiqeie ins ,
-. er ae ue pA : 8
; = oe ee gual
its. | il GS news a
>
A
»
~ S
™"
-
=<
Ky
2
= ’ 5
=e as €
~=
7 ™— .
Pie
, —_
7
: /
-
a A 7 whee ara ee
> ; + re 6 ozs 7 7
=»?
/ ; :
a -
f ;
- i
=
= = : eon
About the Author
George Peck has been involved in various IT
pursuits for over 35 years. His consulting and
training firm, The Ablaze Group (AblazeGroup.com),
recently celebrated 20 years in business. He has
trained, consulted, and developed custom software
for large and small organizations throughout the
United States, Canada, the United Kingdom, and
Puerto Rico.
George works with a variety of Business
Intelligence (BI) toolsets. In addition to being an
accredited trainer for Tableau, he consults on Tableau
and Tableau Server, as well as SAP BusinessObjects
and Alteryx products. George is the bestselling author
of nine other BI books published by McGraw-Hill,
including multiple editions of Crystal Reports:
The Complete Reference and a previous edition of
Tableau: The Official Guide.
In addition to his software endeavors, George
is a broadcaster and voice actor. His voice may be
heard on national radio, TV and web commercials,
promotions, and documentaries. He programs his
own eclectic music radio station and hosts a regular
jazz radio program on FM radio and online from
Denver, Colorado. He may be reached via e-mail
at [email protected].
bo
ia
3. ! ned
is ; a
So bag
ie 7, } aseds re
a
a
3 siay
: j "i ie Ws
lapinagoo
tio
ihealb
ng aett oe
ivertt Sane 1 » mie? wt ~y f=
:
4 — enn s-wtl aed -
7 Bg tr) PiccvhsFi\(© Apes wat|1) onlitiivg wet
oe? Jum galys = )( ome cor Can
MATad isanOM RAE)
Mads Turtnes Sow bee Lal ation eaeir
aig res
OH aren wt tile iache eel
a ecane ae +m
Contents at a Glance
Inmoductionto Tableau 9 .25...55 esse oss te asst >: s 1
BasieVisualization Design: 3.6 4..55 pacescew esse sean, - eee 13
Connecting to Data Qahsisnshcl beeGe esac ss css soe ae. see ete)
Top) Chart Types 0... shin skansavech sd vedes seek 0. see 69
iiteractine with the Viewer ..5.::520020.i0002 2525020. eee 97
Advanced Charting, Calculations, and Statistics ....................5. 18
Tableau'Maps™ 22. oi acces sce eas sce cecedes ces ss 181
Creating Dashboards and Stories: 2.4 .65..5-.¢3000:2 >. ae 215
Working with Tableau Servet” 22.0052: sa0o5 0st. + ch. a> oe 237
ON Custom Programming Tableau and Tableau Server
owW
PWN
HU
-_ ................+.. 287
=
xii Tableau 9: The Official Guide
Advanced Charting, Calculations, and Statistics ....... S09 0000 Sei LIAS
Grouping Dimensions. § ing: .rcton Rea ire er eee ee eee 123
Visual Grouping seine sacs ccc «nee te ct ee nn ee 126
saving and Reusing Sets s+: .8.atu eaes ney. See a, ene 128
Saving FiltersiaS Sets #AsHEAr Rey. Sate aed AR end ee 133
Creating Binned FieldS™ —caewncnes, Se eee ee ee 134
Calculated Fields 9.22. i :\:SURO) Sli RE WELL OR oe 136
Ad. Hoc Calculations) \<2ss<... Sek eae id 2 ee 137
The Calculation Editor
Contents Xiii
Greating Stories Gate es 02 cic nuqu cc a os oes eee eee ee ete olorcree 233
Setting Story SiZzem sm ae. s oebiteran tates see layolanemia
Cf ebeiteten 234
Adding Sheets and Dashboards ....0. 02.5 .02. 00.6.0 +2002 00: 235
Formatting: StoreSmgccas. «eee ecto tele: a eae: 236
Tableau Data Extract API pene raistSclin bis satelwietedeycie cod ey etes ecteamiey etwb)Olio eee are 303
Onpeniner LODE and (20. Pues seAnes arse e ne ee nee conan t 304
DEHN e NE OC Heid Mente es ernie gn te iret 7, err nn cee 304
Cycle Through the .CSV File and Add Rows to the TDE File ..... 305
lOSS et DEPiCm a any ania vermis oan ate een es acts in 306
Acknowledgments
() ne would think that writing a tenth book would be easier than the first. One would
think. Still, there’s an incredible amount of effort involved, including lots of help
from some very generous people.
Once again, Francois Ajenstat at Tableau was always there when I had a nagging
question or request. You do set the Tableau Software record for fast e-mail response!
Elissa Fink at Tableau provided unparalleled enthusiasm and support. Let’s hug again
soon! And, of course, thanks to Christian Chabot, Chris Stolte, and Pat Hanrahan for
coming up with a great idea and founding a wonderful company.
This is my tenth book with various incarnations of the same publisher, starting with
Osborne and progressing through McGraw-Hill Education. I clearly remember that day all
those years ago when I interrupted a voiceover session to plan my first book project with
Wendy Rinaldi. And, here we still are. Who knew how far we'd go? Thanks again to Lisa
McCoy, Paul Tyler, and Janet Walden for turning occasional incoherence into understandable
prose. Jean Bodeaux and Patty Mon were great again. And I’m looking forward to more work
with James Kussow. It was great to “meet” Howie Severson—great work!
Finally, and most importantly, I give my tenth bit of thanks to Denise. It’s got to
be special that we've been in business together for 20-plus years and married for more
than 27. As I always say, “There are no VISIBLE bruises.’
George Peck
[email protected]
August 2015
XVii
- +
Fy >
~
a bs
2
| nf
i t ) a3
yy ‘ i } \ it eo ;
= Sano re vi 4 NONeSiID
st, beuietd > ) j vy ew 1? ay! ! ome Hit / a
J ‘9 ‘ teal ridevy
Wis Ph
. ee
; j j Mirus f ity) feu) @yhtiw qt MOMIGS
p jad Th j i) ive@yrutielvie aw auvel Pia did (inetyin a aidy
lu T (iat) 3 j ivvtee ene ith) ’ bf wey yeler sigitd lortii suerte) an
‘sf - ares iy) 4) Linh@oes ppveiiny LOT Ui? & fehginangl Ow Og ai eT
tat bev a . lig te yrnlsy ; il al a Ui an eign JA Ulan nO
Lo Alii Apees i: ier Paneer wid! a shai Yast naeaalyT 4 YOO
ene gnhiRen! 1 Hath. sy awte vaio sud, bhirpctos
abot rpul ae x
SR eM ee bem lois 7
a Ls ean fae on eae
sine a)
7 so
~“
v=
Introduction
[Pest 9 is the latest version of the leading data visualization toolset that lets you
visualize virtually any kind of data. By connecting Tableau to a variety of databases
and data sources, you can answer questions about trends, exceptions, and hidden
insights as quickly as you can frame them. At first glance, Tableau appears simpler and
quicker to learn than many legacy Business Intelligence tools. And it is. Yet, there’s “a lot
under the hood” that may not be apparent at first glance. This book is your complete
resource to learn not only quick initial visualization options, but also the deeper fine
points to really maximize your use of Tableau 9.
There are several approaches you may prefer to use with Tableau 9: The Official Guide to
maximize your learning. The book is logically organized to start with more straightforward,
quick approaches to data visualization, progressing to more complex concepts as chapters
progress. If you are just starting out with Tableau, you may prefer to start with Chapter 1 and
proceed in order. If there is a particular topic or feature you want to concentrate on, simply
locate the appropriate chapter and begin reading. The index will also help you quickly hone
in on specific topics you are interested in. There’s also TableauBook.com, the companion
website that features helpful videos and finished Tableau 9 workbooks that will aid you in
learning this powerful tool (videos and companion workbooks are referenced in appropriate
chapters). TableauBook.com also includes a complete formula language reference in
PDF format that will aid you in mastering Tableau’s built-in formula language. For more
information, see the “Companion Online Content: Workbooks, Formula Language
Reference, Code Samples, and Videos” section at the end of this introduction.
Note The videos are also available for viewing or download at www.mhprofessional
.com/pecktableau9/.
Tableau Desktop:
Windows and Mac
ince version 8.2, Tableau Desktop has been released in both Windows and native
Mac OS X versions. Tableau 9 continues this direction. When you purchase a Tableau
Desktop license, you are able to use either Windows or Mac versions, as the license
key code is recognized, regardless of computer operating system. And if you own both a
Windows and Mac computer, you may install on both computers, as the Tableau license
agreement permits this.
The look, feel, and behavior of Tableau Desktop are largely identical with both
Windows and Mac versions. Drop-down menu options are virtually identical, as are
context menus and dialog boxes. The differences between Windows and Mac versions
lie in two primary areas:
XXiii
XXIV Tableau 9: The Official Guide
What Is Tableau?
Tableau Software has its roots in the Stanford University Computer Science Department,
in a Department of Defense-sponsored research project aimed at increasing people’s
ability to rapidly analyze data. Chris Stolte, a Ph.D. candidate, was researching visualization
techniques for exploring relational databases and data cubes. Stolte’s Ph.D. advisor,
Professor Pat Hanrahan, a founding member of Pixar and chief architect for Pixar’s
Tableau 9: The Official Guide
RenderMan, was the worldwide expert in the science of computer graphics. Chris, Pat, and
a team of Stanford Ph.D.s realized that computer graphics could deliver huge gains in
people’s ability to understand databases. Their invention, VizQL, brought together these
two computer science disciplines for the first time. VizQL lets people analyze data just by
building drag-and-drop pictures of what they want to see. With Christian Chabot on board
as CEO, the company was spun out of Stanford in 2003.
Although Tableau 9 improves on the previous eight major releases of the software, the
core approach to visual design remains the same: connect to a desired data source, and
drag various data fields to desired parts of the Tableau screen. The result is a simple
visualization that can then be enhanced and modified by dragging additional data fields
to different destinations in the workspace. Beyond this simple visualization approach,
Tableau’s Show Me feature allows quick choices of predefined visualizations by just
selecting relevant data fields and clicking a thumbnail. For more advanced requirements,
Tableau features a complete formula language, as well as more robust data connection
options.
There are two primary Tableau benefits you’ll want to keep in mind as you explore
the tool:
When you first start Tableau, you are presented with the Start Page. The largest portion
of the Start Page is reserved for thumbnails of recent workbooks you have used. Simply
click any one of these to open the workbook (like Microsoft Excel, Tableau’s format for
storing data on your disk drive is in a workbook, with a .twb or .twbx file extension). You
may also open sample workbooks included with Tableau by clicking the desired thumbnail
at the bottom of the Start Page.
Chapter 1: Introduction to Tableau 9
Tableau Server — aa me . = +
Microsoft SQL Server Work In Progress Regional World Indicators
MySQL
Oracle
Blog -3 Visualizations
thatMake the
Sample -Coffee Chain (csv) Avengers Even More Awesome
e Standard Tableau Workbook (.twb file) This workbook contains worksheet and
dashboard definitions only. Any data sources and external files (custom background
images, image files in dashboards, and so forth) are not saved in the .twb file. For
example, if the workbook connects to two data sources (such as a standard SQL
database server and an Excel file located in a folder on your C drive) and references
an image located on a network drive, another Tableau user who opens the
workbook will need to be able to connect to the same SQL database, will need to
have the same Excel file on their C drive, and must be able to access the anese file
located on the same network drive.
7
4 Tableau 9: The Official Guide
Note Detailed discussion of the Data Source page and data connections can be found
in Chapter 3.
Caan nrrenrnneeeeereecneeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeceerceerc ec SS
with each worksheet denoted by a tab at the bottom of the Data Analytics od
screen. As with most other standard software applications,
[) Sample - Superstore - English ...
you ll see a series of drop-down menus and a toolbar. Also,
Dimensions a= Dov
many Tableau functions can be selected from pop-up context 4 @& Customer ,
menus that will appear when you right-click with your mouse hci
(CONTROL-click with Mac). Lay
Abc routs
Customer Segment
The left side of a Tableau worksheet contains the Data pane, > gs Mapping items
which divides fields in your data source into dimensions and rs = L
measures. You'll find a blank visualization
- . . . sus,
containing a single
: 4 rect
EI Order Date
4
|
column, row, and center area, each labeled “Drop field here.” Abc Order Priority
The remainder of the worksheet consists of a series of shelves Al Ship Date
Ane Ship Mode
and cards, where you can drag fields to control certain behavior 4 & Product
and the appearance of your worksheet. far Category
4bc Container
Abc Department
Note More details on the Data pane, including how to reorganize dimensions and
measures, along with detailed discussion of various data types, are available in
Chapter 3.
dimension to the top column “Drop field here” area, or the Columns shelf. You would then
drag the sales measure to the left of the continent columns in the visualization, or the
Rows shelf.
i) Columns Continent
Rows SUM{Sales)
Continent
$10,000,000
$8,000,000
wo
~ $6,000,000
w
$4,000,000
$2,000,000
$0 ie
Africa Asia Australasia Europe North South
America America
The term shelfis unique to Tableau, and refers to a particular part of the worksheet
where you can drag and drop a field from the Data pane. The most common shelves are
Columns and Rows, as dimensions or measures dropped on these shelves determine the
basic layout of your visualization. However, other shelves are used frequently as well. The
Filters shelf will narrow down data included in the visualization based on a field that you
drag to it. The Pages shelf acts as a modified Filters shelf, allowing you to “page” through
values within a dimension or measure to quickly see changes in data.
Some parts of the workspace allow more than one function to be modified within the
same general area. These are referred to as cards (also a term particular to Tableau). In
particular, the Marks card is a single area of the workspace that allows you to customize
display of chart “marks” (bars, circles, shapes, and so forth) that make up your chart.
Chapter 1: Introduction to Tableau 9 i
The Marks card contains different parts that you can click to make Marks
basic mark changes, or where you can drag and drop fields. For
example, you can change the overall size of marks of your os E
visualization by clicking the Size icon on the Marks card and & 3 a5
dragging the slider. Or, you can drop a field onto the Size icon on the — Ne
Marks card, which will set mark size variably based on the field you Detail |‘Tooltip
dropped. You can also make basic color changes by clicking Color on
the Marks card, or change colors based on a field by dropping the & Department
field on Color. Once you've dropped fields on the Marks card, the SUM(Profit)
fields will appear below the original icons where you dropped them.
You'll be able to tell which part of the Marks card the field was
dropped on by the associated icon appearing to the field’s left.
Note It’s easy to confuse the terms “shelf” and “card” in Tableau. For example, the Pages and
Filters shelves include a “Hide Card” option on their pop-up context menus. And the
Rows and Columns shelves include both “Clear Shelf” and “Hide Card” options on their
context menus.
oO Data Source Population |Health Technology Economy G8 Tourism | 3 Business C1] Story tn #8 fo
Display objects as
tabs (the default)
Data Source
Display objects as
a filmstrip
(continued)
8 Tableau 9: The Official Guide
| | |
||
i
|
|
| |
mMMC)
P | |
| { | |
| : |
| « | | ,
| |
| - |
| heal
| Ve
|
a ee
Population
LM Health
|CRREEER
Technology
| Fane nee
Economy
= eh es 2 ee
| pre] |
|
| ee
| : Ble ee |
| | el
feet
+ OP dente, we
|
|
PE< as | |
Mee |
|| | |
Tourism Business Story Spee eT eT One re ex
Display sheet
| sorter view
Data Analytics 1p =
- —— -| Fages Columns Continent r
['%Sample - Superstore - English ...
Sanenions =p. 3= Rows SUM(Sales)}
4 &
Customer Filters
}> Continent
Abc Continent }
YEAR(Order Date): 2013
Abc Customer Name
Abc CustomerSegment | |
> && Mapping items \|W 4) Marks $4,000,000
Abc Regicn | i
«4 ®& Order — || tal Automatic ¥
fi Order Date 1a ptens
Abc Order Priority | & a fue $3,500,000
& Ship Date } |Color Size Label
Abc Ship Mode
Measures
Customer ID *| Department =
Sales
Discount |) Wl Fumiture $2,000,000
Order ID
| @ Office Supplies
Order Quantity
Product Base Margin BB Technology
Profit
Sales |
Shipping Cost _j
Unit Price $1,000,000
Latitude (generated)
Longitude (generated)
tt
Ht
at
te
@4 @
tt
Ht
@ Countries - High Profit & Sales sped
@® Top Customers by Profit
Parameters
Asia North South Europe Australasia
+ Profit Bin Size Tonk America America
+= Profit Bin Size1 ,
~
4b Tan Cructomerr
(F) Date Source Sales byContinent/Department | fi] fH 0
18 marks 1 row by6 columns SUM (Sales): $10,319,053
You may also begin this bar chart by using Tableau’s double-click options. If you initially
double-click the desired measure, it will automatically be placed on the Rows shelf. Then
the desired dimension can be double-clicked, which will place it on the Columns shelf,
resulting in the same bar chart. Note that the order in which you double-click is significant.
If you double-click the dimension first and the measure second, the result will be a text table
and not a bar chart.
The data in the sample data source spans several years. As the desire is to only include
is
products ordered in 2013, data must be filtered to include only a specific year. This
10 Tableau 9: The Official Guide
accomplished by dragging the Order Date dimension to the Filters shelf and specifying a
year date level. The resulting dialog box allows only 2013 data to be selected.
| 2010
| (2) 2011
| | © 2012
| |@ 2013 |
|
|
|
||
|
|
| |
i
| Exdude |
i
Summary
Field: [Year of Order Date]
Selected 1 of 4 values
Condition: None
Limit:
Notice that the continent bars are broken down into three different colors (this is often
referred to as a stacked bar chart). This is accomplished by dragging the Department
dimension onto Color on the Marks card. Note that this field now appears toward the
bottom of the Marks card with a corresponding icon indicating that it was dragged onto
Color. The resulting color legend appears on its own card.
To help annotate the values represented by each bar stack, the Sales measure is
dropped onto Label on the Marks card. The resulting sales amount appears on each
stacked bar. As with the Department dimension, the Sales measure is aggregated to a sum
and appears toward the bottom of the Marks card with the corresponding label icon
appearing to the left.
You may notice that the continents are not appearing in alphabetical order (which is
the default behavior when initially creating a visualization). Instead, they are appearing
in high to low order, based on sum of Sales. Although there are several ways to accomplish
this, the Sort Descending toolbar button is a quick way to sort a visualization on its
primary value.
Chapter1: Introductionto Tableau9 11
And, last but not least, don’t forget to give your worksheet a meaningful name. As with
Microsoft Excel, Tableau’s default sheet names are the word “Sheet” followed by a number.
This is hardly meaningful when dealing with a workbook containing many worksheets. Just
right-click the sheet tab at the bottom of the screen and choose Rename Sheet from the
context menu (you may also just double-click the tab and type the desired sheet name).
You may also choose to highlight the tab with a chosen color. Just right-click the tab, choose
Color from the context menu, and choose one of several colors to assign to the tab.
Tip Make sure you save Tableau workbooks early and often. Unlike some other applications,
there is no auto-save or recovery option in Tableau. If the power fails or your computer
experiences a freeze or hang and you must reboot, you will lose any unsaved work.
-_ _ ae
E
CHAPTER
Basic Visualization Design
() ne of the compelling benefits of Tableau is how easily and quickly you can visualize
your data. By providing a combination of automatic visual best practices, along
with quick shortcut approaches to visual design, you can create meaningful
Tableau visuals in literally minutes. And the more familiar you become with Tableau, the
quicker it becomes to create more sophisticated and advanced charts as well.
One of the first choices you'll make for many visualizations is which basic design
method to use. The first option, briefly introduced in Chapter 1, simply involves dragging
fields to shelves or double-clicking fields in the Data pane. The second option, Show Me,
provides a quick way of choosing from a list of predefined visualization types after selecting
desired fields in the Data pane.
Using Show Me
Any time you're editing a new or existing worksheet, you'll notice the Show Me tab at the
upper right of the screen. Clicking that tab will expand the Show Me dialog box (to close the
Show Me dialog box, just click the title bar of the dialog again). Show Me will display a
series of thumbnail images representing the different types of charts you can create with
just a few clicks. You can use Show Me anytime you want—whether you've already created
an existing visualization or not. If you've already created a chart, Show Me will replace the
existing chart with the type you choose in the Show Me dialog box (and the undo toolbar
13
14 Tableau 9: The Official Guide
button or CTRL-Z/COMMAND-Zz key combination will undo Show Me and redisplay the
original chart). If you haven’t created a chart yet, Show Me will create one for you in the
current blank worksheet.
ili, Show Me |
= 123 133 ane.
= 123 123 4 |
= 123 123 Sage |
|i
}
[Tile
| |\gu 8 La
commana1 }
owe
Although Show Me is designed to be a simple, quick way to create a chart, there are a
few fine points you'll need to know to make the best use of it:
« Depending on the number and type of fields selected, Show Me will highlight the
recommended thumbnail with a blue box (this is yet another example of Tableau’s
attempt to employ visual best practices for you). To use this recommended chart
type, just click the thumbnail. If you prefer to use another chart type, just click the
desired thumbnail.
e Ifyou hover your mouse over a Show Me thumbnail, the bottom of the dialog box
will show the name of the chart type you are hovering over, as well as the number
of dimensions and/or measures that are required for that chart type. If you want
to use that chart type, just CTRL-CLICK (COMMAND-CLICK on Mac) the desired
dimensions/measures in the Data pane until the desired thumbnail is enabled.
Then, click the thumbnail to create the new chart.
No matter which approach you use to initially create a visualization (the drag-to-shelves
approach or Show Me), Tableau will make some default assumptions about the type of
chart created or, more specifically, the mark type that will be used. For example, if you
initially use a date dimension for a chart, you will find a line chart (and thus, a line mark
type) being chosen by default. Use of a geographic dimension (a dimension with a small
globe icon next to it) will typically result in a circle mark type placed on a map background.
If you choose no dimensions but instead choose more than one measure (resulting in a
scatter plot), you'll find the mark type defaults to an open circle. And a bar mark type will
typically result in other combinations of nondate, nongeographic dimension/measure
combinations.
In all these cases, a mark type of “Automatic” will appear on the Marks card (the dialog
box that appears to the left of your finished chart). Again, this is Tableau’s approach to
visual best practices: estimating the proper chart type and mark type based on the number
and type of dimensions and measures chosen. However, there may be situations where you
prefer to alter Tableau’s automatic choices.
A common requirement comes with date or date/time dimensions. As discussed
previously, Tableau will choose a line mark type if you choose a date or date/time
dimension. Line charts lend themselves to “trend over time” visualizations for a range of
dates or date/times—this is a visual best practice. However, if you have a small number
of distinct date dimension members you wish to compare (perhaps a “this year versus
last year” or “four previous quarters” requirement), you may prefer an alternative to a
line chart, such as a bar chart. Accomplishing this is as simple as changing the mark type
on the Marks card from Automatic to Bar.
Chapter 2: Basic Visualization Design
Page: aes
acs Columns \+! YEAR(Order Date)
== Rows SUM(Sales)
Filters =
Order Date
$700,000
Marks -
nl Bar
| “~ Line
| #o@ Area
| #2 Square $400,000
||
Sales
| ® Cirde |
x* Shape
$300,000
| Abc Text
|\# Filled Map
| » Pie h
=. Gantt Bar
.& Polygon $100,000
Depending on the mark type you select, other parts of the Marks card may change and
require your attention. For example, if you choose a Pie mark type, an additional Angle
option will appear on the Marks card. By placing a relevant measure on Angle and a desired
dimension on Color, a pie chart wedge will be created for each member of the dimension
placed on Color, with the wedge size based on the measure (with the largest aggregated
measure value resulting in the largest “piece of the pie”).
Maps also have interesting additional Marks card choices. Although the default
automatic mark type is a filled circle, you may desire some other mark type on a map
background, such as a square or shape (a hollow circle being the default shape displayed).
You may even prefer to display a filled map, whereby Tableau shades the entire area of a
geographic region, such as country or state, by using the Filled Map mark type.
Choosing different mark types can result in some interesting (but sometimes
ineffective) charts. Feel free to experiment, but keep visual best practices in mind.
Remember that you want to effectively convey information about your underlying data.
Think about what combination of mark types and chart organization will accomplish this.
a
Color, Size, Shape, and Label Options
In addition to mark types, the Marks card provides other options to customize the
appearance of your chart. The first is color. Again, Tableau builds in visual best-practice
adherence with default colors that are chosen for you (in fact, Tableau has hired experts in
18 Tableau 9: The Official Guide
human visual interpretation to help identify the default color palettes and behavior built in
to the product). You may choose your own colors, however, by using the Color portion of
the Marks card.
Pages
Columns | QUARTER(Order Date}
Rows Category
Filters
Category
Appliances ® B &
Binders and Binder Accesso.. : B B & B
Marks Bookcases =e
a® Square = Chairs & Chairmats |] i a 8 eB
oom - Computer Peripherals fe
& C 135 .
Color ee Label Copiers and Fax & § (| i z
&
= Envelopes
Tip You may add more than one dimension to Color on the Marks card to create combined
color variations. Just CTRL-CLICK OF SHIFT-CLICK the dimensions you wish to add in the Data
pane. Then drag the group of dimensions to Color. Tableau will create a unique color for
every combination of dimension member (because of this, you'll probably want to use
dimensions that have a relatively small number of members to avoid too many colors on
the chart). You'll notice that all dimensions you dragged will appear on the lower portion
of the Marks card, each with a color icon. Ifyou later wish to reduce the number of color
dimensions, simply drag the desired color dimensions off the Marks card.
However, by dragging a dimension or measure on Size, you can vary the mark size
based on another field. This is handy when you wish to size-encode a mark—perhaps vary
the size ofacircle on a map based on sales, population, or something similar. Some chart
types are based on variable mark sizes by design. The Heat Map is available in Show Me, or
it can be designed manually. This alternative to a cross-tab or text table (similar to a
spreadsheet) heips analyze a large number of measures in a row/column matrix. However,
rather than showing the actual measure value at the intersection of each row and column,
the Heat Map displays a shape (typically a square) that represents the value of the measure.
By placing a measure on Size, you can make quick comparisons by simply glancing at the
size of a mark. Figure 2-1 illustrates the benefit of variable mark sizes.
Choosing Shapes
As discussed earlier, Tableau provides an automatic mark type based on the types of fields
you drag to shelves or the type of chart you choose in Show Me. One chart type, the scatter
plot (available in Show Me, or resulting from initially using measures on rows and columns
in your chart), results in a shape being chosen for the automatic mark type. If you don’t
create a scatter plot, you may find certain situations where changing the mark type to Shape
may be of benefit.
By default, an open circle will appear as the initial shape and an additional Shape area
will appear on the Marks card. If you click it, a default shape palette will appear, where you
can choose an alternative shape. Clicking More Shapes in the shape palette will display the
Edit Shape dialog box, where additional shape palettes are available for selection. The
default open circle will be replaced by the selected palette/shape combination. The true
power of shapes, however, becomes apparent when you drag another dimension or
measure onto Shape on the Marks card (generally, you'll find the most benefit from adding
dimensions instead of measures). Tableau then assigns a different shape to each mark to
delineate different dimension members or measure ranges. In addition, a shape legend will
appear, showing assigned shapes.
To further customize shapes, click Shape on the Marks card, double-click the shape
legend, or click the small arrow on the shape legend, followed by Edit Shape. The Edit
Shape dialog box will appear with the currently assigned shapes displayed, as well as
palette choices. If you wish to assign a different shape from the current palette to any
existing dimension or measure range, select the dimension/measure range under Select
Data Item and click the desired shape from the palette. If you wish to use a different palette,
select it from the drop-down list. If you wish to assign all new shapes from the just-selected
palette, click Assign Palette. Or, you may just choose one shape from a new palette for a
particular dimension/measure by clicking the value and then the desired shape; shapes
from more than one palette may be assigned this way.
Chapter2: Basic Visualization Design 21
Tip You're not limited to just using the available shapes in the palette drop-down list. To add
your own custom shapes, obtain or create a series of image files in .png, .gif, jpg, .bmp, or
.tifformats. Generally speaking, you'll benefit ifthe images are “icon size,” or around
32 by 32 pixels. And, ifyou want to color-code the shapes with Color on the Marks card,
you'll benefit from using .png or .gifformat with background transparency enabled.
Place the images in their own folder (the folder name will be used to name the palette in
Tableau) within your operating system’s Documents\My Tableau Repository\Shapes
folder. If Tableau is running when you add shapes, click Reload Shapes in the Edit Shape
dialog box to read the new shape folder.
By default, the field displayed at the intersection of each text table row and column is
placed on Text on the Marks card. A field appears in the lower portion of the Marks card
with the associated text icon. If you wish to display a different field on Text, simply drag
the existing field off the Marks card and drag the new one onto Text (or just drag a new
field directly on top of the existing field to replace it). You may also click Text on the Marks
card and adjust the alignment of the text, as well as customize the actual text displayed.
More than one measure can be displayed in a text table. Simply drag additional fields onto
Text, and they'll appear next to previously chosen ones. You may also invoke Measure
Names and Measure Values to display multiple measures on a text table, as described later
in the chapter (this typically is more visually appealing than just dragging multiple
measures to Text).
When using a graphical mark type, such as a bar or line, you may find it helpful to still
show text around a mark indicating the actual value it represents (to show the value of a bar
or point on a line, for example). This is possible using mark labels. Basic mark labels can be
__. turned on with the Analysis |Show Mark Labels drop-down menu option or the Mark
*8< Labels toolbar button. As mentioned previously, nontext mark types will also display a
Label option on the Marks card. Placing a field on Label will add a mark label to the
corresponding mark. Using Label on the Marks card provides additionai flexibility beyond
the toolbar button option.
Multiple labels may be placed on a mark. For example, you may wish to annotate a pie
chart with not only the dollar value of the measure represented, but also the percentage
each wedge contributes to the total. Or, you may choose to hide the standard color legend
and add the dimension name to Label to place the label on top of each bar of a bar chart, as
well as the value the bar represents. Simply drag more than one field onto Label. Changing
the order in which fields display is as easy as dragging and dropping the order of fields in
the lower part of the Marks card.
You may also click Label and customize the mark label display in a number of ways. An
edit box allows customization and formatting of all chosen labels. And you may choose
which marks to label (all, minimum/maximum only, and so forth) and when to display
labels (always or only when marks are selected or highlighted). In addition, an option
appears allowing labels to overlap adjoining marks.
Marks
toLabel —————————__—
All Selected
Min/Max Highlighted
Options ————_—_______—
{-] Allow labels to overlap other marks
Chapter 2: Basic Visualization Design 23
Tip You may reassign any field on the Marks card to a different
Marks v
property. For example, ifyou mistakenly drop a field on Color but
actually want it on Label, there are two quick options. First, you x Automatic Ma
may just drag the field from the lower portion of the Marks card
onto the desired area. Or, you may click the icon to the left of the Color Size Label
Detail
Tooltip
Customizing Tooltips
Tooltips are small pop-up text boxes that appear when you hover your mouse over a
mark. By default, tooltips show values for all relevant fields included somewhere on |
your visualization. With Tableau 9 “responsive” tooltips, a click on an existing tooltip
will provide additional action links to create inclusion or exclusion filters, create a
group or set (groups and sets are discussed in Chapter 6), and view the underlying data |
making up the mark.
VS”
There are several ways of customizing tooltip appearance. First, you may right-click
any field used on the worksheet (on a shelf, on the Marks card, and so forth) and toggle
the Include In Tooltip option (this option will not appear if you have customized the
tooltip in the Edit Tooltip dialog box, described next). You may also choose the
Worksheet |Tooltip drop-down menu option, or click Tooltip on the Marks card to
display the Edit Tooltip dialog box. You may format various parts ofthe tooltip text,
add more fields (including an All Fields option), choose how tooltips behave when
you hover over a mark, and choose whether or not to include the previously described
command button/action links in tooltips.
24 Tableau 9: The Official Guide
ee I LR ST EES SET IDES EIST LISSA DELS LTITO SEADE PLE DDELLE EDEEE EEL EDLEINTL ELELIE LEE LCD LLLL EELOLOL LEO DEE,
Formatting Options
So far, customized formatting has been limited to options available in text edit dialog boxes.
These dialog boxes permit you to select various parts of text and change font and color
formatting. However, Tableau also includes complete formatting options for other parts of
your visualization, such as marks, headers (column or row headings that appear for each
dimension), axes, and so forth.
There are several ways to initiate formatting in Tableau. You may choose options from the
Format drop-down menu. You may also right-click virtually any kind of Tableau element
(fields on shelves, marks, labels, legends, axes, and so forth) and choose Format from the
context menu. The Data pane will be replaced with a Format pane, as illustrated in Figure 2-2.
You'll notice several small icons at the top of the Format pane. Click the desired icon to
change font, alignment, shading, borders, and lines on your worksheet. These icons equate to
the first five options on the Format drop-down menu. Below the icons are three tabs: Sheet,
Rows, and Columns. Click the desired tab to format either the overall worksheet or just row
and column items.
A small Fields drop-down arrow appears at the upper-right area of the Format pane.
Clicking this arrow will expose a list of all dimensions and measures in use on the worksheet.
[Formatlfost
Select which portion Ey
— o Hs pea SSS
of worksheet to apply | cy
formattingto ————————— 4| % of Total SUM(Sales)
| | SUM(Sales)
Worksheet: Arial, Spt Sere <<
| NOt |
| Pane: Arial, spt Gasy |
Header: Arial, 8pt oy |
|Grand otal) |
| |
|
| [ Clear |
ee 2-~---7F]pF}[PS@e--NWV'———?——__ S++.
Figure 2-2. The Format pane
Chapter 2: Basic Visualization Design 25
Selecting an individual dimension or measure will allow you to format just occurrences of
that field, as opposed to overall formatting for all fields. The previously described Sheet,
Rows, and Columns tabs will be replaced with Header/Axis and Pane tabs. Header/Axis
formatting applies to dimension labels (or headers), which appear for each member of a
dimension. Axis formatting applies to a numeric axis that is associated with a measure. Pane
formatting applies to the actual graphical or text items within your chart. In particular, charts
based on more than one dimension will create a series of “panes” within each other, which
are formatted via the Pane tab.
Panes
$4,500,000
$4,000,000
$3,500,000
$3,000,000
. |
® $2,500,000
wo
$2,000,000 |
$1,500,000
$1,000,000
$500,000 |
: $0 ~wall —
esES
= =
Ra
2 €a
ee
3 =
ee
52
Pa° =
ae of e
= 68 2 E Og ¢ +s = E a Tf
= FA $ Fra ® 3 = eo 2 + i
=
Dimension
headers
of ay
Formatting in Tableau may require some getting used to, as the organization
many other standard applicat ions. Just experim ent—il you
Format pane is different from
oftabs or ae:
don’t see the expected outcome, try choosing other combinations
results. There is no OK confirma tion button in the
icons until you achieve the proper
26 Tableau 9: The Official Guide
Format pane, so formatting happens on-the-fly as you choose options. You'll be able to see
the results of your choices immediately and reverse them if they’re not correct. And you
can always resort to the Clear button in the Format pane or the Undo button on the toolbar.
Filters
Category
$4,000,000
Marks
An ul $3,000,000
tl Automatic ae
eee $2,000,000
Sales
&'|' 3 185
{ Color Size Label
=i = $1,000,000
Detail | Tooltip)
ee 30 | =
E
—
Profit
$500,000
$o
=
te
Labels Paper
Tables $2
Cc
Appliances Bookcases Envelopes Trimmers o
Accessories
Machines
Office
Bands
Rubber i
=5
Fax
and
Copiers EO
Binders
Binder
and Chainmats
&
Chairs Furnishings
Office
Supplies
Art
&
Pens Scissors,
and
Rufers
Peripherals
Computer
Organization
&
Storage
profit measure appearing on rows. This creates two different rows, with a separate axis for
each measure. This approach provides several benefits: each measure can be compared
across a single row, and the measures can be compared to each other by evaluating the two
bars within each product category column. This type of chart is helpful if the two measures
are drastically different in values or minimum/maximum scale, as each axis is automatically
scaled to accommodate its specific measure.
Filters
Measure Names 4000K
Marks
Ss ae 3500K
7¥ Automatic ’
| & ) $35
|Color || Size| |Label } 3000K
@ Measure Names —_
SUM(ales)
1500K
Measure Names
BB Profit
i Sates 1000K
500K
OK
Creating a shared axis chart, while simple, requires a specific approach. After creating a
chart with the first measure, drag the second measure from the Data pane onto the existing
axis in the work area. Look carefully—you'll see a “double ruler” icon (two side-by-side
green bars) appear in the existing axis. When you see this icon, drop the second measure.
Both measures will now appear on the visualization sharing the same axis. You may do this
as many times as necessary (as long as too many measures don’t render the chart
unusable). Just drag additional measures onto the shared axis.
$3,500,000
$3,000,000
S 4 5% Q
31,500oO o =)0
$1,000,000
$500,000
x il
at exsett"
sieeee,
ith
=
-=., Best Practice Although Tableau permits multiple measures of drastically different
7
a values and scales to share a single axis, you’ll probably find these visualizations to
be of limited use. The drastic difference will require Tableau to scale the shared axis
for the larger measure, which may make comparison to the smaller measure
difficult. As such, you should only use shared axis charts ifthe measures are not
dramatically different in scale.
Chapter 2: Basic Visualization Design 29
Filters
Measure Names
Marks
/~ Automatic ’
[mf @ || a
Color || Size | | Label|
Detail | | Tooltip} Path
Measure Values
SUM(Profit}
SUM(Sales)
Measure Names
BB Profit
BB Sales
Another helpful use of Measure Names and Measure Values is when you wish to use
earlier in this
more than one measure in a text table/crosstab (text tables are discussed
on the Marks card to add
chapter). Although you may drag more than one measure on Text
when you double-cl ick
multiple measures to a text table, you'll probably prefer the results
30 Tableau 9: The Official Guide
to add more measures. For example, if you drag desired dimensions to Rows and Columns
shelves and then simply double-click a measure, the measure will automatically be placed
on Text and will appear at the intersection of the row and column dimensions. Instead of
dragging a second measure to Text, simply double-click the second measure. Tableau will
invoke Measure Names and Measure Values, placing Measure Values on Text to show
multiple measures in the same place, and Measure Names on Rows to create a separate
row for each measure. The added benefit of this approach when compared to dragging
individual measures to Text is that a single set of headers appears containing the names of
the measures. No special effort is required (such as a calculated field or manual editing of
the text value) to properly label multiple measure rows or columns.
Filters Region
Measure Names Customer Se.. Central East International South West
Measure Values
SUM(Profit) Small Profit $109,187 $93,124 $1,296,110 $14,364 $99,799
- Business
SUM(Sales)
Sales $384,308 $617,565 $4,284,500 $270,652 $405,849
Note Although you'll see Measure Names and Measure Values items in the Data pane, it’s
typically better to let Tableau invoke them automatically with drag-to-axis or double-
click functionality described earlier. You may drag them to shelves and cards directly
from the Data pane, but you'll probably find lots of additional (and often confusing)
effort will be required to achieve the desired end results.
useless in these cases, as the axis scale required for the larger measure renders comparison
to the smaller measure impractical. Tableau solves this problem with dual axis charts,
charts that can display separate left and right axes.
Figure 2-5 shows such an example. Here, sales and shipping cost can be reasonably
compared in the same physical space. However, there are two separate axes on the chart:
the sales axis appears on the left, the shipping cost axis on the right. Note the two different
scales of the axes, which avoids the issue of comparing dissimilar measures on the same
axis. As with shared axis charts, creating a dual axis chart is simple, but requires one of two
specific steps. First, drag the second measure from the Data pane onto the right side of the
existing chart in the work area. Look carefully—you'll see a “single axis” icon (one green bar
and a dashed line) appear on the right of the chart. When you see this icon, drop the
second measure. You may also drag the second measure to the Rows or Columns shelf
directly after the first measure. This will initially create a second row or column for the new
measure. Now, right-click or select the drop-down menu arrow on the second measure
indicator and choose Dual Axis from the context menu. This will place the second measure
on its own axis on the right side of the chart.
Filters 520,000
$4,000,000
$18,000
Marks $3,500,000
$16,000
All “wv
SUM(Sales) Va
SUM(Shipping Cost) *” $3,000,000 $14,000
Y~/ utomatic
$12,000
@\|fo){ % x
$2,500,000
Measure Names
$1,000,000
BB Sales $4,000
B Shipping Cost
$500,000 $2,000
50 cs
201004 201102 201104 201202 201204 2013Q2 201304
2010Q2
Quarter of Order Date
1
1
1
1
1
1
1
1
1
1
1
1
1
i]
1
1
i
1
1
1
1
1
1
iT
: Single bar icon and
i dashed
: line on right
$2,500,000
' side of chart create
second axis
500,000
$1,000,000
Note As mentioned earlier, dual axis charts allow dissimilar measures to be analyzed in the
same physical space. There is a potential pitfall, however. Since the different measures are
displayed using separate axes, data “confusion” may result when comparing them. For
example, ifthe scale of the left axis is showing millions of dollars, while the scale of the
right axis is showing thousands of dollars, it may appear that shipping costs being
displayed is in the millions or sales being displayed is in the thousands. Although you
may right-click the right axis and choose Synchronize Axis to set the scale for both axes to
be identical (both measures must be the same data type for you to synchronize), you have
then eliminated one of the benefits of a dual axis chart by scaling both measures’ axes
identically. You'll need to consider the benefit of a dual axis chart against the possible
data confusion of different axis scales in the same physical space.
Chapter 2: Basic Visualization Design 33
$18,000
$3,500,000
516,000
$3,000,000 $14,000 |
$12,000
$2,500,000
o
.) $10,000
o
® $2,000,000
Cost
Shipping
$8,000
$1,500,000
$6,000
$1,000,000
$4,000
$500,000 52,000
$0
2011 Q2 2011@4 2012Q2 201204 2013Q2 201304
2010 Q2 2010 O4
Quarter of Order Date
(continued)
34 Tableau 9: The Official Guide
| You can also make use of a Multi-Measure Marks card for multirow or multicolumn
charts using different measures. As with the combination chart, more than one
measure will be selectable in the Marks card. Just be careful—consider visual best
practices when using different mark types with a multirow or multicolumn chart so as
to not confuse your audience.
$3,000,000
Marks
All
SUM(Sales) tl $2,000,000
Sales
Set ee “~~
/~ Line ’
&)fo}f a
Joersel [Neca |"asces!
| Detail | |Tooltip) | Path \
$15,000
$10,000
Sl
Cost
Shipping
$5,000
Tip You may also choose a different mark type for individual measures by right-clicking the
relevant axis or clicking the drop-down arrow or right-
EditAxis.
clicking the field on a shelf. Then select the Mark Type } Clear Huts Range
context menu option and make a mark type choice. | en
Select Marks
Synchronize Axis
| Mark Type
Format...
Vv Show Header
35
36 Tableau 9: The Official Guide
Tip Ifyour version of Tableau only presents the “In a file” selection of data sources and not
the “Ona server” selection, you have probably acquired Tableau Personal Edition or
Tableau Public Desktop. This version of Tableau is designed specifically for analysis of a
limited set of PC-based “local” data sources, such as text files, Microsoft Excel and Access,
and Tableau Data Extracts. Ifyou need to analyze data located in standard corporate
databases, such as Microsoft SQL Server or Oracle, or web-based data sources, such as
SalesForce.com or Google Analytics, you'll need to purchase Tableau Professional
Edition. Only Professional Edition presents the “Ona server” list of data sources.
Tableau supports connections to many different databases and data sources, including
standard corporate databases; newer “big data” data sources, such as various versions of
Hadoop and Google Big Query; and web-based data sources, such as Salesforce.com and
Google Analytics. Even if the particular database you wish to connect to isn’t in the list of
existing data sources, Tableau will connect to data via Microsoft’s Open Database
Connectivity (ODBC) connection type. If your data source includes a standard ODBC
driver, Tableau can probably connect to it.
Select the type of data source you wish to connect to. An associated connection dialog
box will appear, prompting you to choose various data source properties. Depending on the
data source, you'll need to provide a user name or e-mail address, password, server
location, database name, and so forth. For example, to connect to Microsoft SQL Server,
you'll need to specify a server name, user ID and password (if not using Windows
Authentication), and database name.
Server Connection —
Username: sa
Password: eovcce
{] Require SSL
[] Read uncommitted data
Chapter3: Connectingto Data 37
Google
Sign in with your Google Account
Create an account
Although a data source may appear in the list, connecting to it may require
downloading additional drivers from the Tableau website. If a driver download is
necessary, a dialog box indicating such will appear when you attempt to connect to a data
source. Visit Tableau.com/drivers to find additional drivers and try the connection again
after the proper driver has been downloaded and installed.
hg naire tangs Grey ape eee 5sfee pet caest>ree EOF Ret ae ee a ae i tees 2
Tip Probably the biggest difference between the Windows and Mac versions of Tableau is
available data sources. Because of the generally larger set of database drivers available
for Windows, you'll notice a smaller set of available databases (mostly in the More
Servers category) on Mac. However, because Tableau Server is Windows based, it
supports all drivers and can act as a data server “proxy,” providing full connectivity to
Mac clients. Just create the data source on Tableau Server and use it on Tableau Mac to
connect. (Chapter 9 has more information on Tableau Server-based data sources.)
38 Tableau 9: The Official Guide
© FactInternetSales+ (AdventureWorksD
@ Live
Server
FactinternetSales DimCustomer
Database
™ = DimDate
[AdventureWorksD w2012 _ >! zB a :
Caution Tableau creates and modifies its own SQL queries “on the fly” as you drag and drop
dimensions and measures. As such, using custom SQL queries may result in degraded
performance, as Tableau may not be able to generate the most efficient queries for your
data source. Ifyou notice degraded performance, consider other options that may not
require custom SQL, such as creating custom views on the database itself. Another option
to mitigate slow performance with custom SQL is Tableau Data Extracts, discussed later
in this chapter.
As you add more tables, you may find table names to be confusing or in conflict. It’s
easy to change the “alias” of a table (the name that Tableau uses to refer to the table, even if
it’s not the true table name in the data source) by double-clicking a table that’s been
dragged to the Join area. For example, if you have to add the same table more than once
40 Tableau 9: The Official Guide
(perhaps a lookup table that is used many times to join to various other fields) double-click
the table name and type a more meaningful alias name to help distinguish it from other
occurrences of the same lookup table.
Choosing and joining tables is often as much, or more, complicated than actually
analyzing the data after you've connected to a data source. You must be intimately familiar
with the structure of your data source (or it must be thoroughly documented) in order to
properly choose and join tables. Consider the following when making these choices:
e What common field exists between the two tables? Both fields should be the same
data type (string, number, date, and so forth) and should contain similar values. If
you need to browse table data, click the small “view data” icon to the right of the
desired table in the table list on the left of the Data Source page.
e Select the correct matching fields in each column.
e Choose a join operator from the drop-down list between columns. Typically, you'll
leave the default equal sign as the join operator, which will match data from the
two tables when the common fields are equal to each other. However, in some
specialized cases, you may need to return data from the tables when the first join
field is less than the second field, greater than the second field, and so forth. Make
the desired choice from the drop-down menu.
e Select the type of join with the bubble buttons at the top of the Join dialog box. By
default, Inner is chosen, which will return a combined record when the join field
matches in both tables. If you choose Left, all records will be returned from the left
table (the table that appears in the first column), as well as matching records from
the right table. If there is no matching data from the right table for a left table
record, right table fields will be null. Ifyou choose Right, all records will be returned
from the right table (the table that appears in the second column), as well as
matching records from the left table. If there is no matching data from the left table
for a right table record, left table fields will be null. Full, which is not supported for
all data sources, will return all combinations of matches from both left and right
tables. If there is no match from one table to another, fields from the mismatched
table will be null.
Caution Even if Tableau joins tables automatically, you should click the bubble icon to
double-check the join that Tableau made. It is not uncommon for Tableau to misinterpret
fields and join incorrectly (for example, fields such as LastUpdateDateTime and
LastUpdatedBy often exist in multiple tables and will be selected as join fields by
Tableau, even though they are not the proper fields to match related tables).
Once you add and join tables, you may click any of the sheet tabs at the bottom of the
screen to display either an existing or new sheet. The Tableau workspace will appear with
the Data pane breaking down fields from the chosen data source as dimensions and
measures (a complete discussion of dimensions versus measures and how Tableau chooses
them appears in Chapter 2). |
Chapter 3: Connecting to Data 41
The Data Interpreter Generally speaking, Tableau (and other analytic tools that make use
of Excel as a data source) works best when Excel sheets are organized in a contiguous,
consistent row-and-column format. Extraneous rows, subtotals, titles, blank rows or
columns, or other sheet organizations that break the “contiguous row-and-column”
approach are misinterpreted as data by the analytic tool and often prevent accurate
analysis. Tableau features a Data Interpreter that attempts to intercept these types of Excel
sheet layouts, rendering otherwise unusable Excel sheets into meaningful data sources.
Consider a sample Excel sheet illustrated in Figure 3-2, which presents formatted data,
blank columns, and blank rows. When Tableau initially connects to this sheet, it immediately
as = = ce Sey = Su
Fay
yY COU! 000 - 2040
|
SDO Proj. SDO Proj. SDO Proj, SDO Proj, SDO Proj. SDO Proj. SDO Proj.
_July,2010 July, 2015 July, 2020 uly, 2025 uly, 2030 July, 2035 ___ duty, 2040
ignores some blank rows. However, the formatted sheet title is still interpreted by Tableau as
data, as are extra blank columns. As a result, Tableau can’t properly interpret the column
headings as field names and interprets both rows of field headings as separate extraneous
data rows. The preview portion of the Data Source page shows the results.
Population
Data doesn't look right? Tableau Data Interpreter might be able to help. Turn on
Fl F2 FB Fa F5 F6 F7 F8 FO FiO FL Fi2
Abc Abe + Abc oH Abc + Abc + Abc ab Abc
TABLE 3, PRELIMINA... null nul null nut! null null null null null nui null
null SDO E... null SDO Proj. pull SDO Proj. nuit SDO Proj. nuil SDO Proj, null SDO Proj. :
COUNTIES July, 2000 null July, 2005 null July, 2010 null! July, 2015 null July, 2020 null July, 2025 :
North-Adams 351,736 null 395,384 null 443,711 mul 487,576 null 542,245 oul 599,718
South-Alamosa 15,099 null 15,395 null 15,474 null 16,199 null 17,521 nuit 19,041
North-Arapahoe 490,722 null 528,214 null 574,819 null 627,055 nul 677,047 null 725,839
West-Archuleta 10,043 aul 11,402 nuil 12,060 null 12,526 null 13,851 nuit 16,029
East-Baca 4,499 null 4,098 null 3,795 null 3,707 null 3,806 nul 3,920
East-Bent 5,967 null 6,261 null 6,506 nul! 5,941 null 6,142 nuil 6,312
North-Boulder 276,255 null 282,910 nuil 295,605 null 317,341 null 335,076 nuil 356,711
North-Broomfield 38,547 null 48,251 nuil 56,107 null 62,758 null 72,013 null 81,998
West-Chaffee 16,312 null 17,022 null 17,797 null 18,939 nutl 21,272 nul! 23,851
East-Cheyenne 2,216 null 2,041 null 1,834 null 1,937 null 2,038 null 2,121
Tableau discovers the inconsistency and prompts you to turn on the Data Interpreter. If
you click the Turn On button, Tableau will attempt to determine where extraneous rows
and columns exist and remove them. The preview will be updated to show the results.
Chapter 3: Connecting to Data 43
Population
COUNTIES SDO Est, July, 2000 SDO Proj. July, 2005 SDO Proj, July, 2010 SDO Proj. July, 2015 SDO Proj. July, 2020 SDO Proj. J
Abc + + + + 4
Notice that the formatted heading is now ignored, blank columns have been
eliminated, and the two column heading rows have been combined and interpreted as
actual column heading/field names. When the Data Interpreter is used, click the Review
Results button to launch an instance of Excel showing the resulting raw data in a separate
sheet, along with a descriptive sheet describing the changes the Data Interpreter made.
If the results are not what you desire, you can click the Turn Off button to return the Excel
data to its original form. If the Data Interpreter won't properly discern the core data from
your Excel sheet, you'll need to manually edit out the extraneous items, save the Excel
workbook, and reconnect within Tableau.
Column Pivot Another occurrence that is often encountered when using Excel sheets as
data sources is a data organization that places a large number of numeric measures in
separate columns. Although this lends itself to more typical spreadsheet “wide columns
view” applications, it is often more difficult to analyze with an analysis tool that expects
more traditional relational database organization.
Tableau 9: The Official Guide
COUNTIES SDO Est, July, 2000 SDO Proj. July, 2005 [J] _SDO Proj. July, 2010
Abc at ; + silat + sulati Hide j r bea
Measures
+£ Pivot field values
= Numberof Records
+4 Measure Values
Chapter 3: Connecting to Data
This permits more flexible analysis. By using filters with Pivot field names to limit the
chart to only certain values (in the case of the population example discussed in this
section, specific projected year ranges), simpler and more flexible results may be achieved
without use of Measure Names/Measure Values or calculated fields. The Chapter 3 - Data
Connections-Blending.twbx sample workbook, available for download from the companion
website, illustrates the simpler approach with comparative worksheets.
If you navigate to a worksheet, you may customize data source metadata by hovering
over a dimension or measure and clicking the small drop-down arrow or by right-clicking
(CONTROL-clicking on a Mac) on a dimension or measure in the Data pane. Choose the
desired option from the context menu.
Dimensions Hz Dw
Abc Category
® City
@ Country
Abc CustomerID
Abc Customen*—
Fl Order Da ils Add to Sheet
Abc Order ID! 3
® PostalCe Duplicate
Abc Product] Rename...
Abc Product| Hide
Abc Region |
+ RowID | Aliases...
bie Seqener Create »
3 Ship Date
Abc ae Moé Transform >
© State
| Convert to Measure
Abc Sub-Cate
Abc Measure] Change Data Type >
i
Geographic Role r
|
Folders )
: Casnkty
+t Sales |
@ Latitude! Hierarchy »
ai _ &
be os Replace References...
te Measure! Describe...
Note Metadata modification capabilities will vary, depending on the type of data source
you are using. For example, fewer features will be available when using online analytical
processing (OLAP) or “cube” data sources, and other features will vary for cloud-based
data sources and Tableau Data Extracts.
Date/Time ES Date/time, including month, day, year, hour, minute, and second
Boolean TIF Only two values are returned, either True or False
Tableau may misinterpret data types in the data source, which will require data type
reassignment for more appropriate usage. For example, Tableau may assign a numeric
column in an Excel worksheet as text because of blank rows, column formatting, or one
errant row that contains non-numeric data. Or data may be stored in a data source as text,
but the text contains a consistent series of date values separated by common delimiters,
such as a dash or slash. In these cases, you may reassign the data type to properly use the
Excel column as a numeric measure and the text dates as “real” dates in order to take
advantage of Tableau date analysis features.
e DataSource page Click the icon next to the field name and choose a different
data type from the context menu.
e Datapane Pick the desired data type from the Change Data Type submenu on
the context menu.
tables that later are not required for common analysis tasks. These unneeded and hard-to-
understand fields don’t lend themselves to common data analysis tasks.
In even the most basic data structure, there are probably fields you have no desire to
use and prefer to hide from view.
¢ DataSource page Hover your mouse over the desired field and click the small
drop-down arrow. Or right-click (CONTROL-click on Mac) and choose Hide from the
context menu.
e Datapane Choose Hide from the context menu. The field will simply disappear.
You may hide as many fields as necessary, even CTRL- or SHIFT-clicking multiple fields
and choosing Hide from the combined context menu. If you’re editing a worksheet and the
Data pane is visible, you may even hide all fields that aren’t being used in a worksheet once
you've completed your chart. Just right-click a blank portion of the Data pane (make sure no
fields are selected) and choose Hide All Unused Fields. Fields not in use on any worksheet in
the workbook will be hidden (remember that some fields may not be in use in the current
worksheet, but will be in use in other worksheets).
You may wish to later redisplay fields that were previously hidden.
e DataSource page Check the Show Hidden Fields box in the upper right. Display
the context menu on hidden fields and select Unhide.
e Datapane First, right-click a blank portion of the Data pane (make sure no fields
are selected) or click the drop-down arrow to the right of the Dimensions box.
Choose Show Hidden Fields. All previously hidden fields will now appear in the
Data pane, but will be dimmed. Select one or more hidden fields, right-click, and
choose Unhide from the context menu.
If you need to combine the contents of more than one dimension into a single value
(sometimes referred to as concatenation), you must be editing a worksheet and make the
choice in the Data pane.
Just CTRL-click (CONTROL-click on Mac) or sHiFT-click the dimensions that you wish to
combine. Then hover over one of the fields and select the drop-down arrow (or right-click)
and choose Create |Combined Field from the context menu. A new dimension will appear
in the Data pane, initially named based on the field names of the combined fields. If you
wish to rename the new dimension, right-click it and select Rename from the context menu.
Chapter 3: Connecting to Data 49
When the combined dimension is used in your worksheet, every combination of members
from the source dimensions will result in a new combined member.
Splitting Fields
Depending on how fields are organized, you may benefit from splitting (sometimes known
as parsing) a field into two or more parts. For example, if a product part number contains
three letters constituting the product type, followed by a dash (known as a separator),
followed by a part number, you'll probably benefit by splitting the field in two to permit
analysis by product type without having to manually create a calculated field to extract the
first three letters. Or, you may wish to split a city/state combination, separated by a comma,
into separate city and state fields.
In addition to the basic split option, which attempts to automatically detect separators,
you may choose a custom split option. If you choose custom split, the Custom Split dialog
box will appear. Here, you may leave the default list of separators or type in one or more
custom separators. You'll need to specify how many splits to perform in the columns box,
as well as whether to split from the beginning of the source field, the end of the source field,
or throughout the entire source field.
Custom Split
OK) |
e DataSource page Hover your mouse over the desired field and click the small
drop-down arrow. Or right-click (CONTROL-click on Mac) and choose Split or
Custom Split from the context menu.
e Datapane Choose Transform | Split or Transform |Custom Split from the
context menu.
Tableau will split the original field into multiple separately split fields, in addition to
leaving the original source field in place. You may delete or rename any of the additional .
split fields using techniques outlined elsewhere in this section. Note, though, that you can t
use split results to join to other tables (although you can blend on split fields—data blending
is covered later in this chapter).
Note that using the split feature will actually create a calculated field (described in
Chapter 6) and place it in the Data pane. If you aren’t satisfied with the way the initial
split process worked, you may edit the calculated field and customize split logic. Also,
you may create new calculated fields using the Split function without returning to the
Data Source page.
Note Split is not available for all data sources. Ifyour data source doesn’t support Split, it
won't be available on menus or in calculated fields.
50 Tableau 9: The Official Guide
j ; ? {ie
14) |
@ OS total|Dota|
—Bropusetion, :
cc ¢ Gata. worldbanicony/indicator/SPPOP.TOTL =
I apps © wwS/Boulder
Zone! <> NWS RadarCnelc (Y wHOIS Search fF] KUVO Webmail The Zephyr Xstream |) Theofficial
U.S.time [3 My Ooma- Login » (5) Other Bookmarks
GF) THE WORLD BANK Wicking tora World Eres OfPeiverty English Espafol Frangals «is Pyocomh FX »
7 waO- ws
Home About Data Research Learning News Projects & Operations Publications Counties Topics
Making use of this data in Tableau is as easy as copying the highlighted data to the
Clipboard via the browser’s Edit |Copy drop-down menu option or CTRL-C/COMMAND-C
keyboard shortcut. Then choose an existing workbook where you wish to use the data, or
just display the Tableau Start Page. Then choose Data |Paste from the Tableau
drop-down menu, or simply press the CTRL-v/COMMAND-V keyboard shortcut.
Tableau will create a new data source in the Data pane (labeled Clipboard, followed
Chapter 3: Connecting to Data 51
r
by a number based on the current date and time) and display all pacied
ieldein Fe
for
worksheet, as illustrated here.
: es a) Djibouti
+ F4 SUM(F3) Dominica
3 FS SUM(F4) Dominican Republic 10,016,797
+= Number
of Records SUM(F5) Ecuador 15,001,072
3= Measure Values Egypt, Arab Rep. aaa
Et Salvador 6,218,195
Equatorial Guinea 5m
Eritrea 5.741.159
Estonia 4,331,475
Parameters
Ethiopia 87,095,281 cs
+ Profit Bin Size “
+h Menfit Dim Sinn 4
Oo Data Source | Excel Data ~ Pivoted, with Split Excel Data - Unpivoted - Total 15... Excel Data - Pivoted -Total 15 Yea... |Clipboard DataSource Map Fdti #8 fd
In some cases, Tableau may perfectly interpret data in the pasted table and
properly identify data types and dimension and measure assignments. However,
in other cases, misinterpretation may occur. In this example, notice that although the
general row-and-column format of the pasted data is intact, there are several issues
that will prevent the data from being properly used in Tableau:
e The first row in the pasted chart was interpreted as data and not as column
headings. As such, field names are meaningless “F” values, and an extra row of
data for Country Name appears in the data source.
e Years appear as columns, which may cause difficulty in analyzing data across
multiple years, or require calculated fields, for the most flexible analysis.
¢ As with any data source, field names and data types may be changed in the
Data pane. Fields have been renamed as intended.
(continued)
S|
52 Tableau 9: The Official Guide
e Filters may be added to remove data rows that are misinterpreted as data.
e Columns may be pivoted to create a more flexible data source arrangement.
Pivot fields may be renamed appropriately.
e Fields may be assigned a geographic role if not done so automatically
with Tableau.
The result is a far more usable data source, allowing a population map to be created
by use of the geographic country field and one of the yearly population measures.
© Automatic ’
®
& (] 435 .
Color || Size ||Label x0,°
ey
. _ . ©
Detail | Tooltip @ ai See enn ee
°
Measures ‘) |SUM(Population) e pay. ee ‘; + e.\¢
ese Ha.
+ Population . +e -2@ .
2 Country Nam ° s . *
D Lotitude (generated) eae . on? )
© Longitude (generated) Oe e@ te
: +¢ Number
of Records SUM(Population) a” a
+ Measure Values Sap e bd
Parameters
+ Profit Bin Size
4 Profit Bin Size 1
( Data Source Excel Data -Pivoted, with Split Excel Data - Unpivoted - Total 15... |Excel Data - Pivoted - Total 15 Yea... Clipboard Data Source .Map From Clipboard Data Source ti tt
213marks lrowbyl column SUM(Population): 6,941,277,770 Wo4 wow y
Once you've done any necessary data source modifications and saved the associated
workbook, the Clipboard data source will be saved in a tab-delimited file. You may
then reuse (or extract) that file for further use in other workbooks. A dialog box will
confirm saving of the Clipboard data source.
Clipboard_20150519T 172800
Clipboard_20150519T 174416
7= Rows SUM(Sales)
Order Date
$100,000
$80,000
$60,000
5
3
$40,000
eer a
we Beresy
< Peeee
Ses
$20,000
ney
= . 1* re rea ae =
&ee bk Sle & Sis x
= = =>uois¢ & 6= 265 ere 58 eo of g 5 s2
CEG
s SEES
es2az 4 SSS
Pesce RGR
lec RGSS 4A 3816 ges &£298 &§ 5 =aitz
SS 2268 85 8 aio = 818 @
32 ac
SiS 4&2
mi = eo
©
3 23 2 =-
54 Tableau 9: The Official Guide
You may have other related nondate dimensions that lend themselves to a hierarchy.
For example, you might have a series of separate product-related fields, such as category,
subcategory, and product name, that lend themselves to a natural hierarchy. Or you may
prefer to create a hierarchy to navigate from country, to state, to city, to ZIP code.
Creating your own hierarchies in Tableau is easy. In the Data pane, simply drag the
“inner” dimension on top of the “outer” dimension. For example, if you are creating the
product hierarchy discussed previously, drag Subcategory on top of Category. The
Create Hierarchy dialog box will appear, prompting for a name for the hierarchy (with the
default name being the fields you dragged and dropped). Give the hierarchy a more
meaningful name (such as “Products”) and click OK. Notice that the Data pane now
contains the hierarchy you created, preceded with a plus sign. Click the plus sign to expand
the hierarchy and expose the dimensions within it. Drag additional dimensions inside the
existing hierarchy. If you happen to drag the dimensions in the wrong order, simply drag
and drop within the hierarchy to reorder dimensions properly. If you drag a dimension
into the hierarchy by mistake, just drag it back out. To completely erase a hierarchy,
right-click the hierarchy name and choose Remove Hierarchy from the context menu.
Abc Cul
Once you've created your own hierarchy, drag the hierarchy Dimensions ise Av
name onto a shelf. Notice that the top-level dimension in the 4 E Orders$
hierarchy is displayed on your visualization and that a plus sign te paca!
appears on the field indicator on the shelf. As with the previously @ a
illustrated date hierarchy, plus and minus signs on the field Se geet aa elle
indicators can be used to navigate through the hierarchy. You may a ae
also drag an inner field from the hierarchy to a shelf. Navigation @ Postal Code
will be available from that field on down. 6 sine ae
Abc Segment
Note All the techniques discussed in this chapter to modify your “view” of the data do not
change the underlying data source in any way. Only the way Tableau presents the data
structure is customized—the underlying database structure is untouched.
be using their own personal repository folders, you may choose to save the .tds file in
another shared location, such as a shared network drive. In that instance, you (and others
in your organization who want to use the shared .tds files) will need to use the Other Files
option in Tableau to open .tds files not in their repositories.
If your organization has access to Tableau Server, you may also save .tds files there for
sharing among your other Tableau users. Right-click the data source name at the top of the
Data pane, or use the Data drop-down menu option, and select Publish To Server. You'll be
prompted to log on to Tableau Server. Supply the necessary logon credentials and click
OK. The Publish Data Source To Tableau Server dialog box will appear. Choose the desired
project, name, and other values, and click OK to publish the .tds file to the server. Anyone
who has access to Tableau Server may now use the custom data source by selecting Tableau
Server in the “Ona server” category of the Connect To Data screen, just as they would
select another data source.
Tip You may also save a packaged Tableau Data Source with a .tdsx extension by choosing
the appropriate file extension when saving a data source. Similar to a packaged Tableau
workbook (.twbx), a packaged data source will bundle any local data files, such as text
files and Microsoft Excel or Access files, with the saved data source so that the entire .tdsx
file may be distributed as a stand-alone data connection.
Extracting Data
If you use standard corporate databases, such as Microsoft SQL Server or Oracle, you may
find situations where it’s inconvenient (or impossible) to perform data analysis. The first
potential issue may be poor performance. If the database is very large or has not been fully
optimized by the database designer, real-time analysis with Tableau may be difficult. Or, you
may wish to continue to work with a centralized database when youre away from your office
(perhaps on an airplane) and connection to the database isn’t practical. Also, you may want
to share a workbook with another Tableau user who doesn’t have access to your data source
(perhaps they are outside your organization or don’t have access rights to your corporate
database). Finally, if you wish to provide your workbook to a viewer using the free Tableau
Reader read-only product, you must provide a packaged workbook (.twbx file) that is
entirely self-contained, as Tableau Reader won’t connect to a live data source by design.
These are the types of situations that call for a Data Extract. A Data Extract is a Tableau-
proprietary file that contains the imported contents of another database or data source.
A Tableau Data Extract file (you'll notice the .tde file extension) consists of a very compact,
high-speed, optimized data file. As such, analysis with an extract is typically very, very fast.
Note Some data sources, such as Salesforce.com and Google Analytics, will create extracts
automatically when they are first accessed. This is because these web-based data sources
may perform slowly ifinteracted with natively. Also, frequent web-based data source
interactivity may exceed service limits placed on users by the data source vendor.
Chapter 3: Connecting to Data
Your first opportunity to create an extract is when you initially connect to most data
sources. On the Data Source page, notice the Connection radio buttons on the upper
right
of the page. If you click the Extract radio button, the chosen data source will be extracted
in its entirety when you select a sheet. If you want to specify more granular options for the
extract, click the Edit link next to the Extract radio button. The Create Extract dialog box
will permit you to narrow down your extract to a limited set of data from the underlying
data source.
Tableau - Book2
& eo &
© FactInternetSales+ (AdventureWorksDW2012) ) Live @ Extract | Edj
Edit. i 0 { Add.
Extract will include subset of doth?
Server i s ; = :
lecalhbat FactinternetSales DimProduct DimProductCategor}
FS DimDepartmentGroup 2) 2
£3 DimEmployee
DimG: ProductKey (DimPr...
F DimGeographyh 4 a
E DimOrganization
3 DimProduct
{¥] Aggregate data for visible dimensions
FB DimProductCategory {7 Roll up dates to S|
E DimProductSubcategory
Number of Rows
FF New Custorn SQL A ses
| Inqemental refresh
Stored Procedures ae
) sp_alterdiagram
E) sp_creatediagram
[) sp_dropdiagram
FP en balndionr me Ankimitinn
To create an extract from an existing data source in your workbook, right-click the
desired data source in the top portion of the Data pane and choose Extract Data from the
context menu. You may also use Data |<data source name> |Extract Data from the Tableau
drop-down menu. The Extract Data dialog box appears.
To simply extract all data from your underlying data source, just click OK. But if you
want to narrow down the extract to only include a subset of the original data source’s data,
select various options in this dialog box:
¢ To narrow down your extract to a limited set of data (perhaps only for the past year
or only for your region), add one or more filters. Filters are specified similarly here
as they are in Tableau when dragging a field to the Filters shelf.
58 Tableau 9: The Official Guide
¢ Ifyou check the Aggregate Data For Visible Dimensions box, Tableau will
summarize (or “roll up”) the underlying data based on the dimensions that have
not been hidden. This will reduce the size of the resulting extract file. You may also
choose to roll up dates. If you choose this option, select the level of date detail you
wish to retain in the extract. For example, if you select Month, the underlying data
source will be summarized (“rolled up”) to the month level. Using the extract from
that point will allow you to display dates at the month, quarter, or year level, but not
the week or day level.
e You may choose to extract all rows from the underlying data source (any filters or
roll-ups you specify will still be applied) or select an incremental extract. Checking
Incremental Refresh will permit the extract to be updated at a later time with only
new data that’s been added to the underlying data source. For large extracts, this
may significantly speed up extract updates in the future. Select either a date
dimension or unique numeric ID/key in the underlying data source to base the
incremental refresh on. The next time you refresh the extract from the Data pane
context menu or Data drop-down menu, only rows that contain a date or key later
than that of the last refresh will be imported.
e Ifyou select the Top (or, depending on the data source, Sample) radio buttons, you
may further narrow down to a number or percent of rows from the underlying data
source. This type of extract may be helpful when you wish to use a limited set of
data from the underlying data source for “on the road” or initial development, with
the expectation that you will eventually return to the full underlying data source for
production analysis.
Once you've completed the dialog box, click OK to create the extract. You'll be
prompted for a location to save the Tableau Data Extract (.tde) file. Specify the location
and filename and click Save. The extract file will be created, and any worksheets in the
current workbook using the original underlying data source will be converted to use the
extract (you'll notice a checkmark next to Use Extract on the data connection’s context
menu or the Data drop-down menu and a two-barrel-with-arrow icon next to the data
source in the Data pane).
One of the initial concerns you may have about using an extract is the “disconnection”
from the underlying data source, particularly in terms of currency of data. For example, if
the initial data source is a transactional database that is updated frequently, you may be
concerned that you will now be analyzing on an extract that’s out of date. Tableau provides a
simple way to refresh extracts from the underlying data source to update the extract with new
data. A full refresh will read all data from the underlying data source again with filters and
rolls-ups applied. Although this assures that your extract will fully match the underlying data
source, a full refresh can be time consuming. An incremental refresh (discussed previously)
will only import new records from the underlying data source into the extract. To perform
either kind of refresh, just right-click the data source at the top of the Data pane, or select
Data |<data source name> from the drop-down menus, followed by Extract |Refresh. If you
initially chose to import all rows when the extract was first specified, a full refresh will occur.
If you selected incremental refresh options when the extract was first created, you'll notice
both Incremental and Full refresh options. Choose the type of refresh you wish to perform.
Chapter 3: Connecting to Data 59
Tip Ifyou are using Tableau Server, you are able to store extracts on the server and schedule
automatic refreshes at regular intervals. This powerful feature can often bridge the gap
between currency of data and speed of analysis that extracts sometimes present. More
information on scheduling Tableau Server extract refreshes appears in Chapter 9.
Once you have extracted data, several menu options are enabled to help you maintain
extracts and switch between the original data source and the extract. Right-click the data
source at the top of the Data pane, or choose Data |<data source name> from the drop-
down menu. The first option is to return to the underlying data source by unchecking Use
Extract. You may easily return to the previously generated extract by selecting this option
again. When an extract is being used, the Extract sub-menu provides additional options:
Rename...
Duplicate
Close
‘| Extract Data...
Use Extract ee eek Mats Oi =
|
Edit Aliases... -| A
Optimize
Publish to Server... Remove
Add to Saved Data Sources... | Z
i History... |
__ Properties... ee oe! 4 Properties... _ : di
e Append Data From File You may add data to an existing extract from an external
desktop-type file (Excel, Microsoft Access, text, comma-separated values), as well
as other existing extract files. The column names and data types in the external file
must match those in the extract.
e Append Data From Data Source _If another data source in the same workbook is
similar in structure to the extract (perhaps you originally extracted from a combined
data warehouse but the original transaction database is also connected in your
workbook), you may choose it and add data to the existing extract. Fields/columns
in the second data source must match extract fields, or the second data source won't
be available when you select this option.
e Optimize Ifyou have created any new calculated fields since an extract was
created, this option will evaluate the results of the calculations and write them to
the extract file. This may improve performance with large extracts, as calculated
fields won’t have to be reevaluated “on the fly.’
60 Tableau 9: The Official Guide
e Remove You may remove the extract and return to the underlying data source.
When you choose this option, you'll be provided an additional option to delete or
retain the .tde extract file.
e History Displays a dialog box indicating dates the extract has been refreshed.
e Properties Displays a dialog box providing overall information about the extract,
including location of the extract file, filters used, and so forth.
Bee Best Practice When you initially create an extract based on an existing data source in
an a workbook, Tableau will maintain the relationship between the original data
~~ source and the extract in that workbook. This will permit you to uncheck the Use
Extract option to use the original data source, refresh the extract from the
underlying data source, and so forth. However, ifyou create a new workbook based
only on the resulting .tde file, the relationship to the original data source won’t be
available. You will be unable to switch back and forth between the original data
source and the extract, refresh the extract, and so forth. As such, you may want to
retain the original “master” workbook to permit extract modification later on.
Data Blending
It’s not uncommon to require data from more than one table within a database/data source,
or maybe even more than one database/data source, in a Tableau workbook. Depending on
how your workbook is organized and what analysis requirements you have, there are several
ways of accomplishing this:
e Join multiple tables from the same database, as discussed earlier in the chapter,
and use the joined tables in one or more worksheets in your workbook.
e Create several worksheets, each using various data sources (including joined
tables), and combine the worksheets on a dashboard. The dashboard can provide
links between the worksheets via filters and so forth (creating dashboards is
covered in Chapter 8).
e Tie more than one data source together on a single worksheet using data blending.
This is what this section of the chapter will cover.
In traditional relational database analysis, joining tables from the same database is
a common practice. However, when data needs to be combined from different databases,
complications often arise. Because most database vendors don’t provide easy methods
of combining data from other vendors (if they provide it at all), this task is often left to
the analysis tool itself. Tableau’s approach to this predicament is called data blending.
Chapter 3: Connecting to Data 61
Data blending provides a way to combine data from more than one data source on a single
worksheet. In short, Tableau connects to multiple data sources, sends independent
queries to those data sources, and then combines (or “blends”) the aggregated results of
the independent queries on a single worksheet.
Note It’s important to keep the “independent queries/aggregated results blended” paradigm
in mind when considering whether data blending will work in your environment.
Remember that data blending is not the same as a table join or more common single-
database-combining techniques, such as unions. The key to blending is identifying a
common dimension in both data sources that can be aggregated to.
Despite the somewhat-complex concepts of data blending, it’s very easy to implement.
Consider a fairly common requirement where existing transactional or sales data is contained
in one database and goal data is contained in another. For this example, transactional data is
contained in the “Sample - Superstore” file that is included with Tableau 9. Because Sales
Goal data is absent from this file, a tab-delimited text file has been created that contains goal
data. In order to calculate the variance between actual and goal, as well as display everything
side by side on the same worksheet, data blending must be used.
Consider the chart illustrated in Figure 3-3. This chart, based on transactional data, is
based on a single data source. This data source is considered the primary data source, as it
a
Abe Region i
CC =
ae howe
Abc Ship Mode
® State Cassandra Brandow ea =
Abc Sub-Category +
Measures
*rsGumi
+= Profit
eecosssrce crencow b A
TTT s122.277
$250,633
® Latitude (generoted)
== Number
of Records
Kelty Wiliams. fee | $147,098
+ Meosure Values
50 $50,000 $100,000 $150,000 $200,000 $250.000
Sales
|Map From Clipboard Data Source Unblended Initial Data Source |Unblended nelti
iq Excel Dats -Pivoted - Total 15 Yea... Clipboard Data Source
6 Data Source
16
marks
i 16 rows bylcolumn ~ SUM(Sales): $2,297,201
was the first data source used to generate the worksheet. This is confirmed by the small
blue checkmark that is displayed on the data source name at the top of the Data pane.
However, notice that other data sources also exist in the workbook.
Since more than one data connection can exist in a Tableau workbook, another
connection can be made to the text file containing the quotas, using already covered
approaches. Once the new connection is added, you may view its underlying data to see
that goal records exist for each matching sales rep. However, since a primary data source
has already been used for the existing worksheet, notice the orange line that appears in
the Data pane when the second data source is selected. This indicates that this data
source will become a secondary data source—primary and secondary data sources will
be connected via data blending.
Two other considerations that may not be immediately evident from this example are
mismatched data organization and inconsistent field names. While a single dimension
containing the salesperson value exists in the transactional data source, the text file
breaks salesperson into separate first and last name fields. While this may initially
appear to be a serious issue, data blending can make use of calculated fields. As such, a
combined salesperson calculation has been created in the text file data source
(calculated fields are covered in Chapter 6). Even so, the calculated field name doesn’t
match the related dimension in the primary data sources (Tableau will automatically
create a relationship between identically named fields). Specifically, the dimension
illustrated in Figure 3-3 is named “SalesPerson,’ while the matching calculated field
appearing in the secondary data source is named “Sales Rep Combined Name.” If you
simply try to drag a measure from the secondary data source onto the existing chart
based on the primary data source, this lack of matching dimensions results in an error.
Even though the measure will appear on the chart, it is not properly aggregated to match
up to the primary field.
In order to use fields from Quotas for Blending, a relationship needs to be created
A. with Sample - Superstore, Select Data > Edit Relationships to open the
== Relationships dialog box.
There are two ways to solve this problem. Probably the simplest is to merely rename the
field in either data source to match that of the other. After right-clicking the Sales Rep
Combined Name calculated field in the secondary data source, choosing Rename from the
Chapter3: Connectingto Data 63
pop-up menu and renaming to SalesPerson, examine the Data pane. Note the
orange link
icon next to the field. This indicates that a matching dimension exists in the primary data
source and that this field will be used as the common field between the data sources.
Data | Analytics =
[) Population-No Pivot-No Sp... |*
(_) Population-Pivoted-Split (... —
(Quotas forBlending | =
[Sample - Superstore
Dimensions =k?) ne
;Abc Rep First Name
|Abc Rep Last Name
babe SalesPerson el
;++ Year
}
pAbc Measure Names
BSE
Sa
EER
BESET
AER
Measures
t+ Quota
i Number of Records
+ Measure Values
Tip Jf multiple link icons appear in the secondary data source, more than one field name
matches in the two data sources. “Broken” link icons indicate data-blending candidate
dimensions. Determine which dimension you wish to use to blend, and click the link.
The icon will change to a “closed” link, and that dimension will be used to match to the
other data source.
If, for some reason, you prefer not to rename a dimension in one data source to match
the other, you may specifically tie the two dimensions together by choosing Data |Edit
Relationships from the drop-down menus. This will display the Relationships dialog box.
First, ensure that the proper primary data source is displayed in the first drop-down list.
Then choose the desired secondary data source in the list to the left. If Tableau has
performed any automatic by-field-name matches, you'll see them when the Automatic
radio button is selected. If Tableau has not been able to do a proper match, click the
64 Tableau 9: The Official Guide
Custom radio button, followed by the Add button at the bottom of the dialog box. The
Add/Edit Field Mapping dialog will appear.
Relationships
Relationships determine how data from secondary data sources are joined with primary data sources.
Select the desired dimensions to match in the left and right lists. Click OK to add the
relationship. If you need to add relationships because more fields need to be matched, click
Add however many times you need, and choose additional sets of matched dimensions.
When you have specified all matching dimensions, click OK to close the Relationships
dialog box. The Data pane will return with the orange link icon appearing on the selected
dimension (note that if a blend requires more than one matching dimension, you may
need to click the broken link icon on unblended dimensions to add them to the blend).
Once you have successfully matched the primary and secondary data sources, simply
drag measures from the secondary data source onto the existing visualization. The data
from both data sources will be blended. Figure 3-4 shows the resulting actual-versus-quota
bullet graph (bullet graphs are covered in Chapter 4).
Chapter 3: Connecting to Data 65
w ©=
9 RB & lye ae &- i +h HF Abc [gif- Normal + -M g¢~
3i2 a Show ow M Me
Data Analytics = Pages wee
=e Col
(} Clipboard Pasted From Webpa... Se SUMISsIes}
J Population-No Pivot-No Split (... == Rows #| YEAR(Order Date) aEeaves
(J Population-Pivoted-Split (Col... Filters
[Quotas for Blending Year of Order. Sale
/
|
} Cassandra
Measures Bran
!+ Quota Chuck Magee BntesPacson
r Number of Records
Kelly Wiliams
eee 3 $93,539
}
i
2014 Anne ances EE U0%3 $100,000
neliiaieintieennnenentneimemnmenemtaneiien
Cassandra
Brandow
i
| |
i so $50,000 $100,000 $150,000 $200,000 $250,000 $300,000
i Sales
0 Data Source i DataSource Map From Clipboard Data Source =Unblended Initial Data Source Unblended Related Data Source Blended Primary/Secondag tn & fo
Data blending can sometimes introduce data mismatches when dimension members
that exist in one data source aren’t matched in the other. By convention (and you are
unable to change this), Tableau performs the equivalent of a left join between primary and
secondary data sources. The example illustrated in Figure 3-4 shows this, in that all years
show an actual “sales” bar, but 2011 shows no quota reference lines (there are no quotas for
2011 in the text file). You'll also notice no data at all for Preston Richards, even though he
has quota records in the text file for 2013 and 2014. This is because there is no sales data for
Preston Richards in the primary data source.
If, however, the quota text file is used first in a worksheet (it will show a blue checkmark
in the Data pane, indicating it is now the primary data source), a blend to the secondary
sales data source will result in different results. Figure 3-5 illustrates this. Notice that 2011
sales doesn’t appear on the chart, as there are no 2011 quota data in the primary data
source. And Preston Richards shows a quota for both 2013 and 2014 with no matching sales
(the missing sales figures for the two years result in the null indicator at the lower right).
In this type of scenario, you may need to create a third “driver” data source (perhaps
copying data to the Clipboard or creating a small Excel workbook) that includes all possible
66 Tableau 9: The Official Guide
% € 2M & ly- @a- &- 3 RAF oo- Abe [gif Normal + MW 4° TJ ilsShowMe
seis Pages 1) Columns ‘SUMGales} &
{|} Clipboard Pasted From Webpa... -
in| Population-No Pivat-No Split (... | = Rows Year Sales Rep Combined Na...
~} Population-Pivoted-Split (Col... | Fj
to aaah = = RS Year Sales Rep Combined N
ut
| @ Sample - Superstore
Dimensions = Cassancre Brandow |
c Rep First Name Marks
Rep Last Name tn] Automatic
Sales Rep Combined Name
Year 2,
aw
Measure Names Color | | Size
Detail ||Tooltip
Chuck Magee
SUM(Quota)
Kelly Withams
Preston Richards
Measures
+ Quota Anna Andresai
=3+ Numberof Records
I Cassandra
Cassandra Brandow
# Measure Values
Chuck Wagee
Kelly Withers
Preston Richards
Oo Data Source kripboaa DataSource © Unblended Initial Data Source Unblended Related Data Source Blended Initial To Related Blended Related to initia|ti & fo
combinations of dimensions. Add this to your Tableau worksheet as the primary data
source, and then blend to the two additional secondary data sources to return all
combinations from the two secondary sources.
Tip Not only can you resolve data-blending dimension name mismatches by just renaming
a field in the Data pane, but you can resolve dimension member mismatches by editing a
member's alias. For example, ifyou are blending on state and one data source returns
Colorado while the other returns CO, just right-click the incorrect member name in the
worksheet header and choose Edit Alias from the context menu. Change the member
name to match the other data source. The two data sources will then properly blend.
But, in others, the test database may be a desktop system, such as Microsoft Access, with
the
production database being SQL Server. Regardless of the underlying types of data sources,
Tableau makes it easy to migrate a workbook from one data source to another,
Consider this Data pane based on a Microsoft Access “test” database. In particular, it’s
significant to note that the current worksheet is using the Country dimension and Order
Amount measure.
Data Analytics *
[% Orders+ (xtreme)
Dimensions He Dv
Abc Address2 a
Abc City
Abc Contact FirstName |
Abe Contact
Last Name |=
Abc Contact Position 3
Abc Contact Title
® Country 3
+¢ CustomerID (Custe...
Abc Customer Name
Abc E-mail
Abc Fax <
Measures
4 & (Customer
4+¢ Customer Credit ID
++ Last Year's Sales
4 6 Orders
# OrderAmount
@® Latitude (generated)
® Longitude (generated)
=4¢ Numberof Records
+ =Measure Values
For this example, assume that a “production” database exists on SQL Server. The first
requirement is to connect to the SQL Server as you would any other data connection. Add
and join any necessary tables. When complete, the SQL Server data source will appear in
the Data pane. Then right-click either of the data sources at the top of the Data pane, or
choose the Data drop-down menu and select Replace Data Source. The Replace Data
Source dialog box will appear, showing drop-down lists where you may choose the existing
(test) data source and the data source you wish to replace it with (production). Choose the
desired data sources and click OK.
Cx)
68 Tableau 9: The Official Guide
All worksheets in your workbook that were using the original test data source will now
be directed to the new production data source. Provided all field names in the new data
source match the original data source, all worksheets will immediately reflect the new data
source. However, if field names aren’t identical, portions of your visualization may be
dimmed and an “invalid” icon (an exclamation point) may appear on any fields that aren’t
found in the new data source.
Bar Chart
Despite all the visualization possibilities and the plethora of tools to create charts and
graphs, the basic bar chart is still probably used more than any other type. This is very
useful for comparing many different types of measures, including dollars, quantities,
number of phone calls, web page hits, and so forth.
In many cases, leaving the mark type on the Marks card set to Automatic will result in a
bar chart (charts based on date/time dimensions being a notable exception). Just drag your
desired dimension to the Columns shelf and your desired measure to the Rows shelf to
create a vertical bar chart (you may also double-click a measure first, then double-click a
non-date/time dimension for the same results). If you want to change another chart type to
bar (for example, if the default line chart for a date/time dimension isn’t what you want),
select Bar in the Mark Type drop-down on the Marks card.
69
70 Tableau 9: The Official Guide
Tip Although you can redrag dimensions and measures to different shelves to change from a
horizontal to vertical bar chart, try using the Swap button in the toolbar instead.
You can enhance a basic bar chart using any number of Tableau features. To create a
stacked bar chart, where each bar is broken down by portions of another dimension, drag
the second dimension to Color on the Marks card (this is illustrated in Figure 4-1). Or you
can create a graduated-color bar chart, where each bar is shaded with a variation of a color
range based on a different measure. Drag the desired measure to Color on the Marks card.
You can even create some interesting variations of a bar chart by utilizing both Color and
Size on the Marks card, as well as unstacking bars by choosing Analysis |Stack Marks |Off
from the drop-down menu. This results in two bars appearing on top of each other, but
with a different size and color.
Pages =
+ Columns Region
= Rows SUMi{Sales) :
Filters Region
$700,000
Marks
{
$500,000
|Detail | {Tooltip
& Segment
Segment
i | Consumer
$300,000
BB Comorate
& Home Office
$200,000
$100,000
$o
Central East South West
=e Best Practice Ifyou are charting a single dimension, you may be tempted to add the
$3
on same dimension the chart is based on to Color on the Marks card to assign each bar
a different color. Reconsider this. The different colors may not benefit your audience
and may actually confuse them. Ask yourself which is a more effective, less
confusing, visualization.
Line/Area Chart
Another popular chart, the line chart, shows a trend over time. For example, sales plotted
for the past 12 months or number of web hits by time of day benefit from a line chart. If you
initially add a date or date/time dimension to the Rows or Columns shelf and a measure to
the other shelf, a line chart trending the measure over time will result. (Though a line chart
will be created either way, vertical line charts based on a dimension on the Rows shelf may
be of limited use.)
As with other chart types, a basic line chart can expand with placements on Color on
the Marks card. If you place another dimension on Color, a different colored line will
appear for each member of the dimension. Alternatively, if you add a different measure to
Color, the existing line will take on a graduated color indicating the variation of the
measure placed on Color. Although you can also place measures or dimensions on Size on
the Marks card, you may find the results to be more confusing than useful with a line chart.
=
.== Best Practice It’s easy to convert a chart initially created as bar to line or area. Just
“3887 choose Line or Area from the drop-down on the Marks card. This is helpful ifyou
have a dimension that Tableau doesn’t automatically determine to be a date/time
dimension but that still can be used to show a trend.
A variation on the line chart is the area chart. Like a line chart, an area chart is best
used to trend data over time. However, rather than just showing a single line to represent
the path of the trend, the area chart fills in the entire portion of the chart from the bottom of
the chart with a shaded color. This often results in a “mountain range” look. Simply select
Area from the drop-down on the Marks card to create an area chart.
Like line charts, area charts can be enhanced by dragging a dimension to Color on the
Marks card (using a measure on Color will have no usable benefit). This will create a
stacked area chart with each member of the dimension placed on Color creating a separate
colored stacked area (this is illustrated in Figure 4-2).
72 Tableau 9: The Official Guide
== Rows SUM(Sales)
$350,000
Marks
addsea ¥ $300,000
=i
& | 925
Color Size Label | $250.000
Detail |Tooltip
——= aie $200,000
& © YEAR(Order Da.. q
Sales
$50,000
A variation of an area chart is an unstacked area chart. Create this by dragging a desired
dimension (with a minimal number of members) to Color on the Marks card. Initially,
youll see a stacked area chart. Then select Analysis |Stack Marks |Off from the drop-down
menu. The areas that were previously stacked will now overlap each other, and Tableau will
change the colors to make them easier to distinguish. This may not always be desirable.
Even though Tableau displays the color dimension with transparency, it’s still easy to miss
certain valleys in the “mountain range” if other peaks occlude them.
|
|
|
Order Date
$350,000
$150,000
$100,000
$50,000
$0
e It displays 12 marks (points connecting the lines), one for each of the 12 months
of the year. This is regardless of how many years of data are actually contained in
the underlying data source—multiple years are rolled up month by month.
e The Order Date field appears on the Columns shelf at the month level and is
colored a pastel blue.
(continued)
74 Tableau 9: The Official Guide
| e Order Date was dragged to Columns, which initially rolled up the date to the
| year level. Then, the plus sign was clicked to navigate to the next level in the
date hierarchy: quarter. And then the plus sign was clicked again to navigate to
month. Then, the year and quarter fields were dragged off the Columns shelf,
leaving only the month level.
Or
e After the initial year level field was dragged to the Columns shelf, the context
menu was chosen on the field (with right-click—CONTROL-click on Mac—or
the drop-down arrow), and the first occurrence of Month (May) was chosen
| from the context menu.
F Sort... |
Format... |
| Y ~ Show Header
|Y Include in Tooltip |
| Year 2015 |
Quarter Q2 |
| © Month May ||
| |
| baby 8 |
| More 4
Year AOS
Quarter Q2 2015
Month May 2015
Week Number Week 5, 2015
Day May 8, 2015
More r
Exact Date
Attribute
Measure r
© Discrete
Continuous
Edit in Shelf
Remove
Chapter 4: Top 10 Chart Types 75
$100,000
$80,000
$60,000
Sales
$40,000
$20,000
$0
= _ is] nN ise] ” wT
=I 5 5 5 5S & 5
“ vg mM “4 ou “ tr
a 2 os g a 2 a
= £ = E = E =
$ 2 2
2010
Novem
ber 8 8 2 Novem
ber
2014
Month of Order Date
e Considering that there are four full years of data in the underlying data source,
there are 48 marks rather than 12, one for each month/year combination.
e The Order Date field on the Columns shelf is still at the month level, but is
now colored a pastel green.
(continued) i
76 Tableau 9: The Official Guide
The one change that results in the second variation comes from the field’s context
|
menu on the Columns shelf. Rather than choosing the first Month (May) option, the
second Month (May 2015) choice was made.
Filter...
Format...
|
| ~ Show Header
| ¥ Include
in Tooltip
Year 2015 }
Quarter Q2
Month flay
Day 8 |
| More »
Year 2015 |
Quarter Q2 2015
© Month May 2015
Week Number Week 5, 2015
Day May 8, 2015 |
More » |
Exact Date
Attribute
Measure r
Discrete
© Continuous
Edit
im Shelf
Remove
These two charts, while displaying the same underlying data, analyze it in a starkly
different fashion. The choice you make will determine whether you see data for any
number of years rolled up by month, with only one mark appearing for a month, or
displayed across time from one month to the next, over several years. Tableau refers to
the different treatment of these dates as “discrete versus continuous.”
Discrete dates are treated as date “buckets” —regardless of the amount of
underlying data, dates are rolled up to the specific level chosen, with only one mark
appearing for each “bucket” of data. Continuous dates appear continuously, from
beginning to end, spanning the entire data set, with a new mark appearing at each
occurrence of the date level chosen. Discrete or continuous date treatment may be
chosen for any date level, such as month, quarter, day of week, and so forth. And very
different analyses will result based on your choice.
Chapter 4: Top 10 Chart Types
| So, while your initial impression of Tableau may have been that dimensions were __
__ highlighted in pastel blue and measures were highlighted in pastel green (look on
shelves, cards, and icons in the Dimensions and Measures portions of the Data pane),
in actuality, discrete values are displayed with pastel blue and continuous values are
displayed with pastel green. Although most dimensions and measures, even if not date
| related, can be treated either as discrete or continuous values, you rarely need to make
this choice or distinction. Tableau will make the choice for you, and things will |
typically (but not always) behave as expected. However, dates are a broad exception, in _
that they may be treated either way. The choice you make will determine how your |
date analysis is broken down. |
Tip Ifyou already know the date level (month, quarter, and so forth) you wish to
use and have determined whether you want to analyze discretely or
continuously, use the right-click drag approach (option-drag on Mac). Right-
click the desired date dimension, and while holding the mouse button down,
drop the dimension on the desired shelf or card. When you release the mouse
button, a Drop Field menu will appear. Choose the desired discrete date option
from the pastel blue icon choices at the top of the dialog, or choose the desired
continuous date option from the pastel green icon choices at the bottom.
DropField
oees
Ho YEAR(Order Date)
te QUARTER (Order Date) |
+ MONTH(Order Date)
+ DAY(Order Date)
4 WEEK(Order Date)
oa WEEKDAY (Order Date) |
af My (Order Date)
Bra MDY (Order Date)
He CNT(Order Date)
ae CNTD(Order Date)
ia MIN(Order Date)
i MAX(Order Date)
see a,
Pie Chart
Although some authorities in visual design decry them (preferring, for example, stacked
bar charts), pie charts remain a fixture of the visualization world. They are used to show a
single measure for a smaller number of dimension members (probably not more than six
or eight) to illustrate what “piece of the pie” each member has. Tableau provides the ability
to populate a worksheet with a single pie chart, with multiple pie charts organized for
different combinations of dimensions or measures, and even as a chosen mark type for
other types of visualizations, such as maps.
To create a pie chart worksheet, choose Pie from the drop-down on the Marks card.
Then drag the measure you want the pie to represent onto Angle on the Marks card (Angle
will only appear after you choose a Pie mark type). Finally, drag the dimension that you
want to use to create pie wedges to Color on the Marks card (again, the dimension should
have no more than six to eight members to avoid creating too many pie wedges).
Tip To add a percentage label to each pie wedge, drag the same measure used on Angle on
the Marks card to Label on the Marks card. Then choose Analysis |Percentage Of Cell Or
Analysis |Percentage Of Table from the drop-down menu. Tableau allows multiple items
to be included on mark labels. For example, you can also drag the dimension used to set
pie colors onto Label on the Marks card, along with the measure to show both the
percentage and dimension at the same time.
Pages “ Columns
#= Rows
Filters
Marks
® Pie y
= : > 31.58%
| @/| Ci 435 | West
|Color| | Size | | Label
& Region
P —SUM(Sales} A
3) SUMGales) A
55 Region
Multiple pie charts can be created by just dragging a dimension you’d like to subdivide
by onto the Rows or Columns shelf. Be careful, however, as multiple pies can quickly
become difficult to interpret. Consider stacked bar charts or other easier-to-interpret chart
types if you find that multiple pie charts are difficult to understand. In the case of a multiple-
row or multiple-column pie, another measure placed on Size on the Marks card will change
Chapter 4: Top 10 Chart Types
the relative size of each overall pie chart, while the measure on Angle will determine the size
of each wedge of an individual pie chart.
Tableau also features the ability to choose the Pie mark type on other visualizations.
One example is using a pie on a map. A Pie mark type can add context to a map that would
otherwise just show a single circle for a state or country. After creating the map, change the
Automatic mark type to Pie from the drop-down on the Marks card. Then drag a dimension
onto Color on the Marks card to divide into pie wedges (the fewer dimension members, the
better). The result will be individual pie charts on each country, state, or other geographic
dimension used to create the map. Again, another measure placed on Size will vary the size
of each pie chart on the map.
Filters
= Pie 4
elf oll es 9 2 8
Color} |Size | |Label ;
Detail | ltoottip| Angle % e @ 9 & @ &
ee— eer
Text Table/Crosstab
One of the original applications that made personal computers popular was the spreadsheet
program. Decades later, spreadsheets are still used widely in all aspects of virtually iets
as
type of organization. Even after the introduction of leading-edge visualization tools such
still often used when analyzing at
Tableau, numbers organized in rows and columns are
For these requirements, Tableau provides the text table or crosstab (with the term crossta
being used for the remainder of this chapter).
80 Tableau 9: The Official Guide
Like a spreadsheet, Tableau displays rows and columns of numbers, with one or more
dimensions appearing on the Rows and Columns shelves, and one or more measures
appearing on Text on the Marks card. In fact, a crosstab is created automatically using
Tableau’s default double-click behavior if one or more dimensions are initially double-
clicked and a subsequent measure is double-clicked. You can also drag dimensions to the
Rows and Columns shelves, and then drag a measure to Text on the Marks card. If you
include more than one dimension on the Rows or Columns shelf, a hierarchy of “panes”
will be created showing the second dimension organization within the first dimension
(make sure the dimensions have a logical hierarchical relationship if you do this).
In the case of a crosstab based on more than one dimension on a shelf, you may want to
show subtotals on the crosstab at the end of each outer dimension. Even if you don’t use
multiple dimensions, you may want to see grand totals for rows or columns in the crosstab.
Options from the Analysis |Totals drop-down menu will add these totals.
“Show Marktabels
| ¥ Aggregate Measures
Stack Marks y
View Data...
Reveal Hidden Data
Percentage of r |
Note The Totals option from the Analysis menu, while probably most appropriate for
crosstabs, can be used with other visualization types. Just be careful ifyou use totals
beyond crosstabs. For example, a total bar at the end of a bar chart may introduce
confusion when trying to compare individual value bars while a total bar appears in
the same chart.
By default, a crosstab will display measures on the Text shelf in black. As with spreadsheet
programs, certain numbers may need to stand out based on their value. Tableau facilitates
this by allowing another measure or dimension to be placed on Color on the Marks card. Ifa
measure is placed on Color, the range of measure values will create a color range that will
automatically color-code cells in the crosstab (typically a graduated color palette will result).
A dimension (or perhaps a calculated field that returns only two values) can also be placed on
Color to create a more stark “this color or this color” coding for the crosstab.
Chapter 4: Top 10 Chart Types
Tip Crosstabs are particularly useful for “just show me the numbers” types of user requests. Not
only can you quickly “just show the numbers” when designing a workbook, crosstabs also
provide drill-down capabilities in dashboards. By adding a crosstab to a dashboard with
filter actions, you can show related numbers when a user clicks a particular dimension in
another portion of the dashboard. Filter actions are covered in more detail in Chapter 8.
Scatter Plot
Although more esoteric than many of the standard chart types discussed in this chapter so
far, the scatter plot can provide very meaningful visualization of two related numeric
measures. There are, generally speaking, two different analyses that scatter plots help
consider: comparison/correlation of the two measures, and concentration of data/existence
of outliers. In most cases, one or more related dimensions are also used in a scatter plot.
For example, a scatter plot may be ideal in looking for correlation between the number
of web ads placed and number of hits to your website, with further analysis on dimension
data, such as where the web ad was placed, the day the ad ran, or known demographics of
the person who visited your website. Or your candidate may want to see if the number of
outgoing phone calls asking for campaign contributions can be correlated to the number
of contributors or the amount of contributions. Certain outliers, such as a few contributors
who contributed large amounts, will stand out on a scatter plot, allowing for targeted analysis.
A particular scatter plot example that may be close to home if you've compared other
business intelligence (BI) tools to Tableau is the BI Magic Quadrant issued by Gartner. This
scatter plot evaluates BI vendors by two measures: completeness of vision and ability to
execute. While not all scatter plots share the Magic Quadrant’s “both farther to the right
and farther up is better” approach, many scatter plots make analysis easy by automatically
indicating preference to higher or lower areas on either or both axes.
A scatter plot in Tableau begins with numeric measures placed on both the Rows and
Columns shelves. You can either drag them there individually or simply double-click one
measure after the other, with the first measure becoming the row and the second the
column. Initially, this will simply place one mark (a blue open circle) on the scatter plot
indicating where the aggregation of both measures appears. While this may be somewhat
82 Tableau 9: The Official Guide
helpful for a very quick analysis of how the measures relate, you'll typically want to place
additional dimensions “in the mix” to make the scatter plot more useful.
Tip Ifyou initially add measures to the wrong shelves, you can undo the addition or
manually move them to the proper shelves. But you may find it faster to crri-click both
measure fields on the Rows and Columns shelves to select them. Then right-click and
choose Swap from the context menu, or just click the toolbar Swap button.
Dimensions (or other measures that help broaden scatter plot analysis) can be added to
additional areas of the Marks card. For example, to simply add more blue open circles for
every member of a desired dimension, drag the dimension to Detail. Although you can
change the shape from the default open circle to another shape by choosing a different
mark type from the Marks card drop-down, you may prefer to have different shapes appear
for different members of a desired dimension. Just drag that dimension to Shape. You can
have different colors appear for different dimension members or measure ranges by
dragging the desired dimension or measure to Color. Marks can be sized by dragging a
dimension or measure to Size. Figure 4-3 shows an example of the effects of these different
Marks card options.
Since scatter plots display a mark for every combination of dimensions added to the
worksheet, they can quickly become busy with different combinations of marks. In some
cases, you may want to show an even denser series of marks if you choose to use a scatter
plot to deduce broader generalizations rather than correlations for a smaller number of
marks. In that case, you may want to disaggregate data, which will retrieve individual
values from the underlying data source instead of aggregated sums, averages, and so forth
(which Tableau provides by default). To disaggregate, uncheck Analysis |Aggregate
Measures from the drop-down menu. You may need to add filters (covered in detail in
Chapter 5) to reduce the large number of marks that can result from disaggregation.
Hovering your mouse over an individual mark on a disaggregated scatter plot may be of
limited use, as no dimension information will appear for the individual mark. Drag desired
dimensions to Detail or Tooltip on the Marks card to include that dimension on the tooltip
that appears when you hover over a mark.
While not required, trend lines generally add interpretive value to a scatter plot. Just
click the Analytics tab to display the Analytics pane and double-click the Trend Line option
in the Model box (or drag it to the chart to choose the type of trend line to display). You can
also right-click the visualization and choose Trend Lines from the context menu, or choose
Analysis |Trend Lines |Show Trend Lines from the drop-down menus (trend lines are
covered in more detail in Chapter 6).
And although annotations are available for any visualization type, they come in
particularly handy for scatter plots. Add annotations by right-clicking the workspace and
choosing Annotate from the context menu. A mark annotation will add text and an arrow
pointing to a particular mark (a unique combination of measures and dimensions) on the
plot. If that particular mark later moves elsewhere on the scatter plot or is eliminated via a
filter, the associated annotation will either move or disappear. A point annotation will add
text and an arrow pointing to a specific x/y coordinate on the scatter plot whether a mark
Chapter 4: Top 10 Chart Types
Rows SUM(Profit)
Filters
xt Automatic ~ $15,000
@
Cotor
ilo
Size
|{%
Label
& Category
x* Region
© SUM(Discount)
Sub-Category Profit
Region =
oO Central >
OG East
+ South
x West
ce, i a) aa
B Fumiture
bat Technology
annan Tables are losing too much
-$10,000 a Profit in the East. How to fix?
a
Figure 4-3 Scatter plot with Marks card features, trend line, and annotations
appears there or not. As the scatter plot’s axes change with variations in data or filters, the
annotation will follow the original x/y coordinate. An area annotation, like a point
annotation, will add text to a particular x/y coordinate. However, rather than displaying an
arrow, an area annotation will draw a rounded box containing the text. You can resize the
box to set not only the originating x/y coordinate for the annotation, but the width and
height of the annotation as well. Like a point annotation, the area annotation will move as
the underlying data changes the dimensions of the scatter plot.
Best Practice Effective scatter plots include either a small enough number of marks
"s following a general trend to draw quick conclusions about the individual
dimensions or a large concentration of marks (perhaps due to disaggregation) to
draw general conclusions.
84 Tableau 9: The Official Guide
An effective variation of many Tableau chart types (scatter plots being a particularly good
example) is commonly known as a small multiples visualization. Small multiples make use
of one or more dimensions added to the Rows and/or Columns shelf that result in multiple
scatter plots on one or more rows or columns. This allows not only individual conclusions
to be drawn from individual scatter plot analysis, but comparisons to other dimension
members with identical scatter plots. Best practice dictates that the individual scatter plots
display either a small enough number of marks to be easily interpreted at first glance, or a
large number of marks (perhaps via disaggregated data) to draw general conclusions at a
quick glance.
Order Date
Category 2012 2013 2014
$5,000
Furniture
Profit
$5,000
Office Supplies
Profit 30
-$5,000
$5,000
, Technology
Profit $0
-$5,000
$0 $5,000 $10,000 $15,000 $0 $5,000 $10,000 $15,000 ($0 $5,000 $10,000 $15,000
Sales Sales Sales
Bubble Chart
Tableau can create two variations of a chart designed to visualize a comparison of size and
color of a numeric measure. By displaying varying sizes and colors in filled circles, the
bubble chart leads to quick comparison and correlation of the chosen metric, One Tableau
bubble chart is a variation on the scatter plot (discussed previously). Although this bubble
Chapter 4: Top 10 Chart Types 85
chart variation still plots marks on two numeric axes to exhibit a height/width correlation
between values, there are several differences between a bubble chart and scatter plot:
¢ Marks are designated as filled circles. No other mark types or shapes are used.
e Mark size is increased significantly over a scatter plot to display large circles
(hence, the term “bubble chart”).
¢ Smaller numbers of marks are often preferred over the larger mark counts of scatter
plots. Because of the larger mark type, a bubble chart starts to lose effectiveness
with more than 20 to 25 bubbles. You will probably not disaggregate data with a
bubble chart.
To create this form of bubble chart, place measures on the Rows and Columns shelves
(double-clicking one measure after the other will automatically place them on the Row and
Column shelves, respectively). Choose a circle mark type from the drop-down on the Marks
card. Click Size on the Marks card to display the size slider. Size the filled circle to a
substantially larger size than the default. Add the dimension whose members you want to
create bubbles for to Label on the Marks card. Since this may cause “label overkill” by
showing labels on too many marks, click Label and choose Selected to only display a label
on a mark when it is clicked. Finally, either crRL-drag (COMMAND-drag on Mac) measures
you used on Rows and Columns to duplicate them on Size (and, optionally, Color), or drag
additional dimensions or measures to set the size (and, optionally, color) of the bubbles
according to your needs.
$= Rows SUM(Profit)
Filters
$60,000
Marks $50,000
© Circle oo
f @q |{ Abe | $40,000
Bt eines Soe
| Color || Size | Label |
| Detail | |Tooltip}
{3§ Sub-Category
& —SUM(Profit) E Storage
Cl SUM(Sales)
$10,000
SUM(Profit)
Se so
$17,725 $55,818
SUM(Sales)
9 $3,024 -$10,000
f } $100,000
} $200,000
} $330,007 -$20,000
The second type of bubble chart doesn’t show a height/width correlation between two
measures, but instead just clusters bubbles together, denoting the difference between
values based on size and, optionally, color. Show Me offers this choice (choose Packed
Bubbles), or you can create it manually.
If you choose to create it manually, begin by choosing Circle in the drop-down on the
Marks card. Then add the dimension whose members you want to create bubbles for to
Label on the Marks card. Tableau will create a set of identically sized blue bubbles for
each dimension member. Finally, drag desired an additional measure to Size (and,
optionally, a measure or dimension to Color) on the Marks card to vary the size and color
of bubbles as desired.
Here, as in the previous example of a modified scatter plot, bubbles are sized based on
sales and colored based on profit. It’s fairly easy to compare sales and profit, noting
categories that sell similarly (with similar-sized bubbles) but that are far different profit-
wise (very different coloring).
Pages i) Columns
1= Rows
Filters
Marks
© Circle “ss
Phones
——— ae. Aw
@®); Ol) |
Color | Size | | Label |
{35 Sub-Category
Accessories
SUM@rofit)
$17,725 $55,618
i
ee
Bullet Graph
A common requirement in visualization is to compare two measures. Often, those two
measures are an actual number and a target or goal. Depending on other elements of the
comparison, a bar chart (sales versus quota by salesperson) or line chart (sales by month
Chapter 4: Top 10 Chart Types 87
compared to monthly goal) may suffice. However, Tableau includes another option that
provides an effective comparison method that takes up a minimal amount of space. The
bullet graph was created by visualization author and lecturer Stephen Few to provide just
such an “actual to target” visualization.
The basic portion of a bullet graph is a bar chart (typically, a horizontal bar chart),
which denotes the actual or base measure for comparison. Each bar is then paired with a
reference line, which denotes the goal or target. The compact combination of bars and
reference lines not only allows a quick comparison of the actual values to each other, but a
quick determination of how actual value bars compare to target reference lines. The bullet
graph even provides for good comparison of goals/targets by allowing, at a glance,
analysis of relative positions of the reference lines. An optional portion of a bullet chart is
a reference distribution, which shows a shaded area extending above and below the
actual bar to indicate relative comparison of the actual measure to the goal or target.
Note More detail on reference lines and reference distributions can be found in Chapter 6.
Because several steps are required to create a bullet graph from scratch, you may prefer
to use the Bullet Graph option in Show Me. Simply select the actual measure, the goal/
target measure, and the desired dimension in the Data pane. Then click the Bullet Graph
option in the Show Me dialog box. Note that Show Me may reverse assignment of the actual
and goal/target measures to the proper bar/reference line locations. Tableau provides a
quick shortcut to fix this issue. Just right-click the axis for the incorrect measure and choose
Swap Reference Line Fields.
Select Marks
Synchronize Axis
Format...
¥ Show Header
If you want to create a bullet graph from scratch or modify some aspect of the one
created by Show Me, make use of these Tableau features:
* The dimension used to create individual bars is placed on the Rows shelf (or Columns
shelf, if you prefer to create a vertical bullet graph).
¢ The actual measure is placed on the Columns shelf (or Rows shelf, if you prefer to
create a vertical bullet graph).
The target/goal measure is placed on Detail on the Marks card (in order for reference
).
lines/distributions to make use of the target/goal, it must be in use on the worksheet
88 Tableau 9: The Official Guide
e Areference line is created from the Analytics pane or right-click context menu of
the worksheet’s axis. Line is chosen, per cell, showing the average of the goal/
target measure, with Label set to None, and a black line color.
Scope
©) Entire Table ©) Per Pane ©) Per Cell
i
Value: AVG(Goal) v Average v
Label: None ie
Formatting
Line:
e Ifa “range of performance” distribution band is desired, another reference line can
be created from the Analytics pane or right-click context menu of the worksheet’s
axis. Distribution is chosen per cell showing 60%, 80% of the average of the goal/
target measure, with Label set to None, and with Fill Above and Fill Below checked.
Computation,
Value: 60%,80% of Average Avg, Goal a _
Label; None Ke
Fornatting <_<
e Ifthe distribution band is difficult to see, the size of the bar can be reduced by clicking
Size on the Marks card and moving the slider to the midpoint.
e Optionally, another dimension or calculated field can be applied to Color on the
Marks card to denote actual values that are above and below the goal/target.
Ki Leverling Suyama
B Goal
Goal Sales
FUnder/OverGoal 3
ps
| under
aT PS SIG IER GIP SEP I MSA SSS ESS ESTED SBS DE TE ST STE TSE RI SI OE EEL NATE OTE LEE TLL
Box Plot
Although it may not be found as frequently as bar, line, and pie charts, the box plot is a very
useful visualization when circumstances demanzd it. Introduced in the mid-1970s by the
statistician John Tukey, the box plot excels at displaying the distribution of data over a range.
You can easily determine where the heaviest concentration of data elements is in the range,
and optionally, you can easily identify outliers using whiskers (small lines that identify where
outliers exist). There are two broad ways of creating a box plot: using Show Me, or creating a
box plot manually with one or two reference distribution options.
To use Show Me, simply select the measures and dimensions you wish to chart. Selecting
more than one dimension will create multiple columns, with one dimension aggregated
within the other dimensions’ columns. Multiple measures will create multiple rows, one for
each measure. Then display Show Me and select the Box Plot icon. Tableau will create a chart
using a circle mark type and box plot reference distribution. Figure 4-5 shows an example
with aggregated profit plotted as sub-category circles within category columns.
ili, Show Me i
p ages as | | 123 123) |. wees ¥9 [1272 | F
Columns Category | 5233 naa} fs) |i
== Rows SUM(Profit) | _e € |
i
Filters Category |
| / || I | J al |j
$60,000 ~ Hin h id :
| (aie|} IYQa}
(Se! [eseel
fe 896
|
Marks $50,000 | VOR & :
© Circle >
| 7s | { abc a 1 |
| & Oo 123 $40,000 ae | v1 |
Color | | Size Label iso ni st |
ee Se | pee (gy @a| |
Detail | Tooltip
= jus =~ Ose |
oes
Te | 7am
$30,000 | For box-and-whisker plot
:
Sub-Category Ad
| Qormore dimensions f
Pe ee }| lor more measures
ge
ia a S | Use at least1 dimens
= eas dimension of
8
$10,000
®
$0
-$10,000:
-$20,000
-$2,000
-$4,000
-$6,000
You may also create a box plot manually, typically using a circle mark type (but,
theoretically, any mark type that provides a usable chart within visual best practices). You
may choose to disaggregate data to display a larger number of marks for better distribution
analysis. Then, you may apply a box plot reference distribution from the Analytics pane or
by adding a reference line from the axis right-click context menu.
TSE
oe
*+
ee
CR
Tip Another option to create a box plot manually is to add both a reference band and
reference distribution to an existing chart rather than a box plot distribution. Although
this involves more manual effort, you can fulfill more specific box plot requirements,
such as setting whiskers at specific percentile locations, such as 9th and 91st, or 2nd
and 98th.
Chapter 4: Top 10 Chart Types 93
a | ii]
mj| _ Box Plot
Computation
Label: None
Formatting
LS [5 Fill Above
Fill: None [7] Fill Below
{-] Symmetric
Tree Map
When faced with identifying the folders that resulted in a full hard disk in 1990, Ben
Shneiderman of the University of Maryland began experimenting with a way of visualizing
which folders were using up space. Rather than the typical folder/subfolder tree view that
is still often used to decode hard disk contents, Shneiderman looked for a more compact
way to evaluate hard disk space usage. The tree map was born. Despite its origin, it’s useful
for many other constrained-space visualization requirements. Tableau provides a Tree Map
option on Show Me, and permits manual creation of tree maps as well.
A tree map is designed to display hierarchical data as rectangles within rectangles. For
each rectangle, two measures can be coded—one will affect the size of a rectangle, and the
other will affect color. If a single dimension is used, all dimension members will appear
size- and color-encoded together. However, if more than one dimension is used (there
should be a logical hierarchy between the dimensions, such as State and City), rectangles
will be grouped together by the higher-level dimension, with the overall size of the
higher-level group of rectangles encoded by a measure. The resulting tree map can display
a large number of dimension members in a relatively small space. A particular rectangle
whose color/size combination interests the viewer can be hovered over to show a more
detailed tooltip.
94 = Tableau 9: The Official Guide
If you want to modify a tree map created with Show Me, or create your own, the steps
are straightforward:
1. Choose Square as the mark type from the Marks card drop-down (although, if you
initially build the tree map without placing anything on the Rows or Columns shelf,
you may leave the mark type set to Automatic).
2. Drag one or more dimensions whose members you want to create rectangles for to
Label on the Marks card. Ensure that the higher-level dimension appears first
(either drag it first or reorder dimensions on the Marks card).
3. Drag the measure you want to size-encode rectangles with to Size on the Marks card.
4. Optionally, drag the dimension or measure you want to color-code rectangles with
to Color on the Marks card.
== Rows
Filters
Marks
e® Automatic == ¥
| @i| O || i |
Color || Size || Label
|Detail||Tooltip|
3 |SUM(Sales)
& SUM@rofit)
{35 Region
3S State
Word Cloud
The word cloud (sometimes also referred to as a tag cloud) displays members of a chosen
dimension as text, but in varying sizes and colors, depending on one or two measures.
A common example of word cloud usage is analyzing the effectiveness of search engine
keywords in website visit metrics, or showing the relative popularity of trending social
media terms.
The word cloud visualization is not available in Show Me. To create it manually, make
use of the following Marks card settings:
== Rows
Filters
Marks
Abe Text
Note Most of the techniques described here require various Tableau interactive end-user
environments, such as Tableau Reader, Tableau Public, Tableau Online, or Tableau Server.
Filtering Data |
No matter what visualization or analytical tool you use, one of the first things you'll need
to do is filter data. Filtering is simply the process of narrowing down your chart or graph to
only the data that is relevant to your current need. For example, if you have an historical
data warehouse that contains 10 years of data in millions (or more) of records, it’s very
unlikely that you'll want to include every row in your visualization—you'll almost certainly
want to limit your view to a specific year or a few years. Other options for filtering are as
numerous as your choice of dimensions and measures: only certain regions, sales that are
at least $1,000, and so forth.
97
98 Tableau 9: The Official Guide
Category
Appliances
a
Bookcases
Cans aChenee |
Computer Peripherats
Rubber Bands
Scissors, Rulers and Trimm..
Storage & Organization
Tables
Telephones and Communica..
Basic Filtering
The focus point for filtering in Tableau is the Filters shelf, which appearsat the upper left
beside your chart. If you included or excluded dimension values as described earlier in the
chapter, you'll notice the dimension you chose appears on the Filters shelf. Like other
shelves in Tableau, you may drag dimensions or measures to this shelf. Depending on the
type of field (dimension or measure) and the field’s data type (string, number, date, and so
forth), various filter dialog boxes will result. For example, if you drag a string dimension to
the Filters shelf, a filter dialog will appear, showing all members of the dimension.
Chapter 5: Interacting with the Viewer 99
Consumer
Corporate
Home Office
—_ Small Business
Summary
To only include certain values in your worksheet, check the values you wish to retain
(the All and None buttons may be used to select all values if only some are checked and to
clear all existing checkmarks, respectively). To exclude certain values in your worksheet,
check the values you wish to exclude, as well as the Exclude checkbox in the lower right
(the dimension values you select will appear with a line through them). When you click OK,
the filter will be immediately applied; the field will be placed on the Filters shelf, and the
chart will immediately update to reflect the new filter. Modify an existing filter by right-
clicking (COMMAND-clicking on Mac) the field indicator on the Filters shelf or by clicking
the small arrow on the indicator, and choose Filter from the context menu. The filter dialog
box will reappear, where you may make desired modifications. To remove a filter, simply
drag it off the Filters shelf.
A variation of the filter dialog box will appear if you drag a date or date/time field to the
Filters shelf. First, you'll be prompted to choose the date level (year, month, and so forth)
you wish to use for the filter. Clicking Next will display the standard filter dialog, presenting
choices based on the initial date level you select:
e Relative Date This option will filter relative to some specified date (initially,
today’s date). Relative date filtering is helpful for “yesterday,” “last week,” “two
previous years,’ and similar types of date ranges that will adjust automatically as
your computer’s date and time change.
e Range ofDates Allows selection of beginning and ending dates in a date range.
Variations of this option allow specification of only a beginning or ending date to
provide open-ended date range filters.
100 Tableau 9: The Official Guide
| Match value:
/ 9
Contains
| © Starts with
Ends with
Exactly matches
e Condition Filters the chosen dimension, but not on the actual dimension members
themselves. Instead, you may specify a condition based on an aggregated numeric
value (the count of another dimension or a numeric aggregation of another
measure). If, for example, you only wish to include categories that are unprofitable,
click the Condition tab, click the By Field radio button, select Sum Of Profit, and
specify a less than (<) operator and zero comparison value. The By Formula option
allows specification of a Tableau calculation formula (calculated fields are discussed
in Chapter 6) for more advanced filter calculations.
faxiCaegey)
| General_| wildcard | Condition |
None
| @) Byfield:
e Top Similar to the Condition tab, the Top tab will filter, not on the actual
dimension members, but on an aggregated numeric value. Rather than including
all occurrences of dimensions that meet the filter, however, the Top tab will limit
the filter to the top or bottom “N” occurrences of the dimension. For example, to
see the top 10 selling products, select the Top tab, choose the By Field radio button,
choose Top, type a value of 10, and select Sum Of Sales. The By Formula option
102 Tableau 9: The Official Guide
©) By field:
By formula:
Filtering on a measure presents a different type of filter dialog that provides numeric
options based on the range ofvalues within the measure. First, you’ll be prompted to
choose the type of aggregation calculation you wish to use for the filter (sum, count, and so
forth). Make this choice and click Next. The resulting filter dialog will allow a range of
numeric values (minimum and maximum) to be specified or open-ended numeric ranges
(at least/at most). Use the slider control to select beginning or ending range values, or type
in the desired values directly.
Chapter 5: Interacting with the Viewer 103
By default, any filter you specify on the Filters shelf applies only to the worksheet
where you add it. If you create another worksheet using the same data connection,
any filters you specified elsewhere don’t apply to the new worksheet. You may wish
to share the filter with additional worksheets that use the same data connection (this
is particularly helpful when you plan on placing multiple filtered worksheets on a
dashboard).
To make this choice, right-click the desired field indicator on the Filters shelf, or
click the drop-down arrow on the field indicator. Click Apply To Worksheets to display
a sub-menu where you may choose the desired scope:
e Only This Worksheet This is the default. The filter will only apply to the
worksheet where it has been placed on the Filters shelf.
e All Using This DataSource The filter will apply to every worksheet in this
workbook that’s using the same data source as the worksheet where the filter
is applied. You’ll notice the filter appear on the Filters shelf on other
worksheets with a small barrel icon next to it.
e Selected Worksheets This option, only available when more than one
worksheet exists in the workbook, will present a list of all worksheets in the
workbook making use of the data connection the filter is based on. Select the
worksheets you wish the filter to apply to. The filter will appear on the Filters
shelf on these worksheets with a small two-page icon next to it.
Worksheets
World Map
[¥) Sales by State
[] Profit by Customer
\[¥] Shipping Cost by Method
104 Tableau 9: The Official Guide
Quick Filters
The most intuitive filter interactivity in Tableau comes in the form of quick filters. Quick
filters are customizable dialog boxes that prompt a viewer for filter values. When the viewer
chooses values from the quick filter, the visualization is immediately updated to reflect
those filter choices. There are two strong benefits of quick filters over filters specified
directly on the Filters shelf or interactive filtering by mark/header selection:
e There are many flexible user interface choices for quick filter display, such as drop-
down boxes, radio buttons, and so forth.
e They are fully supported in all other Tableau distribution environments, such as
Tableau Reader, Tableau Server, and Tableau Online/Public.
You may display a quick filter for existing filters already on the Filters shelf or create
one from scratch. Simply right-click (CONTROL-click on Mac) either-the field indicator on
the Filters shelf or a field in the Data pane (you may filter on dimensions or measures).
Choose Show Quick Filter from the context menu. A quick filter dialog will appear on the
right side of the chart and, ifit wasn’t already there, the field name will be added to the
Filters shelf.
As with filters directly placed on the Filters shelf (discussed earlier in this chapter), you
may remove a quick filter by dragging it off the Filters shelf. You may also remove the quick
filter dialog box but leave the filter on the Filters shelf with its last-chosen value by right-
clicking the quick filter title or clicking the small context arrow and choosing Hide Card from
the context menu. And, as with filters added directly to the Filters shelf, you may choose the
filter's scope (apply to just this worksheet, all worksheets using the data connection, or
selected sheets) from the context menu, as discussed previously in this chapter.
Depending on the data type of the field the quick filter is based on, the quick filter dialog
box will take on an initial default appearance and behavior. For example, if the quick filter is
based on a dimension with a small number of members, the quick filter will default to a
series of checkboxes, along with an (All) checkbox. Ifa dimension contains a large number
of members, the default quick filter will be a search box. Date dimension quick filters
behave in various ways, depending on the date level you chose when first creating the filter.
If you create a quick filter directly from a date dimension in the Data pane, it will default to
year level and will appear as checkboxes. However, if you first drag a date field to the Filters
shelf and choose a different default date level or choose relative dates or a range of dates,
the resulting quick filter will display as either a drop-down list of options or a slider. Quick
filters based on numeric measures will display a range slider—you may slide either side or
type in values directly above the sliders to set minimum and maximum values.
You're hardly limited to this default behavior, though. Right-click the quick filter title or
click the small context arrow in the upper right. The context menu will display a bevy of
user interface options for your quick filter. Dimension quick filters will present many
options for display, such as Single Value (List, Dropdown, Slider), Multiple Values (List,
Chapter 5: Interacting with the Viewer 105
Dropdown, Custom List), and Wildcard Match. Here’s the result of a Multiple
Values
(Dropdown) choice.
eae
Edit Filter... |
||
Remove Filter
|
|
|| Apply to Worksheets * ||
}
Show Title
Edit Title...
Date or date/time quick filters offer a different set of options. You may choose from sliders
that present a date range or just a starting or ending date. The Relative Date option will display
arich dialog allowing most of the relative date choices found when initially adding a date field
to the Filters shelf. And Browse Periods presents a choice of pre-defined date ranges (1 day,
1 week, 1 month, and so forth) that may be selected. Here’s an example using Range Of Dates.
-
Edit Filter...
Remove Filter
Apply to Worksheets »
Relative Date
© Range of Jota he i=l
Starting Date
Ending Date =
-
Browse Periods —
x Hide Card | Op
106 Tableau 9: The Official Guide
Tip For date and date/time quick filters, you may need to choose date range choices from the
Filters shelf context menu before displaying the quick filter. For example, in order to show
a quick filter that displays a range of month/year values, you'll need to choose the
May 2015 (continuous month) option from the Filters shelf context menu before you
display the quick filter. Otherwise, the range-of-dates quick filter will display month/day/
year values instead ofjust month/year values.
Quick filters based on numeric measures have the fewest customization choices, but
still offer sufficient options for most needs. Range Of Values will display a slider control
with both starting and ending points, which may be moved to modify the starting and
ending values of the range. At Least and At Most will present sliders to select just the
beginning and ending values of an open-ended range. In all cases, you may also type values
directly into the boxes above the sliders.
e Edit Title This option will display a text edit dialog box permitting you to change
the default title Tableau assigns to the quick filter. You may even format the
modified quick filter title, including font, color, and font size choices.
e Customize |Show “All” Value Quick filters based on text/string fields will, by
default, display an All choice, permitting the viewer to retrieve all data in the data
source for the chosen dimension. If you wish to permit the viewer to only choose a
combination of individual dimension values and not all values, the All option may
be disabled with this selection.
e Customize |Show Apply Button By default, Tableau executes the filter (which
requires a data source query) every time an individual value in a multivalue quick
filter is selected or deselected. For example, Tableau will query the database every
time you check an individual state in the multistate quick filter, even if the desire is
to check multiple states before updating the worksheet. If you enable this option,
Tableau won't actually query the database until the Apply button on the quick
filter is clicked, even if multiple values are checked or unchecked. This can
improve performance (sometimes dramatically) when using particularly slow
quick filter fields.
e Format Quick Filter This will replace the Data pane with the Format pane
(formatting is discussed more in Chapter 2), providing additional quick filter
appearance options for font type, size, and alignment, as well as shading and
border choices.
Chapter5: Interacting with the Viewer 107
Parameters
Although quick filters provide flexible interactivity for filtering data, there are other
occasions when you may wish to prompt your audience for a value that’s not based on
an existing data field. In particular, you may wish to create customized calculated fields
(discussed in detail in Chapter 6) that make use of a value supplied by a user. For this,
Tableau provides parameters. A parameter is a prompt, similar in appearance to a quick
filter, that returns a variable value that can be used in many parts of Tableau, such as
calculated fields and portions of various dialog boxes, as well as being placed directly on
a shelf. As with quick filters, parameters are usable with all Tableau distribution methods,
such as Tableau Reader, Tableau Server, and Tableau Online/Public. And parameters are
not limited to being used just on the worksheet where they are created—they can be used
by any worksheet in your workbook, regardless of the worksheet’s data source. A value
you supply to a parameter on the first worksheet can be used in any other worksheet in
the workbook.
There are three general requirements to make use of parameters in your workbook:
Creating a Parameter
There are several ways to create a parameter in Tableau. The first is from another dialog
fora
box where a fixed value can be provided, such as the value for a top filter or the value
reference line. Consider the example of a top filter (discussed earlier in this chapter).
108 Tableau 9: The Official Guide
Recall that a top filter permits you to choose whether to see the top or bottom values ofa
dimension based on a measure. You are also given a choice of how many top or bottom
dimension members to see, with the default value of 10 appearing in the dialog box.
However, if you wish to parameterize the input value rather than “hard-coding” it, you
may expand the value drop-down and choose Create A New Parameter.
| General| Wildcard
|Condition | Top
None
®) By field:
= iad bv
Chapter 5: Interacting with the Viewer 109
You may also just right-click somewhere in the Data pane (either on
a field or ona
blank area). Or, you may display the Data pane context menu with the small
down arrow
on the Dimensions box. Choose Create Parameter from the pop-up context menu.
Data a Analytics =
_ Dimensions
Create Calculated Field...
Create falas
e Group by Folder
Group by Data Source Table
Sort by Name
Sort by Data Source Order
Measures
Customer ID
Discount
Order ID
Order Quantity
Product Base Margin
Profit
Sales
Shipping Cost
Unit Price
Latitude (generated)
Longitude (generated)
Number of Records
SH
HHH
#EOOHHHHH
Measure Values
The Parameter dialog box will appear. Depending on where you created the
parameter (from a dialog box, from the Data pane, and so forth), the dialog box may
already have some values pre-specified. For example, if you create a parameter from the
top filter dialog box (where the parameter will be used to replace the numeric Nvalue),
the parameter will already be defined with a data type ofInteger. You must still give the
parameter a meaningful name. You may optionally provide a comment. The remainder of
the dialog box will change based on the data type of the parameter. Hete, the default value
of Nis set to 10; formatting of the numeric parameter value will be automatic (if you ou
you may select from a variety of specific formats, depending on the parameter data eae
and a range of values will be prompted for, with a minimum of 10, a maximum of 50, and a
110 Tableau 9: The Official Guide
step size of 5. As such, this parameter will permit entry ofinteger values between 10 and 50
in increments of 5.
“Create Parameter
Comment
Segoe UI 7139 ~ |B I
Properties
Current value: 10
Range of values
Iv! Minimum: 10
¥) Maximum: 50
J| Step size: 5
If you create a parameter from the Data pane, the Parameter dialog will be similar, but
you must choose a data type as well, This is crucial, as it will determine how the parameter
will appear on the worksheet, what properties you can set for the parameter, and how you
can use the parameter. Consider your data type choice carefully. For example, you won’t
want to choose a string data type if you wish to use the parameter to ultimately affect the
percent change in a numeric calculation. Also, if you want to create a dynamic reference
line based off a date field to call out a reference date, string and numeric options will not
even be available as selections from the date range axis.
In this example, a string parameter is being created to prompt for one of four string
values. The values are being pre-defined in the parameter so that they will be the only
available options when the parameter displays on the worksheet. A default value of “Profit”
is being set, which will initially display when the workbook is opened. If an existing database
field contains the desired values for a parameter, select it by clicking the Add From Field
Chapter5: Interacting with the Viewer 111
button. The parameter values will be read from the chosen field. You
may also paste values
from the Clipboard by clicking the Paste From Clipboard button.
“EditParameter(Show]
Name: Show
Comment
Properties
Caution /fyou use the Add From Field button to populate a string parameter, new values
added to the database later will not appear in the parameter (Tableau does not provide
“dynamic” parameter lists). Ifyou wish to add newly created values from the database to
a parameter, you must edit the parameter and click the Add From Field button again
after the database has changed.
In all cases, once you create a parameter, it will appear in a new area of the Data pane
dedicated to displaying parameters. Even if you add new worksheets or data connections
to the workbook, the parameters will still display in the Data pane and will be usable in
any worksheet.
112 Tableau 9: The Official Guide
Displaying a Parameter
Once a parameter is created, it must be displayed on the worksheet so that your audience
can interact with it. If you created a parameter in a dialog box (the top filter parameter
discussed earlier being an example), the parameter will automatically appear on the
worksheet as soon as you close the dialog box where you created it. However, if you created
a parameter in the Data pane, it will not automatically be displayed. You must explicitly
right-click the desired parameter in the Data pane or click the small down arrow on the
parameter and choose Show Parameter Control from the context menu. The parameter
will then appear on the right side of the worksheet next to any existing parameters or
quick filters.
Once a parameter appears on the worksheet, its user interface may be customized,
much like a quick filter’s can. As with a quick filter, right-click the title of the parameter or
click the small context arrow to display the context menu. Depending on the parameter’s
data type and options you chose when you created the parameter, you'll find various
choices for how the parameter is displayed (slider, single value list, and so forth). The
previously discussed string parameter, for example, will display as radio buttons when the
appropriate choice is made.
Edit Parameter...
¥ Show Title
| Edit Title...
Format Parameters...
Edit Title
Trebuchet MS
<Parameters.Show>
Projected Value
Don’t forget that parameters may be used on any worksheet in your workbook. Even
though you create them and use them in one particular worksheet, they are available
everywhere else in your workbook—they will always appear in the Data pane no matter
what worksheet youre currently editing. You may use them differently on different sheets.
For example, you may supply a parameter to a top filter in one worksheet but use it in a
calculated field on another. You'll soon find that parameters will take you to a whole new
level of interactivity and flexibility with Tableau.
Tip Ifyou created a parameter but it doesn’t appear in a variable portion of a dialog box,
such as the N value in a top filter or the value to use for a reference line, it’s because the
parameter doesn’t match the required data type for the dialog box. For example, the N
value of a top filter will only expose numeric parameters. Ifa reference line is being
created on an axis based on a date value, only date parameters will appear in the
reference line value.
114 Tableau 9: The Official Guide
Worksheet Actions
Another way of enabling interactivity is by using worksheet actions. Worksheet actions are
an interactive feature to control behavior or appearance on either the current worksheet or
other worksheets in the workbook, based on some action your viewer takes. There are three
types of actions a viewer can initiate from a worksheet:
e Filter Action This action filters other worksheets in the workbook based on
marks selected on the current worksheet.
¢ Highlight Action This action highlights marks on other worksheets in the
workbook based on marks selected on the current worksheet.
e URLAction This action launches a web page containing a specified URL based
on marks selected on the current worksheet.
e Select This method initiates the action when a user selects a mark by clicking it,
selects more than one mark by CTRL-clicking them, or selects multiple marks by
drawing an elastic box around them.
e Menu _ This method initiates the action when you hover your mouse over a mark
and choose the action name from the tooltip. The action may also be initiated on
the context menu that appears when you right-click selected marks.
e Hover This method initiates the action when you hover your mouse over a mark.
All worksheet actions are created from the Worksheet |Actions drop-down menu. The
Actions dialog will appear, where you may create new actions or edit existing actions.
Filter Actions
A filter action adds a filter to one or more worksheets in your workbook. Although there are
many possible uses for a filter action, worksheet “drill-down” is one common popular use. For
example, you might create a crosstab worksheet that contains detailed dimension/
measure information that you wish to act as a drill-down target for a filter action. When you
Chapter 5: Interacting with the Viewer 115
select one or more marks on a chart, the marks you selected can be used to filter the target
text table.
Click the Add Action button in the Action dialog box, and choose Filter from the
sub-menu. Complete the Filter Action dialog box:
First, give the action a meaningful name (leaving the default name doesn’t provide
detail about what the action does, which makes it difficult to determine its purpose
when you create multiple actions).
In the Source Sheets box, choose the worksheet or worksheets you want to initiate
the action from.
Click the desired Hover, Select, or Menu button to determine what will initiate the
action. If you click Select and want the action only initiated when a single mark is
clicked, check the appropriate box (multiple mark selections using CTRL-click or
drawing an elastic box around multiple marks won’ initiate the action).
In the Target Sheets box, choose the worksheet or worksheets you want the action
to take place on. The sheets you select here will be filtered when the action is
initiated.
Select one of three radio buttons to indicate what you want to occur when the
original marks that were used to initiate the action are cleared (the original mark is
clicked again, or a blank space on the worksheet is clicked to clear previous
selections). Leave The Filter will leave the filter in place even when you clear the
selection. Show All Values will eliminate the filter and show all data in the target
sheets. Exclude All Values will eliminate all data from the target sheets so they
appear blank.
Make choices in the Target Filters box, if necessary, to match fields between the
source and target sheets. If, for example, the source sheet is based on one data
connection and the target is based on a different connection, Tableau will not be
able to determine how to match the field used for selection in the source worksheet
to a field to filter in the target worksheet if the fields don’t have the same name. In
this case, click the Selected Fields radio button and then click the Add Filter button
to create one or more matching filters, choosing fields from the source sheet and
target sheet that Tableau should match when creating the filter.
116 Tableau 9: The Official Guide
Click OK to create the filter action. In this example, a filter action has been created to
filter a target crosstab worksheet when marks are selected on a map. Here, drawing an
elastic box around five countries in South America filters the crosstab to these countries.
When the action is initiated, the target sheet will be displayed and the filter applied.
Source Sheets:
Hover
|| 4% Select
|
|
{ th Menu
Target Sheets
Target Filters
°
oe ®
@
°
Country / Order
Region State City Quantity Profit Sales
Argentina Province de Buenos Aires Buenos Aires 14,789 5286,865 $1,037,812
Brazil Bahia Salvador 2,734 $126,334 $230,105
Ceara Fortaleza 2,397 $47,254 $209,041
Distrito Federal Brasilia 1,062 $14,658 $42,923
Minas Gerais Belo Horizonte 513 ($1,422) $36,862
Parana Curitiba 364 S367 $9,640
Pernambuco Recife 1,245 $14,710 $72,069
Rio de Janeiro Rio de Janeiro 10,355 $131,567 $666,902
Rio Grande do Sul Porto Aleore 1,108 318,103 $121 600
So Paulo Sao Paulo $,852 $156,017 $732,718
Chile Santiago Santiago 1,716 $22,551 $101,844
Colombia Antioquia Medellin 1,810 $97,324 $238,868
Bogota D.C BogotAj 2,794 $70,570 $213,671
Peru Provincia de Lima Lima 2,592 $11,626 $112,767
Highlight Actions
A highlight action highlights particular marks on one or more worksheets in your workbook,
based on marks you select on the source worksheet. When you select one or more marks on
a chart, the other sheet will match the selection. When you select the other sheet in the
workbook, you'll notice matching marks are highlighted.
118 Tableau 9: The Official Guide
Click the Add Action button in the Action dialog box and choose Highlight from the
sub-menu. Complete the Highlight Action dialog box as follows:
e First, give the action a meaningful name (leaving the default name doesn’t provide
detail about what the action does, which makes it difficult to determine its purpose
when you create multiple actions).
e Inthe Source Sheets box, choose the worksheet or worksheets you want to initiate
the action from.
e Click the desired Hover, Select, or Menu button to determine what will initiate the
action.
e Inthe Target Sheets box, choose the worksheet or worksheets you want the action
to take place on. The sheets you select here will be highlighted when the action is
initiated.
e Make choices in the Target Highlighting box, if necessary, to match fields
between the source and target sheets. All Fields will consider all combinations
of dimensions in the source and target sheets when attempting to match what to
highlight. Selected Fields will permit you to check specific dimensions in the source
sheet that will be used to match marks in the target sheet to highlight. Dates And
Times will match date and/or time fields in the target, based on what you select in
the source sheet.
Target Highlighting
~) Selected Fields i; Country {Region a
and Times
+) Dates
©) All Fields
Chapter 5: Interacting with the Viewer 119
® OpenStreethtap contributors
Projection
208 400 600 800 4000
Customer Name ~
Syivia Barr
Kisteo bow a —
Rosemary Hedrick
Megan H Odom e
Thelma Adcock 3 i i
Country / Region China
nen Cote Customer Name: MeganHOdom
Joan Oakley Schaefer Shipping Cost 513.9 i
Mitchell H Beach Projected Shipping Cost: 565.3
iia Rocce ee ee
Barry Cunningham ,
Jenny Gold
Stanley Kennedy
Lindsay Boyd
Jeanne Fuller McMillan
Molly Watson
Gail Lin
Glen Caldwell
Kristine Hansen
Bonnie Matthews Rowland
Randy Carpenter
Linda Roth
Justin Morgan aera ©
eae 200 400 600 800
Actual F
120 Tableau 9: The Official Guide
URL Actions
A URL action launches a web page based on marks you select on the source worksheet. The
web page can contain a static web page uniform resource locator (URL). However, any field
on your worksheet (the selected mark, in particular) can be used to customize the URL
based on marks you select when the action is initiated. This provides for very powerful
customized web pages to be delivered based on selections.
Click the Add Action button in the Action dialog box and choose URL from the sub-
menu. Complete the URL Action dialog box as follows:
First, give the action a meaningful name (leaving the default name doesn’t
provide detail about what the action does, which makes it difficult to determine
its purpose when you create multiple actions). If you wish to customize the action
name by using a field from your data source, click the small arrow at the right of
the Name text box. You may select a field to be included in the action name.
In the Source Sheets box, choose the worksheet or worksheets you want to initiate
the action from.
Click the desired Hover, Select, or Menu button to determine what will initiate the
action. Be very cautious if you choose Hover—understand that a web page will be
launched whenever you just move your mouse over a mark!
Specify the URL you wish to use when the web page is launched. To customize the
URL with data from your worksheet, click the small arrow at the right of the URL
text box. You may select a field to be used in the URL.
If you wish to “URL-encode” certain characters (spaces and so forth) in the URL,
check the appropriate box. If you wish to allow selection of multiple marks to
launch the URL (with cTRL-click/COMMAND-click or an elastic box), check Allow
Multiple Values and type in the delimiter and escape character you wish to use to
separate the resulting multiple values in the URL.
Click OK to create the URL action. In this example, a URL action has been created to
display a Wikipedia web page when a mark is selected on a map. The URL has been
customized with the Country/Region field to display a specific entry relating to the country
that is selected. Because this is a menu action, the option to run it appears on the tooltip
when the mouse is hovered over a mark.
Chapter5: Interacting with the Viewer 121
URL Options
{cli Coral) |
® r
e 6
® ® 6,® e
2 A,
e e® @
ee
e ® @ VkeepOnly X Excude @ Br F
Country /Region: Turkey .
e® 4 soe - 3
e ® e
* ®
e e
&
© OpenStreetMap contributors
122 Tableau 9: The Official Guide
a
Create account Login (ey
Main page This article is about the country. For the bird, see Turkey (bird). For other uses, see Turkey (disambiguation)
Contents
Turkey (#'/ tarki/; Turkish: Turkiye[ tyrcije]), officially the Republic of
Featured content Republic of Turkey
Turkey (Turkish: @) Turkiye Cumhunyeti (help-info)), is a parliamentary
Current events Turkiye Cumhuriyeti (Turkish)
Random article republic largely located in Western Asia with the portion of Easter
Donate to Wikipedia Thrace in Southeastern Europe. Turkey is bordered by eight countries:
Wikipedia store Bulgaria to the northwest; Greece to the west; Georgia to the northeast; « «
Interaction Armenia, Iran and the Azerbaijani exclave of Nakhchivan to the east;
Help and traq and Syria to the south. The Mediterranean Sea is to the south; cae
; Flag National emblem" 7
About Wikipedia the Aegean Sea to the west; and the Black Sea to the north. The Sea of : = eS s
Community portal Marmara, the Bosphorus
Pp and the Dardanelles (which together form the Anthem: istix/a! Mars!
“Independence March”
ee Secs Turkish Straits) demarcate the boundary between Thrace and Anatolia;
ontact page ra }
: they also separate Europe and Asia"! Turkey's location at the |
Tools crossroads of Europe and Asia makes it a country of significant
What links h Ute
peters geostrategic importance {i:
Related changes
Upload file Turkey has been inhabited since the paleolithic age!” including various
Special pages ancient Anatolian civilizations, Aeolian and lonian Greeks, Thracians,
Permanent link and Persians. **('"l aner Alexander the Great's conquest, the area was
Note Worksheet actions are similar to dashboard actions, with the exception that they only
apply to other worksheets in your workbook. No dashboards need exist in your workbook
for worksheet actions to be used. Dashboard actions are covered in more detail in
Chapter 8.
CHAPTER
Advanced Charting,
Calculations, and Statistics
() nce you feel more comfortable with basic Tableau visualizations using shelves,
Show Me, and the Marks card, you're ready to move on to more sophisticated
analysis techniques. This chapter will cover more flexible data organization with
groups and sets, custom data manipulation with calculated fields and table calculations,
and statistical analysis techniques using the Analytics pane and related options.
Grouping Dimensions
In many cases, the data source you are presented with may not have dimension (categorical)
values organized perfectly for the data analysis task at hand. Tableau allows you to reorganize
and customize dimensions as necessary using groups. Groups allow you to organize data in
a more logical fashion, as well as accommodating certain types of data inconsistencies,
perhaps resulting from data entry errors. Any custom groups you create are saved with a
custom data connection so that they may be reused and shared within your organization
(saving data connections is discussed in Chapter 3).
A group is a reorganized collection of dimension members. For example, your data
source may contain data broken down by state, but a data entry error places some data in a
state labeled CO and other data in a state labeled Colorado. These may be combined into a
single dimension member. Or, if you wish to analyze data by salesperson territories and
these territories don’t exist in your data source, you can create salesperson territory groups
based on state. You could highlight Montana, Wyoming, Colorado, Utah, and Arizona and
create a “John Doe” group; California, Oregon, Washington, Nevada, and Texas could be
123
124 Tableau 9: The Official Guide
placed in a group named “Jane Smith”; and so forth. You may then use either the original
state field or the new group to analyze data. And when you save the data source, the group
is saved with it for use in other workbooks.
There are two ways to create these kinds of groups: by selecting dimension headers on an
existing worksheet, or by using the Create Group option in the Data pane. To use an existing
worksheet, CTRL- or SHIFT-click (COMMAND-Cclick on Mac) the group member headers you
wish to combine (it’s important that you click the names of the members—the headers—and
not the actual marks, as you'll see later in this section). Then, with your mouse hovered over
one of the selected headers, click the paper clip icon in the tooltip. You may also click the
group (paper clip) button on the toolbar. Or, you can right-click (CONTROL-click on Mac) the
G *
header and choose Group from the context menu.
The selected dimension members will be combined into a new single member consisting
of the names of the original members, and a new group dimension will be created in the Data
pane (the group will be named the same as the original dimension with a group designation
appended to it). In addition, the original dimension on any worksheet shelves will be
replaced by the new group dimension. From this point forward, you may analyze either the
original dimension by dragging it to an appropriate shelf or the new combined group by
dragging it to a shelf.
Several options are available to customize the new group:
In addition to manipulating groups on the worksheet, you may create and modify groups
in the Data pane. Begin by selecting the original dimension you wish to group. Then right-
click (CONTROL-click on Mac) and choose Create Group from the context menu. The Create
Group dialog box appears, displaying the original dimension members for the chosen
dimension. Select the existing members you wish to combine with sHIFT- or CTRL-clicks
(if the dimension has a large number of members, you may wish to click the Find button and
add search criteria to find the members you want to select). Then click the Group button.
The selected members will be combined into a new member consisting of the names of the
selected members. If you wish to rename the new combined member, simply hold your
mouse button down on the name for a second or so, or select it and click the Rename
button. Type the desired name for the combined member. You may also change the default
name of the group (initially, the name of the dimension the group is based on, followed by
the word “group”) by selecting the Field Name portion of the dialog box and typing a new
name.
Fg oeOe
ae
4 @ Fixed Assets
| Appliances
Bookcases
Computer Peripherals
Copiers and Fax
Office Furnishings
Office Machines
Tables
Binders and Binder Accessories
Chairs & Chairmats
@ Consumables
Envelopes
Labels
Paper
Pens & Art Supplies
Rubber Bands
Scissors, Rulers and Trimmers
Storage & Organization
Telephones and Communication
to
When you've finished customizing the group, click OK. The new group will be added
either the original dimensio n or
the dimension list in the Data pane. You may now analyze
select an _
the new group by dragging it to a shelf. When you first create a group, or if you
126 Tableau 9: The Official Guide
existing group in the Data pane, right-click and choose Edit Group from the context menu;
there are several fine points that can help you maximize use of the group dialog box:
e To expand or contract combined members, click the arrow to the left of the
combined member. When expanded, you'll see the original members that have
been combined into the new member.
e To ungroup a combined member, select the combined member next to an arrow
and click the Ungroup button.
e To create another combined member, select additional original members as you
did previously and click the Group button again. A new combined member will
be added.
¢ To add original members to an existing combined member, select the original
members you wish to add. Then either drag them inside the existing combined
member, or choose the existing combined members you wish to add from the Add
To drop-down list at the upper right of the dialog box.
e To combine one or more already combined members, select the new combined
group members and click the Group button again. They will be combined into yet
another new combined member.
e Tocreate an “Other” combined member that contains all original dimension
members that weren’t placed in any combined members, click the Include “Other”
checkbox. All remaining original members will be combined into one final combined
member named Other.
Visual Grouping
There is a variation on grouping (referred to informally as visual grouping) that you may
prefer for quick visual delineation of group members. As mentioned earlier in this section,
when creating groups on the worksheet, you should select the actual member names/
headers, not the marks (bars, circles, and so forth). If you do select marks instead of
headers (with CTRL/COMMAND- or SHIFT-click, or by dragging over multiple marks), then
Tableau behaves somewhat differently.
Once you've selected desired marks, click the group (paper clip) button in the tooltip
that appears, click the group (paper clip) toolbar button, or right-click and choose Group
from the context menu. As discussed previously, the selected dimension members will be
combined into one new member in a new group, which will be placed in the Data pane.
However, contrary to earlier steps when headers were selected, the new group will not
replace the original dimension on a shelf. Instead, the new group will be placed on Color
on the Marks card with the originally selected members now showing a different color than
Chapter 6: Advanced Charting, Calculations, and Statistics 127
the “Other” members (this method of group creation uses the previously discussed
Include
Others option by default).
Category
Computer Peripherals
Appliances
Office Furnishings
Paper
Envelopes
Labels
Rubber Bands
As before, the name of the new combined member will be a list of the original member
names. You may edit the newly created group in the Data pane to provide a more
appropriate name. Or, you may simply select the name in the color legend, right-click, and
choose Edit Alias. Type the new name for the combined member.
There are some fine points for using this “visual” method of grouping as well:
e Toungroup the just-combined members, select one or more of the already grouped
marks. When the tooltip appears, you'll notice that the previous group paper clip
icon now displays a small x, indicating that it now functions as an ungroup button.
You may also right-click and select the Ungroup option from the context menu.
e Toaddacombined member to the group, select additional original members’
marks as you did previously and use the same paper clip or context menu options
as before. An additional combined member will be added to the group, which will
create an additional color.
e To add original members to an existing combined member, select the original
marks you wish to add, as well as at least one mark from an existing combined
member. Use the paper clip or menu options to add.
128 Tableau 9: The Official Guide
e Tocombine one or more already combined members, select all the marks from
existing combined members and use paper clip or menu options. They will be
combined into yet another new combined member consisting of everything in the
original combined members.
== Rows Category F
Filters
uses a conditional formulaic expression to define what the set contains. For example, a set
can be defined that determines the top 10 selling products as of the current moment based
ona “Top” database query. Any product dimension members that meet that condition will
be included in the set. As data changes, different dimension members may be added to or
removed from the set automatically based on changing sales.
There are several ways of creating a constant set. If you already have a chart defined in
your worksheet, you may select as many marks or headers as you’d like to add to the set via
CTRL-/COMMAND- Or SHIFT-click, or by dragging to highlight a series of marks (in a scatter
plot, for example). From the tooltip, click the Create Set button. Or, right-click and choose
Create Set from the resulting context menu.
fr
5 >
Profit
as o% o cela
Jv KeepOnly X Exclude @ -|Bi= _¢ /
C CreteSet. 7|i coy
A items selected »SUM(Sales): $ tae]
($20.000) ssiahatsntlce _ (tee,
A
($40,000)
s you selected
The Create Set dialog box will appear with the dimension member
ons, they will appear in
appearing as a list (if your visualization contains multiple dimensi
a multidimension set,
separate columns). If you wish to remove an entire dimension in
130 Tableau 9: The Official Guide
hover your mouse over the column heading of the dimension and click the red X. In
addition, any dimension members may be removed by hovering over the row and clicking
the red X. Give your set a meaningful name by typing it in in the Name area. If you wish to
immediately filter your worksheet by the new set, check the Add To Filters shelf. Click OK to
create the set. The new set will appear in the Sets area of the Data pane. Like any other field
in the Data pane, you may drag the set to a shelf or to a portion of the Marks card to analyze
only the data included in the set.
== Rows SUMIProfit}
Filters v
Unprofitable Regio. ® $0 +x t >
PS + +
Marks wi
($5. 000)
* a
x* Automatic v |
é 4 Abe
“ 123 ($10,000)
Color Size Label .
Profit
Category
6s25 009
a> Bookcases 325,000}
& Office Machines
WB Pens & Art Supplies
($30.000
# Rubber Bands
& Scissors, Rulers and Th
Storage & Organization
{$35_000)
@ Tadies
A Telephones and Comm
Region ($40,000
BB Centra!
BB East
BB south ($45,000 +
@ West
You may also create a set by right-clicking an existing dimension in the Data pane and
choosing Create |Set from the context menu. The Create Set dialog box will appear
containing three tabs: General, Condition, and Top. The General tab will simply list all the
members of the dimension. Just click as many members as you wish to add to the set and
Chapter 6: Advanced Charting, Calculations, and Statistics 131
click OK. However, if you want to create a computed set, select either the Condition
or Top
tab and select some sort of condition, based on the dimension itself, or a measure.
For
example, to create a set containing top 10 selling items, select the Top tab, choose By field,
select Top, type 10, and choose the Sales measure and Sum aggregation.
Create Set”
Name: Top 10 Selling Items
>) By formula:
One feature of sets that you will find handy in overall set analysis is the In/Out feature.
Depending on where you use a set (dragging a set to Color on the NTIS vail is a prime
example), your chart will break data down into “in set” and “out of set” delineations.
For example, if you create a bar chart that displays sales by category, you ee a saved
filter set (described later) on Color to separately highlight the portion that is “in” the set
(placed by U.S. customers) and “out of” the set (place by non-U.S. customers). If you prefer
to highlight the actual members that make up the set rather than whether items are in or
132 Tableau 9: The Official Guide
out ofthe set, click the context arrow on the set’s field indicator on the shelf and choose
Show Members In Set.
?= Rows SUM(Sales)
Filters Category
Marks = $4,000,000
tu] Automatic ’
& i
500,000
:
Color Size Label
Detail Tooltip
&(NwoumsOnn>) Ss
Filter...
| Se ie
| Show Members in Set
les .
|@ Show In/Out of fst
Edit Set...
|
f0,000
sz al a :
$0 —
: ae . e 2 ° e e » . e e o-] « se
| Edit Aliases... 8 s£ 8 J Ki at 3 i £ & 2 @ & c § = &2
i & & 3 3 fg es ee ke ees ni ewe =
|
;
Edit in Shelf | ee
=
ee Es J ae
a
ee - s
2 3 a eae 56
| Remove
a ®
i
eae £
ae-g i
5
ei z$ 3
§
;” 39,== 6
HE:
&
2&8
OS eatin 3£ 4
=
2 6 i
E
«
5
:
s
.a Fo
a 2 5 ma 8 £
o £
a
Tip Because sets are based on dimensions in a particular data connection, they will only
appear in the Data pane when their corresponding data connection is selected. Ifyour
workbook contains multiple data connections, sets won’t appear when other data
connections are selected.
Combined Sets
If you remember math class from your grade school years, you may remember the
teacher drawing intersecting circles on the whiteboard while conducting a discussion
of sets. That knowledge may come in handy as you work with Tableau, as Tableau
allows creation of combined sets. A combined set is a set that uses two existing sets to
create some combination of members from both sets. Perhaps you wish to analyze
category/region combinations that sell at high dollar amounts but still lose money
because of low profit. If you have created two distinct sets for each of these categories,
you may combine them for more thorough analysis.
Chapter 6: Advanced Charting, Calculations, and Statistics 133
To create a combined set, select the two existing sets in the Data pane. Right-click
(CONTROL-click on Mac) and choose Create Combined Set from the context menu. The
Create Set dialog box will appear, but with a different organization than previously
illustrated. Give the combined set a meaningful name, and then choose the intersection
of the two original sets that you wish the combined set to return (the four icons will take
you back to those school days). Click OK when finished. A new combined set will appear
in the Sets area of the Data pane that you may drag and drop onto your visualization.
(OK [,Cancel,.] |
Filters if
F Sort...
® Create <
@ Dimension
Measure r
Remove
134 Tableau 9: The Official Guide
The set will be created and placed in the Sets portion of the Data pane. You may replace
the initial filter with the set by dragging the set to the Filters shelf directly on top of the
original filter. Since the set will be saved with the workbook (as well as any custom data
connections that are saved and reused), you may apply the same filter in any worksheet in
the workbook by simply dragging the set to the Filters shelf.
Note Since sets are similar to filters, Tableau displays the results offilter actions (described
in Chapter 5 for worksheets and in Chapter 8 for dashboards) as sets in the Data pane.
Tableau Server user filters, discussed in Chapter 9, also appear Gs sets.
Profit Categories
Number
Re
of
1500
f €
c5 = = == —— ——
The key to this histogram is the $250 profit “buckets” or bins. Tableau’s built-in bin
capability makes this very simple. By just right-clicking the Profit measure and choosing
Create |Bins from the context menu, a new dimension is created. In this case, the new
dimension is given a meaningful name (by default, Tableau will give the dimension the
same name as the measure, followed by “bin”), and the bin size is specified. Once created,
the new bin field will appear in the Dimensions portion of the Data pane, As with any other
dimension, it may be dragged to the desired location on the workspace. In this histogram
136 Tableau 9: The Official Guide
example, a simple record count becomes the measure to count the number of line items in
each profit bin.
Min:
Tip Sometimes situations arise where you need to create bin measures as just described, but
require bin sizes that are not evenly distributed. This necessitates creation of a calculated
field (described next) to create bin measures according to your variable needs.
Calculated Fields
It won't be too long before you encounter a situation where the data in your underlying
data source or database won’ fit your analysis needs exactly. For example, you may need to
calculate the result of one or more numeric measures in your data source to determine a
desired number you wish to analyze. Or, a dimension in the data source may not be
organized precisely in the way you wish to use it.
For these types of situations, Tableau provides calculated fields. A calculated field is a
custom calculation (often simply referred to as a formula) that can use combinations of
existing dimensions and measures from the underlying data source, combined with
built-in operators and functions, to create a custom result. The resulting calculated field
can be placed on a shelf or card just like a standard dimension or measure.
Tableau 9 introduces an innovative new way to create calculated fields. Although a
more traditional calculation editor continues to be available, a new ad hoc calculation
capability has been introduced with version 9. Ad hoc calculations may be created quickly
directly on shelves and cards. Although not required, they can be added to the Data pane
for reuse in other worksheets.
Ad Hoc Calculations
Ad hoc calculations are quick, “on-the-fly” calculation formulas that may be created with
a
simple double-click. Ifa dimension or measure is already on a shelf or card, double-clicking
it will place the field into edit mode. You may either replace the contents of the field with a
new formula or add components to the existing field name in the formula.
For example, you may have already placed a Quantity measure on the Rows shelf, resulting
in a bar chart illustrating sum of Quantity. You now decide that you prefer the bar to represent
Total Cost, which is the existing Quantity measure multiplied by another measure, Unit Cost.
Double-click the Quantity measure on the Rows shelf. The field will enter an edit mode.
Rows ({Quentity])|
Although there are several ways of creating the desired Total Cost formula, you may
choose to backspace to remove the SUM function, as well as the parentheses surrounding
the Quantity field, and type a simple multiplication formula. Notice that as you type,
Tableau will attempt to auto-complete the formula for you by displaying existing
dimensions, measures, parameters, or Tableau formula functions. When the formula
element you wish to use (such as Unit Cost) appears in the list, use cursor keys to highlight
it and press TAB or ENTER to select it, or click it with your mouse.
COUNT
COUNTD
DATETRUNC ae =
As you type, Tableau will check the syntax (correct spelling and organization) of your
formula. If Tableau detects an error in the formula text, it will underline the error with a red
squiggly. Hover your mouse over the suspect text to display a tooltip expanding on the
error. When you're finished adding or editing formula text, press TAB or ENTER. If you want
to see the results of the ad hoc calculation while still editing, press CTRL-ENTER (COMMAND-
ENTER on a Mac) to display the results of the calculation on the chart but remain in edit
mode. You may continue to modify existing formula text or add new text, and then press
TAB Or ENTER when you're finally ready to end editing and save your formula.
Tip Ifyou want to use another dimension or measure in your ad hoc calculation, you may
also drag itfrom the Data pane into the ad hoc edit box instead of typing it or selecting it
from the auto-completion list.
138 Tableau 9: The Official Guide
You may also create a brand-new ad hoc calculation by double-clicking directly the
shelf or card where you want the calculation to appear. For example, you may have a bar
chart analyzing sales by year of order. You desire to break the single-color bars into two
stacked colors, breaking down sales between the first and second halves of the year.
Because the formula that breaks dates into the first or second half will appear on Color on
the Marks card, double-click at the bottom of the Marks card below any existing fields.
Tableau will simply display an empty edit box.
Type a formula that will test the month of Order Date field for the first or second half of
the year and return the appropriate “Ist Half” or “2nd Half” text string.
Once the ad hoc calculation displays no errors, press ENTER to save it. Then, click to the left
of the ad hoc calculation (which, by default, will now appear on Detail on the Marks card),
and select Color.
Marks $700,000
inl Bar 4
& || | 3c
ae ||. Abe
a.
| Detail | |Tooltip|
race = $300,000
nl Bar y
| & 1) Oo |) 3 | ¥
Color Size Label $200,000
Detail | Tooltip,
pa ai ae
$100,000
$0
2011 2012 2013
Chapter 6: Advanced Charting, Calculations, and Statistics 139
Although ad hoc calculations are specifically designed for quick, temporary analysis,
you may wish to save the calculation for use in other worksheets in the workbook, or
perhaps in a saved data source (saving data sources is discussed in Chapter 3). To save an
ad hoc calculation for later use, just drag it from its original shelf or card to the Data pane.
Tableau will prompt you for the calculated field name. Supply a descriptive name for the
calculated field and click OK. Tableau will add the new calculated field to the Data pane.
e Inthe Data pane, right-click an existing dimension or measure that you wish to use
in a calculated field and choose Create |Calculated Field from the context menu.
The calculation editor will appear with the selected field appearing in the formula.
e Click the drop-down arrow at the top of the Dimensions portion of the Data
pane. Choose Create Calculated Field from the context menu. The calculation
editor will appear with no fields pre-added.
e Choose Analysis |Create Calculated Field from the drop-down menu. The
calculation editor will appear with no fields pre-added.
The calculation editor, illustrated in Figure 6-1, has changed dramatically in Tableau 9
compared with previous versions. It is significantly smaller and simpler, permitting it to be
displayed on top of the Tableau workspace. This allows you to try variations on calculated
field logic and just click the Apply button, seeing the result appear immediately in the
workspace. You may also hide or display the Functions/Help portion ofthe calculation
editor at will with the small arrow.
Tip You may find that the default size of text in the calculation editor is too small for comfort.
You may resize text by holding down the crrt key (commanp key on Mac) and using the
scroll wheel on your mouse. Note that the new size will only persist until you close the
calculation editor. The next time you display it, text will appear at the default size.
As with ad hoc calculations, discussed earlier in this section, you may type formula text
directly into the calculation editor. As you type, Tableau will attempt to auto-complete the
formula for you by displaying existing dimensions, measures, parameters, or Tableau
formula functions as you type. When the formula element you wish to use appears in the list,
use cursor keys to highlight it and press TAB or ENTER to Select it, or click it with your mouse.
You may also drag a desired dimension, measure, or parameter from the Data pane directly
into the calculation editor where you wish the field to appear.
And, as with ad hoc calculations, Tableau will check formula syntax as you type. If
Tableau detects an error in the formula text, it will underline the error with a red squiggly
and display a red error indicator at the bottom of the calculation editor. Hover your mouse
over the suspect text to display a tooltip expanding on the error. You may also click the
small drop-down arrow on the error indicator at the bottom of the calculation editor.
Whereas the calculation editor in previous Tableau versions included lists of fields,
parameters, and Tableau formula functions, the new editor will only display functions,
and will only display them if you click the small gray arrow to the right of the formula text
(remember that you may drag dimensions and measures right into the formula from the
Data pane). When you display functions, you may double-click a function to add it to the
formula at the current cursor location. You may also get a “quick view” of function syntax
by selecting a function from the list. Tableau will display concise background on the
function to the right of the editor.
Once you have created your formula, you may click Apply to apply the changes and see
the results immediately on the underlying Tableau workspace. This will only work provided
the calculated field is in use in the underlying worksheet. Otherwise, click OK to save the
calculated field. It will appear in the Data pane, where it may be dragged and dropped to a
shelf or card just like a standard database field.
e Fields are dimensions, measures, parameters, sets, and other calculated fields that
may be dragged into a formula from the Data pane.
Chapter 6: Advanced Charting, Calculations, and Statistics 141
There are some general tips and techniques you'll want to keep in mind as you create
calculated fields:
e Give the calculated field a meaningful name. The default “Calculationl” won’t be
helpful when you are evaluating fields in the Data pane to add to your chart.
e Ifyou add fields from the Data pane, or if you let auto-complete add a fieldname,
Tableau will always surround them with square brackets. If you type fieldnames in
manually, you may leave the square brackets off, provided the fieldname doesn’t
contain any spaces. If the fieldname does contain spaces, you'll receive a syntax error
if you fail to surround the fieldname with square brackets. If the fieldname itself
includes square brackets, type two additional matching square brackets before or
after the fieldname’s bracket to ensure proper syntax.
e Once you've saved a calculated field, it will appear in the Data pane with a small
equal sign to the left of the data-type icon. To edit the calculated field, right-click
the field in the Data pane and choose Edit from the context menu.
Numeric Calculations
If your data source contains various numeric measures that you wish to use in a calculated
field, add them to the Formula box. Use standard numeric operators, such as *
(multiplication), / (division), + (addition), and - (subtraction). For example, you could
create a calculated field called Total Cost that multiplies Quantity by Unit Cost.
Because this calculated field includes two existing numbers and a numeric operator,
the result of the calculated field will be numeric. As such, the calculated field will be placed
in the Measures box ofthe Data pane.
If you wish to use a percentage value in the data source to mark up the Total Cost
formula, you may use this:
Two items are of note here. First, a previously created calculated field can be used in
another calculated field. Second, the order in which the operations are performed will
affect the final result. For this calculated field to return the correct result, multiplication
must be done first, which is the second operator in the formula. The result is still correct,
however, because the standard order of precedence you may remember from math class
applies. Multiplication will occur before addition, moving from left to right, in a formula.
If you want to change the order of precedence, parentheses may be added where needed.
String Manipulation
Often, you may find a need to modify or expand on the way dimension data is presented. For
example, you may have string data that is provided in a separate field that needs to be
combined in a single field (often referred to as concatenation). Or, you may exhibit an opposite
situation, where string data residing in a single field needs to be split apart (or parsed).
Concatenation is accomplished by using a plus sign to “add” strings together. String
fields, as well as string literals (values surrounded by apostrophes or quotation marks), may
be concatenated into one combined string. For example, if a customer contact’s name is
contained in three database fields (first name, last name, and middle initial), you may
create one combined name with a calculated field:
[Customer First Name] + " " + [Customer Middle Initial] + ". " + [Customer Last Name]
The first name field from the database will be followed by a space, followed by the
middle initial, followed by a period and space, followed by the last name. Because all
portions of this calculated field are strings, the result of the calculated field will be a string.
As such, it will be placed in the Dimensions portion of the Data pane.
Chapter 6: Advanced Charting, Calculations, and Statistics 143
Caution Note that a plus sign can be used both for addition with numeric
fields and
concatenation with string fields. Ifyour calculated field mixes both strings and numbers
in the same formula, Tableau won't know whether to add or concatenate. A syntax error
will result. In this instance, you'll need to either convert the string to anumber (with
FLOAT or INT functions) for addition, or convert the number to a string (with the STR
function) for concatenation.
One situation that often confounds analysts when dealing with database systems is
inconsistent case within string data. Depending on the data entry application that
populates your data source, you may find string data appearing in all caps, in all lowercase,
or in a (potentially inconsistent) mixed case. General best practices dictate that you display
string data in a case that is easy for your audience to read. For example, if the customer
names described in the previous example are entered in the database in inconsistent case,
you may want to add functions to a calculated field to convert them to the desired case:
This formula text will convert all occurrences of the Customer First Name database field
to uppercase, whereas the following will convert all characters of the last name to lowercase:
However, you may wish to use mixed case (sometimes referred to as proper case) for
inconsistent database fields. This presents more of a challenge, as Tableau doesn’t
include a built-in function to convert string data to proper case. Performing this in
Tableau requires more complex parsing (picking apart) of a string in combination with
UPPER and LOWER functions.
To capitalize the first letter of an inconsistent string and display the remainder of the
string in lowercase requires both determining the number of characters in the string (using
the LEN function) and extracting certain characters from the left (using the LEFT function),
right (using the RIGHT function), or middle (using the MID function) of the string. Here’s
an example of a calculated field named First Name Proper Case:
You may find undesirable results if any database field you add to your calculated field
contains a null (an empty value in the data source, where no data has been added for a
particular field in the underlying data source). Depending on the underlying data source, a
calculated field that contains any underlying data field that contains a null may itself return
a null. For example, if any records in the database don’t contain a middle initial for a
customer, the entire value returned by the Combined Name calculated field for that
customer will return a null, even though the first and last names contain values.
Tableau features built-in functions (ISNULL and IFNULL) to detect null values and
change your calculated field accordingly. Once calculated fields to create proper case
versions of a customer first name and customer last name field have been created, another
144 Tableau 9: The Official Guide
calculated field can test for a potential null value for middle initial and return just first and
last names in this instance. Here’s the formula text for a calculated field named Customer Full
Name (IF/THEN/ELSE/END logic is covered later in the chapter under “Logic Constructs”):
IF ISNULL( [Customer Middle Initial]) THEN
[Customer Last Name ProperCase] + ", " + [Customer First Name ProperCase]
ELSE
[Customer Last Name ProperCase] +", " +
[Customer First Name ProperCase] + " " +
UPPER( [Customer Middle Initial]) + "."
END
Date Calculations
Tableau provides a great deal of analytical power when using date or date/time fields from
the underlying data source. Automatic date hierarchy drill-down (year to quarter to month,
and so forth), built-in date level flexibility, and discrete versus continuous date treatment
are all benefits of using date or date/time fields.
It’s possible, however, that the underlying data source contains date or date/time data
that’s not presented in a true date or date/time data type. In particular, older database
systems (perhaps converted from mainframes) or proprietary vendor-based systems may
present dates in a number or string field. In some cases, these are presented in “yyyymmdd”
format, which facilitates proper date sorting, or in some form of numeric value, whereby a
number indicates the number of days since a particular “start” date, such as a Julian date.
Until these types of dates are converted to actual date or date/time data types, none of
Tableau’s rich date capabilities will be available.
Depending on the original data type and layout of these fields, different approaches are
required to convert them to date or date/time fields. For example, if an underlying data
source contains a numeric field with a date in “yyyymmdd” numeric format, this calculated
field will convert it to an actual date field:
In this example, the DATEPARSE function uses the first “format” argument to define
which parts of the second string argument are used to represent the month (“MM”), day
(“dd”), and year (“yyyy”). Because the underlying data source presents the date as a number,
the STR function is used to convert it to a string value, which is required for DATEPARSE.
Another common use of date-oriented calculated fields is determining the difference
between two dates (in days, weeks, months, or otherwise), as well as adding or
subtracting a number of periods (days, weeks, and so forth) to an existing date. If, for
example, a shipping goal exists to ship a product within one week of its order date, the
following calculated field will return the expected ship date:
intervals to add, expressed as a positive or negative number; and the existing date field/
date calculated field to add the intervals to. Because the DATEADD function returns a date/
time data type, the DATE function is used to strip the time value away from DATEADD and
return just the date portion of the field.
r So eee
Drop Field
|
}
|& ATTR (Purchase Date) 2:
ee
(a) Cer
es a ) , (continued)
146 Tableau 9: The Official Guide
= _ —~ = — eee ——
=
However, Tableau permits you to create a duplicate date field at a desired date level
right in the Data pane without needing to create a calculated field. Just right-click the |
desired date or date/time field in the Data pane and choose Transform |Create Custom |
Date from the context menu. Give the new custom date a meaningful name, and choose |
the date level you wish to use from the drop-down list. Finally, click the Date Part radio
button to assign the custom date a discrete designation (individual values for only
actual occurrences of dates), or click the Date Value radio button to assign the custom
date a continuous designation (a range of date values from the first date to the last date).
The new custom date will now appear directly in the Data pane where it may be dragged |
to the workspace. |
Detail: [Months_ zi
~) Date Part © Date Value
(0k) (eaccancet)
Logic Constructs
More involved calculated field logic may require you to perform one or more tests on
various database values or values returned by other calculated fields. These tests will
typically use a logical comparison operator, such as an equal sign, less-than sign, greater-
than sign, and so forth. Based on the results of these tests, the calculated field will return a
particular result.
The most common type of logical test capability comes in the form of If-Then-Else
logic, typically found in most standard software programs. Tableau calculated fields
require, at a minimum, use of IX, THEN, and END keywords. ELSE and ELSEIF keywords
are only required for multicondition tests. Consider a requirement to create categories
based on a numeric measure (another way to do this is discussed earlier in this chapter, in
the section “Creating Binned Fields”). A Markup % measure contains percent markup
numbers. However, you wish to categorize orders into High, Medium, and Low values, with
these three values appearing in a dimension created by a calculated field. This example of
IF/THEN/ELSEIF/ELSE/END logic will meet the requirement:
Tip You may notice that this formula displays mixed-case text for the IF/THEN
/ELSEIF/
ELSE/END keywords, as well as line breaks and tabs between parts of the formula. This
is perfectly acceptable. The Tableau formula language is not case sensitive (although
string literals within quotation marks or apostrophes, as well as fields from the Data
pane, are case sensitive). And pressing enter to break your formula up into multiple lines,
as well as pressing 1B to indent parts of the formula, will not affect the outcome of the
formula and may make the formula easier to read.
A modified form of test logic uses the CASE/WHEN/THEN/END construct (the ELSE
keyword is only required if a “catch-all” result is desired). Similar to IEF/THEN/END logic,
CASE logic tests a single field or expression and returns different results for each condition.
In some cases, IF/THEN/ELSEIF/END will be required if multiple tests are needed.
However, for a single test with many results, CASE logic may be easier to read and modify.
In this example, a combined Product Type-Part Number database field is being tested to
determine the type of product the combined field refers to. Using the new Tableau 9 SPLIT
function, the calculated field will evaluate the product-type portion of the combined field
(which is separated from the part number by a dash) and return one of three descriptive
words indicating the type of product. If an unanticipated product-type value is encountered,
the calculated field will return “Unknown.”
Because the number of characters indicating the product type is variable (in some cases,
two characters; in other cases, three), the SPLIT function is used to extract the portion of
the source string before the hyphen, which separates the product type from the part
number. CASE logic is then used to assign a value to each abbreviated product type. If an
unanticipated product type is encountered, the optional ELSE keyword will return the word
“Unknown.” If ELSE was not used and an unanticipated product type was encountered, the
calculated field would return a NULL value.
ie [ekeonewiel| sy O) Beara
" Yes "
Else
"No "
End
If this calculated field is then placed on Color on the Marks card to indicate
profitability of a series of categories, the following will result.
Pages 7 Columns Category
= Rows SUM(Sales)
Filters Category
Country / Region: Unit..
$1,200,000
Marks
til Automatic ¥
@il alls
Color Size Label
Detail | Tooltip
Non-Aggregated Profitable
Bio
Bi ves $400,000
$200,000
, , =
Labs
f Paper Tables
Bookcases SY
Envetones Trimmers
Appliances
Accessories
Bands
|Rubber
Fax
and
Copiers Office
Machines andCommunication
Telephones
Binder
and
Binders Chainnats
Chairs
& Furnishings
Office
Supplies
Art
&
Pens and
Rulers
Scissors,
Peripherals
Cormputer
Storage
Organization
&
In this instance, the calculated field is evaluated at the underlying data source row
level, with each individual row returning a “Yes” or “No” value. Tableau then
aggregates the Yes and No values itself, breaking down each bar color based on the
count of Yes and No values. The result is a visualization of the portion of each product
category that is profitable or not.
Chapter 6: Advanced Charting, Calculations, and Statistics 149
Else
| "No"
|
End
: |
Here, the calculated field is making use of a built-in Tableau aggregation function.
In this case, the calculated field itself is evaluating the rolled-up aggregate profit value,
determining whether the SUM of profit is positive or negative. When this is placed on
Color on the Marks card, a different chart results.
j T= Rows SUM{(Sales)
Filters Category |
Country / Region: Unit.. |
$1,200,000 |
|
Marks
tl Automatic ’ eo
& og 135
Color Size || Label
2
& AGG
(Aggregates .. ;
@ $600,000
AGG(Aggregated Profita...
Bio
Bi ves $400,000
$200,000 |
30 nsea eo _—_ |
we higwrirs Cen Oar Gy is ae ey ae ee ye
i af i i
iat j Tn 2
et ae ae
he ae
Ca Be eR i; Pa ea nS
< 43 @ i= 4sl 2Ue aho § <
2
2
2é
&
6 FE
j LS ae: g § F , | abs
& 5 & é a §
o a
Tip Ifyou perform aggregation within a calculated field (by using SUM, MAX, or
other aggregation functions), Tableau will always place the calculated field in
the Measures portion of the Data pane, even ifthe calculated field returns a
non-numeric result. Also, when placed on a shelf, the calculated field willshow
an AGG aggregation type. This indicates that the calculated field itself is
performing internal aggregation and that Tableau will not attempt to
aggregate the field again using a SUM.
150 Tableau 9: The Official Guide
A level of detail expression is a calculated field construct that lets you calculate a value
using an aggregation that is different than the aggregation provided by the dimensions
currently in use on a chart. Because Tableau’s basic architecture depends heavily on
aggregated values being supplied from the underlying data source, LOD expressions allow
greater flexibility to analyze aggregated results within other aggregated results.
Consider the chart illustrated in Figure 6-2. Here, average sales are being analyzed
by category. In this scenario, Tableau is rolling up data in the worksheet to category.
The average sales for each category is displayed. Averages are being calculated by the data
source for each category and sent to Tableau, which simply displays them as bars.
What if you want to compare these category averages to the overall average for all
categories? Traditionally, you might consider a reference line (covered later in this
chapter). Figure 6-2 illustrates a reference line set to display the overall average for the
Category
ae {FIXED : AVG([Sales])}
|
$10,000 $1,812
'
g $8,000 |
< $6,000
$4,000
Average: $2,690
eam eee ce
52,000
$0
Bray rl ee
Pea
a UL fee
2g 6
ee
kt
ee
43 gg
e 63
-
Bie
@& Se iS g = $3
S ee
SE
HOMERS
HOSES
SNELL
EE
i. eo
as
@ °
eed; 2
= ed u 5
eR E 2<3¢ 4 zn &
88 aE2Se if|
3 £ ° 3 3 re) £ =3]
&= == ° 5 2 23 sJ FO} q
- beta° é 36C«<sé
”
|
chart, illustrated as $2,690. But if you look closely at the Reference Line
dialog box, you'll
notice that the reference line is actually calculating the average of the average
of Sales.
EditReference
Line,Band, or Box = ea
Line
Une: —— v
Fill Above; None Y
If you choose to remove this category from the chart, Tableau =) Columns
submits a new data source query aggregating to the overall data Rows AVG(Sales)
source average, not the average by category. Notice the resulting
single bar, representing overall average sales. The reference line
now matches the bar exactly and indicates an average of $1,812.
Average: $1,812
Although you may not initially even know this situation exists, $1,800
youve had in the past is acceptable. However, if the true desire is $1,200
to compare average sales by category to the overall average sales
within the data source, regardless of category, you've been limited w $ "ooa
Sales
Avg.
in your ability prior to LOD expressions. Look back at Figure 6-1. $800
Notice that even with category being used as the chart’s
aggregation level, the overall average of $1,812 has been derived $600
$0
which is also equivalent to just
{AvG ( [Sales] ) }
Both of these LOD expression examples illustrate the basic syntax requirement of all
LOD expressions: curly braces. Both of these variants start and end with curly braces, but
one includes a FIXED scope keyword, indicating that the LOD expression will return an
aggregated value, regardless of other dimensions used in the current worksheet. And this
152 Tableau 9: The Official Guide
Marks
alloSize
Color
lls
Label $10,000
Detail ||Tooltip
: $8,000
& AGG(Above/Below..
SUM(Overail Aver.. Sales
Ava.
$6,000
AGG(Above/Below Overa...
$4,000
Bl Above Overall Average
a Below Overall Average
%
”is x
3
£
ig s
6 Tables Labels Paper au
=
E o
=] Envelopes Tamm
Bookcases va Appliances
Accassores
#
2
@
2 |Rubber
Bands a
b= ° andCommunication
Telephones
oO
oO Machines
Office
&Chairmats
Chairs Binders
Sinder
and &Art
Pans
Supplies Sdssors,
Rulers eripherals
omputerP
f
&Organization
Storage
Tip Although it may initially seem confusing, it’s valuable to understand that even though
LOD expressions always include an aggregation function, as in {FIXED : AVG([Sales])},
Tableau considers them to be underlying row-level values, just like a traditional
measure. Ifyou drag a calculated field using a single LOD expression to a shelf, Tableau
will still aggregate the calculation as it does a standard measure. And ifyou use an LOD
expression alongside other dimensions or measures in a calculated field, the same “if
you aggregate one part of a calculation, you must aggregate them all” rule applies.
Chapter 6: Advanced Charting, Calculations, and Statistics 153
Fixed
FIXED LOD expressions aggregate to the specified dimension or dimensions (you may
supply more than on dimension, separated with commas), regardless of any other
dimensions in use on the chart. For example,
will calculate the year of the first (minimum) order date for each customer name, whether
or not customer name is being used on the chart. Depending on their structure, FIXED
LOD expressions may be used as dimensions, as is the case with this example. Using this
calculated field, the first year a customer made a purchase may be used to color a bar chart,
regardless of what dimensions are used in that chart. Here, we see that the vast majority of
customers made their first purchase in 2011 across all customer segments.
Marks
il Automatic ’ 350
& OS ht a4
Color Size = Label 300
Detail = Tooltip
200
Year Of First Purchase
BB 201
BH 2012 Customer
Distinct
of
count
Name
2013
BB 2014
Consumer Corporate
154. Tableau 9: The Official Guide
Include
INCLUDE LOD expressions aggregate to a lower level of detail within the dimension or
dimensions you use on the chart. So even though the lower-level dimension used in the
LOD expression doesn’t appear on the chart, Tableau will use it to “sub-aggregate” within
the existing dimensions. For example:
will calculate the highest quantity per product name within other dimensions used on the
chart. Because Tableau still treats INCLUDE LOD expressions as disaggregated measures,
you may choose how to roll up the resulting calculated field, as you would any traditional
measure. In this example, total quantity is used as the chart measure, with bars sorted high
to low. The maximum of the LOD expression, which retains the highest quantity within the
sub-category, is placed on Color on the Marks card. This analyzes correlation between total
quantity by sub-category and the highest order quantity by product within the sub-
category. The chart shows that there is general correlation, in that higher-quantity sub-
categories consist of orders of 14 of a particular product within the sub-category. Whereas
one of the bottom five sub-categories still includes a 14 quantity product, others fall to as
low as 9 within the sub-category.
== Rows + Sub-Category €
ras Sub-Category
a eee eee eee eee
BERR eee Se a ee
Marks
.— (ss
" E ae
7 ae
tn} Automatic ~ eee eee eae
& | OH A
Color || Size | | Label i. RE eee eats
— Sc a
Detail ||Tooktip
—J | ST
Tables eae
@& MAX(Highest Ord..
Fasteners
Envelopes
MAX(Highest Order
Qty . . Bookcases
oi Supplies
g 14
: Machines Sia
Copiers
0 S500 1,000 1500 2,000 2,500 3000 3,500 4000 4500 5,000 5500 6,000
Quantity F
Exclude
EXCLUDE LOD expressions, as their name suggests, remove a specified dimension from a
calculation, aggregating to dimensions in use on the chart, except the specified dimension
or dimensions. For example:
will calculate average sales by any dimension or dimensions currently in use on the chart,
excluding category before the average is calculated. So in the first row of this example, the
result will be average sales for each year, as the nested category dimension is being
excluded from the calculation. Therefore:
will calculate the difference between the individual category/year average sales and overall
average Sales for the year. Although it may seem like a fine point, it’s important to
distinguish this LOD example from a WINDOW_AVG table calculation function (discussed
in the next section of the chapter) that could be used to accomplish much the same thing.
As discussed at the beginning of this section, the EXCLUDE LOD expression used here will
return the average sales for the year, not the average of averages, which is what is returned
by a table calculation function.
Marks
All ul $400
AVG(Sales) nl :
AGG(Difference Fr... ul @ $300 =
:
us} Bar y Oo
& | fo tf ts || sx _
| Color ||Size ||Label ee
& AGG(Difference
Fr.. $0 = =
E
5
8
0 ; Ie A Le 5! ha ’ s
z
Qa
-100
=
a S$ &£ Or ee
$ 8% aoa
a
Sere
:
3
eso
s
oa
83 8
3
é a 3 Fr a § Pr
156 Tableau 9: The Official Guide
Caution Because LOD expressions make use of data source sub-queries, they may negatively
affect data source performance. For the same reason, a small number of data sources
don’t support LOD expressions.
Table Calculations
By design, Tableau takes maximum benefit of your underlying data source or database and
requests that it perform aggregation, only returning summarized rows to your visualization
(the exception to this rule comes into play if you uncheck Aggregate Measures from the
Analysis drop-down menu). And with level of detail expressions, even more data source
ageregation flexibility is afforded you. For example, even if your underlying database
contains many (perhaps billions) of underlying rows and you build a visualization that
simply displays one measure for a dimension that exposes only 10 members, the database
itself will “roll up” the dimensions to 10 levels, calculating the aggregated value for the
measure for each level. The database will actually only return 10 rows to Tableau.
Consider the simple crosstab illustrated in Figure 6-3, which only displays sum of sales
by year and region. Notice that both row and column grand totals have been enabled from
the Analysis |Totals drop-down menu. In this case, regardless of the number of underlying
records in the data source, the data source itself has calculated all summed values and only
returned 25 aggregated values to Tableau—all Tableau has done is formatted and displayed
them without performing any calculations whatsoever.
i= Rows Region
~
no: Oi West $147 883 $139,966 186,
$186,976 6
$250,633 5
$725,458
Grand
Total $484,247 $470,533 $608,474 $733,947 $2,297,201
Ban oe ——<$<$—$—<___—
Figure 6-3 Simple crosstab
Chapter 6: Advanced Charting, Calculations, and Statistics 157
But what if you want to perform some other kind of analysis on this data instead of, or
in addition to, just looking at total sales by year and region? Perhaps, for example, you
would like to analyze how much sales has changed from year to year, either in dollars or
percent. Or, maybe you would prefer to visualize these numbers as a running total that gets
larger and larger as it “runs” across the crosstab by year or down the crosstab by region. In
these types of cases, an additional calculation will need to be done once the aggregated
values have already been returned by the database.
As a general rule, standard industry databases don’t have the capability to carry out
these “secondary” calculations, performing multiple “passes” over the data to calculate a
secondary result based on the values from a primary result. Well, Tableau provides the
ability to perform these additional calculation passes by way of table calculations,
additional calculations that Tableau performs after aggregated values have been returned
from the underlying data source.
To create a table calculation, you must first design a visualization using standard
dimensions and measures, as discussed previously in this book. Once a measure has been
added to the workspace and assigned an aggregation type (Sum, by default), you may then
create a table calculation. There are several ways of creating table calculations:
e Select one of the sub-menu options from the Analysis |Percentage Of drop-down
menu.
e Right-click (CONTROL-click on Mac) the measure on the workspace and choose one
of the sub-menu options from the Quick Table Calculation context menu item.
e Right-click (CONTROL-click on Mac) the measure on the workspace, choose Add
Table Calculation from the context menu, and complete the resulting dialog box.
Revisiting the “percent change from year to year” requirement discussed earlier,
Figure 6-4 shows the crosstab originally displayed in Figure 6-3 after Percentage Of |Table
has been selected from the Analysis drop-down menu.
#= Rows Region
One change is blatantly obvious. Rather than displaying dollar values indicating
aggregated sales for each combination of year and region, the crosstab now displays
percentages, with each individual year/region value showing as a percentage of overall
sales. Row and column dollar totals have also been replaced with percentages of the overall
total they are responsible for. And the “grand-grand total” at the lower right indicates that it
is, in fact, 100 percent of the total amount. What may not be so obvious is the change to the
SUM(Sales) field indicator on the Marks card. Looking closely, you'll notice that a small
delta (triangle) icon now appears on the field indicator. This confirms that this measure has
been converted to a table calculation.
SUM(Sales) A
If you undo the previous Percentage Of option (or choose Analysis |Percentage Of |
None) to return the measure to its original aggregation and then right-click the measure
and choose Quick Table Calculation |Percent Of Total from the context menu, you'll see a
slightly different result, as illustrated in Figure 6-5. Here, the percentages are still displayed,
but are calculated across each region row rather than the entire crosstab.
One of the immediate questions you may ask after creating a table calculation is: How
do I see the original measure, as well as the table calculation, to help me analyze further?
Especially when you first start working with table calculations, you'll probably want to see
the original measure along with the table calculation to begin to understand how table
calculations behave. This is a fairly simple process. Just re-add the original measure to the
visualization again. In the case of a crosstab, you may drag the original measure to Text on
the Marks card, or just double-click the original measure to invoke Measure Names and
Measure Values on the crosstab. The original measure won’t display the delta icon, but the
table calculation will.
Pages
St Columns YEAR(Order Date)
i= Rows Region
Filters _
Order Date
Region 2011 2012 2013 2014 Grand Total
Mate Central 20.72% 20.52% 29.41% 29.35% 100.00%
Abc Automatic I 2
East 18.96% 23.03% 26.60% 31.42% 100.00%
& 3 123
Color Size Text
South 26.51% 18.22% 23.88% 31.39% 100.00%
Detail | Tooltip
Grand ea 5
Total 21.08% 20.48% 26.49% 31.95% 100 00%
Caution Using the Percentage Of drop-down menu option prohibits the original measure
from being added to the visualization alongside the table calculation. Ifyou wish to
display both the original measure and a percentage table calculation, use right-click
menu options to create the table calculation instead of the drop-down menus.
Even though the table calculation illustrated in both Figures 6-4 and 6-5 was created
with a percent of total option, you'll notice a difference. When using the pull-down menu
Percentage Of |Table option, the table calculation evaluated for the entire table—each
combination of year and region was calculated as a percent of the overall total. However,
when the Percentage Of Total quick table calculation was used, each region row was
calculated individually, with the total for each region row indicating 100 percent and the
yearly values for each region contributing to the region total, rather than the overall total
for the entire crosstab. You may wish to modify the second table calculation to behave like
the first—calculating each year/region combination as a percentage of the overall total. Or,
perhaps you prefer to have the percentages calculated down the yearly columns with each
region total contributing to a 100 percent yearly total.
What determines the end result is a table calculation’s direction and scope. A table
calculation’s direction refers to the order in which individual table “cells” are calculated—
left to right (referred to as across), top to bottom (referred to as down), left to right and then
top to bottom (referred to as across then down), or top to bottom and then left to right
(referred to as down then across). A table calculation’s scope determines when the table
calculation will reset to a beginning value.
160 Tableau 9: The Official Guide
Sometimes, it’s difficult to separate the two properties. For example, the direction used
in the table calculation illustrated in Figure 6-3 is “across then down.’ The scope used is
“table,” as the percentage never resets within the entire table. Conversely, the direction used
in the table calculation illustrated in Figure 6-4 is simply “across,” as the percentage is always
reset before any “down” calculation takes place. And the scope used is “table (across),”
indicating that the table calculation value will be reset when it reaches the end of a row.
Note Tableau table calculation documentation also refers to the terms “addressing” and
“partitioning.” Addressing can be considered similar to direction, whereas partitioning
can be considered similar to scope.
Direction and scope choices are set automatically for quick table calculations and for
Percentage Of pull-down menu choices. However, you may edit direction and scope after a
quick table calculation has been created by right-clicking (CONTROL-clicking on Mac) the
table calculation field indicator (it will display a delta icon) and choosing either the
Compute Using or Edit Table Calculation context menu option. If you wish to customize
direction and scope options when initially creating a table calculation, you may right-click
the desired measure and choose Add Table Calculation from the context menu. The Table
Calculation dialog box will provide a choice of calculation type (Running Sum, Percent Of
Total, Moving Calculation, and so forth), as well as direction and scope options in the
Running Along drop-down list. You can even select “Advanced” from the Running Along
drop-down list to display another dialog box providing precise options for direction and
scope options.
| Filter.
Show Quick Filter
Format...
| ¥ Include in Tooltip
Attribute
© Measure (Sum) »
} }
Edit inShelf |
|
{
» SARS Nad bt Be
Compute using >| @ Table Across)
|4 Edit Table Calculation... / Table (Down)
}
| Clear Table Calculation / Table
Quick Table Calculation » Pane (Down) |
Total Using (Automatic) » Pane
Remove Cell
- Te " Order Date
Region |
——— 4
Chapter 6: Advanced Charting, Calculations, and Statistics 161
At the level:
Partitioning:
ran 2 Es Ae ere
| Region 7 5 |
| Year of Order Date
Sort
8) Automatic
Consider another crosstab that analyzes quantity by year and quarter on columns and
category and region on rows. Grand totals are shown to help evaluate table calculation
behavior.
Order Date
2013 2014 Grand
Category Region Qt @ @3 4 61 Q2 @3 ‘a4! Total
Furniture Central 79 105 4154 ©0218 oY 107 116° 9487) 1,057
East 116 118 131 227 56 133 - 209 299 1,289
South 68 7 ar 122 20 130 65 162 726
West 63 154 193 286 104 158 238 362 1,558
Office Central 129 293 451 465 324 «410 518 687 3,277
Supplies East 223 496 479 +587 230 387 604 768 3,774
South 1452 242 309 284 152 292 «290 469 2,190
West 152 385 512 763 458 501 703 907 4,381
Grand Total 982 1,870 2,311 2,952 1435 2,118 2,743 3,841 18,252
162 Tableau 9: The Official Guide
Now look at various direction and scope behavior when a running sum table calculation
is added:
e Table (Across) Notice that the value increments across each row, with the last
value in the row equaling the row total. The table calculation resets at the beginning
of each row.
Order Date
2013 2014 Grand
Category Region Q1 Q2 Q3 Q4 Qi Q2 Q3 Q4 Total
Furniture Central 79 184 «4338 556 647 754 870 1057 1,057
East 1146 234 «365 «=592,s«dB4BeSC«*78.=~=«CO «1.289 «1,289
South 68 145 227 349 369 499 564 726 726
West 63 217 410 “696 800 958 1196 1,558 1558
Office Central 129 422 873 1,338 1,662 2,072 2590 3277 3,277
Supplies Fact 223 «719 «+1198 1,785 2015 2402 3006 3,774 3774
South 152 394 703 987 1139 1431 1721 2190 2190
West 152-537 1,049 1812 2,270 2771 3474 4381 4381
Grand Total 982 2852 5163 8,115 9550 11,668 14.411 18.252 18,252
e Table (Down) Notice that the value increments down each column, with the last
value in the column equaling the column total. The table calculation resets at the
beginning of each column.
Order Date
2013 2014 Grand
Category Region Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4 Total
Furniture Central 79 105 «154. s218~Ssi—«iSC(itéiTSCCKG:SC(ié«‘B’”~=C«*«COSG
East 195 223 285 445 147 240 325 486 2.346
South 263 300 367 «+567 167 370 390 648 3072
West 326 454 560 853 271 528 628 1.010 4630
Office Central 455 747 1011 1,318 595 938 1146 1697 7.907
Supplies ca: 678 1,243 1,490 1,905 825 1325 1,750 2.465 11681
South 830 1,485 1799 2189 977 1,617 2040 2934 13.871
West 982 1870 2,311 2952 1.435 2,118 2743 3,841 18.252
Grand Total 982 1,870 2311 2952 1435 2118 2.743 3,841 18.252
Chapter 6: Advanced Charting, Calculations, and Statistics 163
¢ Table (Across then Down) Notice that the value increments across each row,
with the last value in the row equaling the accumulated value as of that row. The
table calculation then continues to increment starting at the next row. The value is
never reset and accumulates all the way across, then down, until reaching the
overall grand total at the lower right.
Order Date
2013 2014 Grand
Category Region Qi Q2 Q3 Q1 Q2 Q3 O4 Total
Furniture Central 79 184 338 647 754 1,057 1,057
East 1,173 1,291 1,422 1,705 1,838 2,047 2.346 2,346
South 2.414 2,491 2,573 2,715 2,845 2,910 3,072 3.072
West 3,135 3,289 3,482 3,872 4.030 4268 4630 4 630
Office Central 4,759 5,052 5,503 oO
OD
WIkh
Ontno
a & 6,292
oaomn®e 6,702 7,220 7,907 7,907
Supplies East 9,105
8,130 8,626 WH
nm
oOo aD© NO 9,922 10,309 10.913 11,681 11,681
South 11,833 12.075 12,384 12,668 12.82 13,112 13,402 13,8741 13,871
West 14.023 14.408 14.920 15,683 16.141 16.642 17,345 18,252 18,252
Grand Total 982 2,852 5,163 8,115 9,550 11,668 14.411 18,252 18.252
e Pane(Across) Notice that the value increments across each row until it reaches
the last quarter in a year (the partition for each year is referred to as a pane). It then
resets at the beginning of the next year pane. The row grand total consists of the
pane accumulated totals.
Order Date
2013 2014
Category Region Q1 Q2 Q3 Q4 Q1 Q2 Q3
Furniture Central 79 184 338 556 1 198 314
East 116 234 365 592 56 189 398
South 68 145 227 349 20 150 215
West 63 217 410 696 104 262 500
Office Central 129 422 873 1,338 324 734 91,252 1,939
Supplies East 223 719 «61,198 1,785 230 617 1,221 1,989
South 152 394 703 987 152 444 734 1,203
West 152 537 1,049 1.812 458 959 1,662 2,569
Grand Total 982 2,852 5,163 8115 1,435 3,553 6,296 10,137
164 Tableau 9: The Official Guide
e Pane(Down) Notice that the value increments down each column until it
reaches the last region in a department (the partition for each department is
referred to as a pane). It then resets at the beginning of the next department pane.
The column grand total consists of the pane accumulated totals.
Order Date
2013 2014 Grand
Category Region Q1 Q2 Q3 Q4 1 Q2 Q3 Q4 Total
Furniture Central 79 105 154 218 91 «4107 «+116 187 1,057
East 195 223° 285 445 147 240 325 486 2,346
South 263 300 367 567 167 370 390 648 3,072
West 326 454 560 853 271 528 628 1,010 4,630
Office Central 129 293 451 465 324 410 518 687 3,277
Supplies Fact 352-789 930 4,052 554 797 1,122 1.455 7,051
South 504 1,031 1,239 1.336 706 1,089 1,412 1.924 9.241
West 656 1416 1751 2,099 1,164 1590 2115 2,831 13,622
Grand Total 982 1,870 2311 2,952 1,435 2,118 2,743 3,841 18,252
Although this is not a complete overview of all possible direction and scope options,
you should now have a good idea of the general approach to using table calculations. You'll
want to experiment with various table calculation options—you may always “undo” or
make another choice—until you arrive at the correct result.
Tip Although their name may imply that table calculations are only appropriate for
“tables,” such as text tables or crosstabs, they perform equal functions with any chart
type. As with text tables, simpler single dimension/single measure charts will provide
fewer scope and direction options than charts that use multiple dimensions/measures
on rows and columns.
Consider this table calculation, created to act as the right axis line chart
value of a
Pareto chart.
|
|
|
In this example, the table calculation logic is copied to the Clipboard and then
pasted into a new calculated field with IF/THE/ELSE logic to determine if the 80 percent
(continued)
166 Tableau 9: The Official Guide
_ value from the original two-pass table calculation has been achieved. When this
calculated field is placed on Color on the Marks card for the left axis bar chart, the
same logic used to calculate the percent of total running sum will color bars based on
the 80 percent “Pareto Principle.’
Marks
Alt
SUM(Sales) ul - ee
:
SUM(Sales) A pl =
s
ES bs Within 80%?
$ som =§
& y 123 be Results are computed along Table (Across). Totals summarize values fromm Table cs
2
Color Size Label S eens
p IF 5 1 (SUM(f[Sales})) / TOTAL {[Sales})) < .8 &
-
Detail (Tooltip | Path “Yes”
ELSE 40% =
no" E=
END
=
AGG(Within 80%7)
ves
Bi N no Default Table Calculation
aetna ee =
2 E S 3 £ $ 3 £ tg S 3 = 3 = 2 =
BR =
a
2
&
OR
a aeB
Se hes éBenge
Fi z =
es eh
m7 2
ree
: 4 3
8 a = 5 a a
< z
Once you become more familiar with table calculation logic, you may even choose to
create calculated fields directly (as ad hoc calculations on a shelf or using the calculation
editor) that include table calculation functions and logic. If you expand the functions list
in the calculation editor and narrow the list of functions to table calculation functions
only, you'll notice some of the same logic that appears when you expose pre-created
table calculations. Using these in a calculated field, you may create very advanced chart
logic that makes full use of Tableau table calculation features.
AGG(Increase/Decrease F.., id i
- \
Vecreese oa 2.88% 1
+ increase
‘i |
|
wy
$0$0 986% |
ii
2011 2012 2013 2014 |
Note When you use any table calculation functions in a calculated field, the
calculated field itself provides direction/scope options, just as a traditional
table calculation does. Use the same context menu Compute Using options to
customize direction and scope.
ahe
Statistical Analysis
Whereas calculated fields and table calculations permit you to create custom dimensions or
measures to add to your chart, other Tableau features provide associated visual annotations
and statistical indicators, such as reference lines and bands, trend lines, and forecast lines.
There are two ways to use these features: using the new Analytics pane, or from pull-down
menus or right-click context menus.
© Totals
Marks mn
Model
a il Automatic ’
= Average with 95% CI
Tiend Line & as
Forecast Color Size Label
If you drag any of the Custom items to the worksheet, Tableau will add the item with a
basic set of default options and then display a dialog box (the same dialog box discussed in
more detail later in this section), where you may make more detailed choices. And since
the Analytics pane creates traditional analytic and statistical annotations, such as reference
lines, trend lines, and forecasts, you may edit specific properties of the annotation by
right-clicking (CONTROL-clicking on Mac) in the appropriate place (such as right-clicking a
reference band or right-clicking the chart to view a trend model). More detail on specific
Analytics pane options follows in this section.
Chapter 6: Advanced Charting, Calculations, and Statistics 169
Note Analytics pane options may be dimmed, depending on the type of chart currently
being edited. For example, because forecasting is only available on charts using certain
types of date or date-time dimensions, the Forecast option will be dimmed if an
appropriate chart is not being edited.
Instant Analytics
Tableau 9 introduces Instant Analytics, the ability to display two sets of analytic annotations
(reference lines, forecast lines, and so forth) at the same time: one for the entire chart, and
a second for a series of one or more marks that you specifically select. This helpful new
feature allows you to do quick trend, forecast, or reference comparisons for overall values
versus specifically selected values.
Regardless of whether analytic annotations have been added with the Analytics pane or
traditional options (discussed next), simply select one or more chart marks via an elastic
box selection or control-click (COMMAND-click on Mac) options. An additional analytic
annotation will immediately appear for just the selected marks, and the overall annotation
will be dimmed.
Category | Sub-Category
$250,000
$200,000
Sales
$150,000
$100,000
$50,000
$O
Art g® 4i
Boi [=]
Paper R
3 Labels Dy] Phones
o= B=
Tables Storage Supplies Copiers
o Chairs 8
i
2 Machines
«x
o w Fasteners
f=] Appliances
a Fumishings
170 Tableau 9: The Official Guide
Tip Ifyou wish to disable Instant Analytics for an existing reference line, trend line, or
forecast line on a chart, simply edit the annotation from the right-click menu. Uncheck
the Show Recalculated Line For Highlighted Or Selected Data Points option.
Line
romaiing SS eS eee
ines Sass
In this case, one line will appear across each “pane” (outer dimension in a
multidimension row or column). The average of the sales measure is being displayed by the
reference line. A custom label has been specified, which enables a freeform text box where
literal text and a combination of existing values from the chart may be used to label the
reference line. The line has been formatted as a bold red line with no fill options.
Category / Sub-Category
Furniture Office Supplies : Technology
$250,000
$100,000
$50,000
$0
Tip A measure must be “in use” somewhere on your chart in order to base a reference line on
it. Ifyou want to base a reference line on a measure other than the one actually being
displayed on the chart, drag the desired measure to Detail on the Marks card. Then, when
you create or edit a reference line, the additional measure will be available in the
Reference Line dialog box.
Reference Band
A reference band highlights a range on the numeric axis. The beginning and ending values
may be based on a variety of calculations, using existing measures in your chart. You may
also base the beginning and ending values on a constant number that you hard code into
the dialog box, or the value of a parameter.
In this case, a separate band will appear for the “table” (the overall chart, regardless of
how many nested dimensions are used). The lower portion of the band is based on the
median of the sales measure, with the upper band based on the maximum of the same
measure. Custom labels have been specified, which enables a freeform text box where literal
text and a combination of existing values from the chart may be used to label the upper and
lower boundaries of the band. No line is specified to denote the upper and lower boundaries
of the band, but the band is shaded with a medium gray color.
ail
Fill: E iv
Category ! Sub-Category
Furniture Office Su
pplies T echnology
7
$350,000
Maximum: $330,007
$300,000
250,000
$200,000
ul s
2
a
3)
$15
$100.000
$50,000 Ak
SS =
Chairs Tables Labels Paper
Binders Storage Supplies Copiers Phones
Fasteners
Envelopes Machines
Bookcases Fumishings Applances
Reference Distribution
Like a reference band, a reference distribution shades a defined area on the numeric axis.
However, rather than just specifying a beginning and ending point for a distribution, you
may specify several points, which are shaded with various gradients. Variations may be
174 Tableau 9: The Official Guide
fat) |} [sob]
Line Band
| [antl
|Distribution
Scope se a
Computation
Label: None ’
Formatting —
Category / Sub-Category
Furniture Office Supplies Technology
$500,000
$400,000
$200,000 : ie -
ales
5S
B -_ ‘' ]
— oe
-$100,000
-$200,000
Trend Lines
As the name indicates, a trend line is a line (or series of lines) that appears on a chart
indicating the general trend the underlying marks on the chart are exhibiting. A trend line
uses various built-in statistical models (which are selectable) to determine appearance and
behavior. To create a trend line, choose Analysis |Trend Lines |Show Trend Lines from the
drop-down menus, or right-click the chart (not an axis or header) and select Trend Lines |
Show Trend Lines from the context menu.
176 Tableau 9: The Official Guide
Tip Trend lines are available when both the Column and Row shelves contain a numeric
measure (typically, this results in a scatter plot, covered in Chapter 4). A trend line is also
permitted ifa chart is based on a date or date/time dimension (unless they are set to
month/day/year or month/year date levels) and a measure. Ifyou attempt to display
trend lines otherwise, an error message will result.
A default trend line will appear. You may immediately hover your mouse over a trend
line, or select it, to display a tooltip. The tooltip will display basic statistical information
about the makeup of the trend line. If you wish to examine or modify the statistical model
that creates the trend line, right-click (CTRL-click on Mac) a selected trend line or the chart
itself. From the context menu, choose Edit Trend Lines. Or, select Analysis |Trend Lines |
Edit Trend Lines from the drop-down menus. A dialog box will appear, permitting you to
change trend line behavior.
Linear
2 Logarithmic
~) Exponential
Polynomial, Degree: 2
Options
A more detailed discussion of the statistical model making up the trend line may be
displayed by choosing Describe Trend Model from the same right-click menu or by
choosing the Analysis |Trend Line drop-down menu.
A logarithmic
aa aes ape trend mode! is computed for sum of Profit fe)given sum of Sales. . Th The model
ds may bee significant at
a p =<= 0.05. The factor Category may be
Cc
Analysis of Variance:
Field DF SSE MSE FE p-value
Category 4+ 2.3298909e+09 5.82473e+08 5,43682 0.0338843
wes COPY cs
Forecasting
Tableau provides forecasting, the ability to examine data and trends in existing date- or date/
time-based data and forecast what trend may occur in the future. The first requirement
when forecasting is to create a chart based on a date or date/time dimension. If you choose
to change the default discrete Year date level of the dimension, you must choose a
continuous date level—discrete date levels other than Year won't permit forecasting.
Once your initial chart is displayed, you can forecast by using the Analytics pane
(described earlier in the chapter) or the Analysis |Forecast |Show Forecast drop-down
menu option. Or you can just right-click (CcONTROL-click on Mac) the visualization and
choose Forecast |Show Forecast from the context menu. Tableau will look at the existing
time-based data and forecast future trends based on it. The chart will be extended to show
178 Tableau 9: The Official Guide
the forecast data, and a forecast icon (a slanted up arrow) will be added to the forecast
measure on the workspace shelf. Also, a forecast indicator will be placed on Color on the
Marks card to distinguish existing data from forecast data.
35 Rows SUM(Gales) 4
Fitters
Select Alt
Automatic = sory)
0 Format...
& Abe
Color Sze Label Nae | Annotate » |
ie Trend Lines La eee
Detail [Tooltip Path =e | # Forecast * |)¥ Shaw Forecast
; | Drop Lines +) Forecast Options... |
& Forecast Indica. A & Show View Toolbar Describe Forecast... |
You can also use two other options from the Analysis |Forecast drop-down or Forecast
right-click menus to customize or document the forecast. Forecast Options will display the
Forecast Options dialog box, where you can change the duration of the forecast, change
the date-level granularity used for aggregation, choose to ignore a specified number of
periods at the end of the actual data range, elect whether or not to fill missing values with
zeroes, choose from a variety of forecasting models, and select prediction interval options.
Chapter 6: Advanced Charting, Calculations, and Statistics We}
Describe Forecast will display a dialog box exposing details about the way the forecast was
calculated via both Summary and Models tabs.
Forecast Options ae ae eo xy
Forecast Length
© Exactly |1 ears
Until
Source Data
Forecast Model
|
Automatic ts
Note Although line and area charts are typically used to trend data over time, forecasting
will work equally well with other chart types based on date or date/time dimensions,
such as a bar chart showing sales by year.
CHAPTER
Tableau Maps
f you've used other Business Intelligence or Data Discovery tools, you may have
yearned for a comprehensive solution for analyzing geographic data via maps.
Although many “legacy” toolsets fall far short in this area, Tableau provides a rich
mapping capability. By using a combination of geocoded data (data that Tableau interprets
as containing a geographic location) and Internet-supplied background maps, you may
perform detailed analysis geographically.
Consider this dimension portion of the Data pane from the Sample - Superstore data
source that’s included with Tableau. In particular, note the Location hierarchy and the four
dimensions within it. Although the underlying field type in the
data source for these fields is String, they do not appear with the ‘Data "Analytics
standard Abc icon that appears on other string fields. Instead, ) Sample - Superstore
they are denoted with a small globe icon. And if you glance at Dimensions
the Measures portion of the Data pane, you'll notice two 4 & Customer
“generated” fields that you may not have seen before: Latitude Atc Customer Name
Abc Segment
and Longitude. 4 =
rc
Order
Double-clicking one of the geographic dimension fields FA Order Date
Abc OrderID
(a field preceded by a globe icon) will create a map displaying a Ship Date
blue circle on each occurrence of the underlying geographic Abe Ship Mode
field you double-clicked. This very quick default map gives you 4 & Location
© Country
a basic idea of the power of Tableau mapping. Note that the ©} State
actual geographic field has not been placed on the Rows or ®@ City
@ Postal Code
Columns shelf, but instead appears on the Marks card without 4 & Product
any of the standard Marks card icons next to it. This denotes Abc Category
that the geographic field is on the Detail portion of the Marks Abe Sub-Category
@ Manufacturer
card, which simply ensures that the members of the geographic Measures
dimension are included on the worksheet (but they are not used Discount
to denote color, size, shape, or any other mark property). The Profit
Profit Ratio
Rows and Columns shelves, instead, have been populated with Quantity
the generated Latitude and Longitude measures. Sales
Latitude (generated)
Longitude (generated)
Number of Records
4+
+#@+4 Meacure Values
182 Tableau 9: The Official Guide
Filters
Marks
® Automatic ’
@
2 as) Abc Ms @
a O 123 e e-:
Color Size Label . se
e e Ld e ©
Detail ||Tooltip So ; 8
= ed
®
=| Country ee @ < @
® e e = e ee
+) State
6 e
8
@ ® @
@ C) ® .
e s 6
® @
@
Mexico
Tip You may also create maps by selecting at least one geocoded field (with a globe icon)
and clicking either of two map options in Show Me.
There are some basic concepts of mapping that this chapter will expand on:
e Tableau must evaluate a dimension as geographic to use it for maps. The globe icon
indicates a geographic field.
e Tableau actually plots generated latitude and longitude derived from the geocoded
dimension members as X and Y coordinates.
e Tableau displays a background map (by default, downloaded from the Internet)
behind the X/Y coordinate map marks.
In particular, you will get an idea of basic Tableau mapping functionality from comparing
the just-illustrated United States map and the following, which is the exact same map with
“None” chosen from the Map |Background Maps drop-down menu. With no background
map set, the chart looks like a standard scatter plot (discussed in Chapter 4), simply
showing X and Y coordinates of the two numeric measures. A quick glance at the scatter
plot, however, will still give you the general outline of U.S. geography.
Chapter 7: Tableau Maps 183
44 e 2 = / e r)
@
& e
42 & -
° ee
6
=3 40
‘ f @ @ &
®
3 ¢ = e
a 38
- @ e
3 ®
Ly 36
e e e
e & e
34 e
® @ @
32
bd e
30
28 3
Geocoded Fields
The first requirement to use mapping is a proper dimension field or fields. Geocoded Jields
are fields that Tableau interprets as containing geographic data. Tableau automatically
converts the string values of these fields to latitude and longitude that can be used as X/Y
184 Tableau 9: The Official Guide
coordinates on the Rows and Columns shelves. These fields appear with a small globe icon
instead of another data-type icon—when they are double-clicked, a map will result.
Tableau automatically assumes a field is geographic and will add the globe icon to it if its
name includes some type of geographic keyword, such as Country, State, City, ZIP Code,
and so forth. Although this automatic geocoding assignment works well in standard
situations, there are some situations where misinterpretation will occur:
e A field contains a name that Tableau interprets as a geographic field, but the field
contains nongeographic data. A globe icon appears next to the field, but when the
field is double-clicked, a map will result with no marks and a message indicating “x
unknown” at the bottom right.
e A field contains geographic data, but the field name is not recognized by Tableau as
such. No global icon will appear. If the field is double-clicked, a standard text table
containing a row for each dimension member will appear instead of a map.
e A field will be interpreted as a geographic field based on field name. Although
the field does contain geographic data, Tableau will misinterpret the type of
geographic data contained in the field. For example, a field named “Location
State” may actually contain country data rather than state data. When the field is
double-clicked, Tableau will create a map, but will be unable to interpret any of
the fields as state fields. No marks will appear on the map, and a message
indicating “x unknown” will appear at
the bottom right. ns | Analytics Z
[| Sample - Superstore
Although you may be tempted to return to Dimensions BP +}
“Out ofthe box,’ Tableau includes geocoding interpretation for the following
types of
geographic data (some of these roles have been expanded in Tableau 9):
AreaCode Standard U.S. three-digit telephone area codes. Other North American
area codes, such as those in Canada, are not properly interpreted.
CBSA/MSA United States Core Based Statistical Area/ Metropolitan Statistical
Area. This will interpret both standard strings, such as “Denver-Aurora-Lakewood,
CO” and many three-character codes (such as 216, which refers to Denver-Aurora-
Lakewood, CO).
City Worldwide city names. In some cases, smaller towns may not be recognized.
Note that because there can be more than one occurrence of a city name in the
world, it may be beneficial to include country and state/province fields in the data
source to narrow down to a unique country/state-province/city hierarchy
(geographic hierarchies are discussed later in the chapter).
Congressional District U.S. congressional districts. This geographic role
interprets variations of numbers, such as Ist, 4, 6th District, and 23rd. Note that
because there can be more than one occurrence of a district in the United States, it
may be beneficial to add a state field to Detail on the Marks card to narrow down to
a unique state/district hierarchy (geographic hierarchies are discussed later in the
chapter).
Country/Region International country and region names. This geographic role
will interpret full spellings of countries/regions, as well as Federal Information
Processing Standard (FIPS) 10-4 and International Organization for
Standardization (ISO) two- and three-character abbreviations.
County U.S. county names and equivalent second-level administrative divisions
for certain countries, such as France and Germany. Note that because there can be
more than one occurrence of a county name in a country, it may be beneficial to
add a state or country field to Detail on the Marks card to narrow down to a unique
state-country/county hierarchy (geographic hierarchies are discussed later in the
chapter).
State/Province States and provinces, interpreted worldwide. Both spelled-out
and abbreviated values may be supplied. Note that because there can be more than
one occurrence of a state/province name in the world, it may be beneficial to adda
country field to Detail on the Marks card to narrow down to a unique country/state-
province hierarchy (geographic hierarchies are discussed later in the chapter).
ZIP Code/Postal Code Standard U.S. ZIP codes. Postal codes are also interpreted
from Canada, the United Kingdom, Australia, New Zealand, France, Germany, and
New Zealand. Note that because there can be more than one occurrence of a ZIP/
postal code in the recognized countries, it may be beneficial to include a country,
field in the data source to narrow down to a unique country/postal code
(geographic hierarchies are discussed later in the chapter).
186 Tableau 9: The Official Guide
| 8 e @ |
e
@2c®
| if
& @ |
| |
&
|
In these cases, you'll probably want to choose some way to deal with the
mismatched values (although you may choose to simply hide the message by right-
clicking it and choosing Hide Indicator). Several choices exist when you left-click the
message. A dialog box will appear providing three options:
e Edit Locations Displays a dialog box that allows you to match the
misinterpreted geographic values to a value that Tableau understands.
The mismatched values will appear at the top of the list. On the Matching
Location columns to the right, click to display a drop-down list of locations.
Select the location you want Tableau to use for the misinterpreted location.
Selecting the Map |Edit Locations drop-down menu option will also display
this dialog box.
Chapter 7: Tableau Maps 187
‘Edit Locations _
Geographic roles
Country/Region: |Country
| A), issues
| Sphene |
nee
| Arizona Masaka
| Arkansas | Masalli
California |
wpe:
Colorado i Maseru
Connecticut Mashonaland Central
j
zi T Mashonaland East
[-] Show only unmatched location in drop down list atigieg te West
asindi
Masovian |
Reset Matches
Massachusettes pled
Masvingo “tS s
Matabeleland North |e
Matabeleland South
|
| Matagalpa
| Matam
Matanzas
| Mato Grosso
| Mato Grosso do Sul
Matruh
Maule
| Mavrovo and Rostusa
|
Mayabeque
Mayaguana
| Mayaro/Rio Claro
Mayo Ma
e Filter Data Filters out the mismatched values. The Latitude and Longitude
fields will be added to the Filters shelf, set to exclude null values. If you later
want to read the mismatched values and edit locations, you may remove
Latitude and Longitude from the Filters shelf.
'¢ Show Dataat Default Position This option will display a mark on the map
for the mismatched values at the intersection of the equator and prime
meridian (latitude/longitude 0, 0). Unless your mismatched geographic fields,
in fact, do refer to the Gulf of Guinea in the Atlantic Ocean, this probably is the
least desirable of these options.
188 Tableau 9: The Official Guide
Automatic
| & || Ol] i |
Color} | Size|| Label |
Detail “Toottp|
} 1} i
El Country
= State
City
Chapter 7: Tableau Maps 189
Pages
iT Columns Longitude (generated)
Marks
a® Automatic ‘ v
| &®)| Oj]
Color Size | } Label
| Detail | | Tooltip
City
Mexico
© OpenStreetiMap contributors
drop-down menus. The Edit Locations dialog box will appear. Choose the desired
dimensions at proper hierarchical levels to eliminate the ambiguity.
Edit Locations
Geographic roles
State/Province:
City:
Reset Matches
Custom Geocoding
Although Tableau has a fairly extensive built-in set of geographic roles (as discussed earlier
in the chapter), you may find more customized geographic roles are necessary for your
particular needs. For example, you may need to map locations of smaller towns that aren’t
automatically included in Tableau’s built-in geocoding. Or, you may have custom roles
(such as airport codes or your own sales divisions/regions) that you wish to use for mapping.
Tableau enables you to both extend its existing geographic roles by adding data (such as
additional smaller cities) and add your own custom geographic roles and hierarchies.
Consider a data source that refers to a set of small towns in the author’s home state of
Wyoming. Although the file contains the proper series of Country-State-City fields to
adhere to Tableau’s geographic hierarchy, double-clicking the City field only plots two
cities in the state of Wyoming with relatively large populations. The remaining smaller
towns are unrecognized, as indicated by the Unknown indicator at the lower right of the
map. This is an opportunity to add to Tableau’s existing Country/Region-to-State/Province-
to-City geographic hierarchy.
Chapter 7: Tableau Maps 191
Ready
Marks
citi -
@ City Casper '
ee - Country: United States
@® Automatic ba State WY }
: mse |> Rank. 18
| & iS || pt a aat
| Color | |Size | | Label | H
“Detail |Tooltip
CS _ SUM(Rank)
©) State
SUM@Rank)
@ 68
Lz '
@ 2
A :
( }%0
hall e
© OpenStreetMap contributors
192 Tableau 9: The Official Guide
Regardless of whether you wish to extend existing Tableau geographic roles or add your
own custom roles, there are some basic requirements:
« You must create comma-separated value (.csv) text files. You may create these with
Microsoft Excel, a text editor, or some other toolset that creates a CSV file. The file
must be saved with a .csv file extension.
e Ifthe file will extend an already existing Tableau geographic role, it must contain all
fields that match a Tableau geographic field. Further, if the field you wish to add is
part of a standard Tableau geographic hierarchy (existing hierarchies are discussed
earlier in this chapter), a matching field for each member of the hierarchy must be
included in the .csv file. For example, if you wish to add new cities to the existing
Tableau City role, you must also include a Country (Name) field and a Province/
State field for each new city to ensure that Tableau won’t confuse cities you're
adding with other cities of the same name in other states or countries. Fields must
be named the same as the geographic role already defined in Tableau (right-click a
field in the Data pane and choose Geographic Role to see the sub-menu of existing
geographic roles—fields must be named exactly the same in your .csv file).
Caution Despite Tableau’s display of Country/Region in the Data pane’s geographic role
list, you must use a column labeled Country (Name) in the .csv file to properly import
custom geographic roles.
e Latitude and longitude values must be the last two fields in the .csv file. Latitude
must appear before longitude, fields must be specifically named “Latitude” and
“Longitude,” and they must contain “real” numeric values (at least one decimal
place must be included—they cannot be integers).
For example, to add the small Wyoming cities exhibited earlier to Tableau’s existing set
of geocoded cities, this .csv file may be used. Note the geographic hierarchy of Country/
Region-to-State/Province-to-City is maintained, with fields appearing in that specific order.
Following these fields, note the specifically named Latitude and Longitude fields (again, in
that specific order), with real number values. The file is given a descriptive name and
contains a .csv file extension.
Chapter 7: Tableau Maps 193
D a@ wo @ City Extension
Insert Page Layout Formulas Data Review
. e x A. ae Oo {| Conditional Formatting+ Lei
fy 2 RN. — %* wg Format as Table + a
ge |’ (ee
Paste € Font Alignment Number 7 Cell Styles » Cells Editing
Al - fx Country (Name) ¥
: A B c D E F G : R | J
i [Country (Name) Istate/Province City Latitude Longitude
2 United States Wy Riverton 43.027838 -108.39508
3 United States wy Hudson 42.904313 -108.58298
4 United States wy Lander 42.833035 -108.73263
5 United States wy Farson 42.171927 -109.4201
6 United States WY Powell 44.758797 -108.7584
7 United States WY Cody 44.523244 -109.05711
Furthermore, you may wish to add your own custom geocoded values, such as Sales
Divisions, Plant Locations, and so forth. These can be independent of any existing Tableau
geographic hierarchies, can depend on existing fields (such as Country/Region or State/
Province), or can establish their own hierarchies separate from any existing Tableau
hierarchies. As with the previous example, field names in the .csv file need to be specific. In
particular, any existing Tableau hierarchies must be accounted for with matching field
names. New geographic fields should be properly named. And Latitude and Longitude
fields should be the last two fields in the .csv file and should contain real number values.
The file is given a descriptive name and contains a .csv file extension.
194 Tableau 9: The Official Guide
D0 a - e)
Insert Page Layout Formulas
— % &| Conditional Formatting = bth Q
re
eh
x
ee : tee -
ii hae o @ Format as Table ~
Paste $ , Font Aligament Number Calls Editing
g_ Call Styles
= fe Country (Name) ES
Al
A B C Dd E F G ta] t | K
1 [Country (Name) Joivision Latitude Longitude
2 Canada West 53.956086 -127.44141
3 Canada East 55.578345 -69.609375
4 Canada North 64.014496 =-104.0625
5 Canada South 49.95122 -96.679688
6 United States West 40.044438 -113.90625
? United States East 40.713956 -78.046875
8 United States North 45.460131 -100.54688
9 United States South 31.653381 -95.625
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Ready
Once you have created one or more .csv files containing your custom geocoding, you
may import them. Choose Map |Geocoding |Import Custom Geocoding from the pull-
down menus. Because Tableau does not give you the opportunity to import individual .csv
Chapter 7: Tableau Maps 195
files, but imports all .csv files in a folder path, you'll be prompted to choose a folder. Choose
the folder (or sub-folders) that contains the .csv files you wish to import. Click OK. Tableau
will merge your custom geocoding with its existing geocoding (a large number of row
counts will result, even if you are only importing a small number of new values).
7 Computer |
(iw Local Disk (C:) |_|
& MobileBackups ¢ |
&® Photo Stream on| ]
&3 iCloud on 'psf' (*
8 Home on 'psf' (Y
ca Mac Disk(Z) eg | ee rt
Folder: Custom Geocoding
196 Tableau 9: The Official Guide
Once the import is complete, your custom geocoding values will be available to use for
your own maps. After importing the small cities in Wyoming, as discussed previously, a
map will now properly interpret the small town names in a data source.
Filters
Powell
Marks Cody
©® Automatic Y
&® || SO ||
Color Size Label
Detail | |Tooltip
133 City
=) Country 5
} State Farson
SUM(Rank)
30 3 5 . ~ ~ Cheyenne
au ~ | © OpenStreetMap contributors
SUM(Rank) Ces
SS Snail cities imported via custom geocoding. This import adds to existing Country/State/City geocoding.
8 40
If you import your own custom role, it will now be available on the Geographic Role
context menu when you right-click a field. Assign the custom role to a geographic field from
your data source. Then, the new custom geocode will properly map your custom latitude
and longitude values.
Chapter 7: Tableau Maps 197
Aliases... |
| Create La
Transform |
Convert to Measure |
Change Data Type >
es
| ——_—____—_—— a
Geographic Role » |© None
| Default Properties > | Area Code
{ H
lee Vereen be : | CBSA/MSA
| Folders | ex
Hierarchy > | Congressional District
/ Country/Region |
| Replace References... County
[ Describe... q Divisi
| State/Province
| ZIP Code/Postcode
Filters Dae
Marks
—$— e
@ Automatic ’ Canada/North
EEA Lg wee Ly ee 285,000
| & || S|) 8 1]
Lcolor| | Se ||Label
Sea ae via Canada
|Detail|‘Toottip| \
t im } q
: Can
e 375,000
est
450,000
e@
i —~Canada/South
2 750,000 ~ Pa
3 e “ oes i
< United States/North } Foe
1,100,000 pet
@ United Ss
States United Stetes/East
1,875,000
198 Tableau 9: The Official Guide
Note To remove previously imported custom geocoding, select Map |Geocoding |Remove
Custom Geocoding. Also, ifyou open a Tableau Packaged Workbook (a .twbx file), such
as sample workbooks downloaded from TableauBook.com, any custom geocoding saved
in the workbook will be retained for that workbook. You can even import custom
geocoding saved with a workbook into your local repository to use for other workbooks.
Just choose Maps |Custom Geocoding |Import Custom Geocoding, and select the Import
From Current Workbook radio button.
Custom geocoding allows you to add custom latitude/longitude values to your own
geographic dimensions. This is helpful when you need to create various maps on a
regular basis using these custom values. However, if you happen to possess latitudes
and longitudes as part of your regular data source, you may map directly using the
latitude and longitude values. Custom geocoding (or any geocoding, for that matter)
will not be required.
Although not absolutely necessary, it’s helpful if the latitude and longitude values
in your data source are specifically named “Latitude” and “Longitude” and are
numeric values. If so, Tableau will automatically assign them geographic roles (globe
icons will precede them) and place them in the Measures portion of the Data pane. If
Latitude/Longitude fields are named differently and Tableau doesn’t automatically
recognize them, simply right-click the fields and choose Geographic Role |Latitude Or
Geographic Role |Longitude from the context menu. Tableau will then place the globe
icon on the fields and treat them as latitude and longitude values. If latitude and
longitude are stored in your data source as non-numeric values, or if you need to
create customized latitudes and longitudes based on some sort of business rule, you
may create calculated fields (covered in Chapter 6). The calculated fields should return
“real” numeric values with at least one decimal place. They may then be assigned the
latitude and longitude geographic role.
Chapter 7: Tableau Maps 199
Al = fe Location y
A B Cc D E F G hk I J K 4
1 [Location ] Rank Latitude Longitude
2 Riverton 40 43.027838 -108.39508
3 Hudson 10 42.904313 -108.58298
4 Lander 27 =42.833035 -108.73263
5 Farson 8 42.171927 -109.4201
6 Powell 13. 44758797 -108.7584
7? Cody 18 44.523244 -109.05711
g
3
10
11
12
13
14
15
16
17
18
19
20
Drag Longitude onto the Columns shelf and Latitude onto the Rows shelf. Tableau
will automatically plot these fields to their geographic locations and display an
appropriate background map. Depending on how your data is organized, you may only
see a single point on the map consisting of the aggregated latitude and longitude
values for all records in your underlying data source. In this eventuality, you may place
a field that provides a breakdown of individual locations (a location, name, or
customer field and so forth) on Detail or Label on the Marks card. You may also choose
to disaggregate your data so that Tableau plots each individual record in the data
(continued)
200 Tableau 9: The Official Guide
Filters |
Powell
Marks @
Cody
e® Automatic 7
@j\fo]{ %
| Color Size Label
Detail ||Tooltip
& SUM(Rank)
S$ SUM(Rank) |
435 Location
SUM(Rank) @
= . e
8 40
| SUM(Rank) Lander
Farson
e ZoomIn_ Click the plus sign control to zoom in on the map. If the view toolbar is
hidden, double-click the map to zoom in. If you are using offline maps, you may be
presented with a message indicating that additional map detail is only available
i+
x
with online maps.
e Zoom Out Click the minus sign control to zoom out on the map. If the zoom
controls are hidden, sH1FT-double-click the map to zoom out.
e Reset Click the pushpin control to return the map to the default zoom level that
appeared when the map was first created. This button is also duplicated on the
Tableau toolbar.
Additional options appear when you hover your mouse over the arrow control. Ifyou
wish to “lock” these additional options, press SHIFT before clicking the desired control. The
selected control will remain active until you select another control within the arrow sub-set.
e AreaZoom Click the magnifying glass/box control to turn on area zoom mode.
Tete tarerel The mouse cursor will change to a magnifying glass with plus sign.
Boat s G Hold down the mouse button and draw an elastic box around
the portion of the map you wish to zoom into. If the zoom controls are hidden,
CTRL-SHIFT (SHIFT-COMMAND on Mac) will display the magnifying glass with plus
sign for area zoom.
202 Tableau 9: The Official Guide
Map Search
Tableau 9 adds the ability to perform a text search for locations on a map. When you hover
your mouse over a map, the magnifying glass search icon appears in the upper left (if you
wish, you may disable map search by unchecking Map |Show Map Search). When you click
the control, a search text box appears. Type in a geographic location you wish to search for
(map search will search for continent, country, state or province, county, city, or postal
code). As you type, Tableau will use a combination of data from the workbook’s data source
and a larger selection of geographic map data to display five possible matching geographic
locations.
When the desired location appears in the list, click it with your mouse or use cursor
keys to highlight it and press ENTER. Tableau will zoom to that selected geographic location
(and, if the location happens to be far away from the currently displayed map, Tableau will
display the searched location regardless of the initial map display). To return to the original
map location and zoom level, click the pushpin button.
Chapter7: Tableau Maps 203
[Pre hb
| Parke’ |
a
Parkent,
I.
i
Parkes,
/ &
| Parkland,
/ Parkland, .
= Sr)
Map Options
Tableau online maps are very flexible, offering views based on worldwide geographic data.
You may modify various visual characteristics, such as background style and washout level.
Also, background maps have varying levels of detail known as map layers and data layers.
Map layers are a variety of graphic overlays that can be turned on or off at will. For example,
Tableau maps offer country name and boundary, state name and boundary, streets and
highways, ZIP and area code boundaries and names, and similar overlays that will appear
individually or in combination with each other on top of the initial map detail (some map
layers are limited by the country being shown on the map). Data layers are colored shades
that may be enabled on maps based on U.S. demographic data. Tableau map data layers
include such various data breakdowns as population, occupation, housing, and so forth.
Set map and data layer options by selecting Map |Map Options from the drop-down
menus. The Data pane will be replaced by the Map Options pane. Here, you may change
the map style (which changes the color and intensity of the map background), washout
level (which changes the contrast of the map background), and the Repeat Background
option, which will replace white space with repeated portions of the map, depending on
screen size or zoom level.
Map layers may be checked on and off on this pane. Note that some layers may be
dimmed, based on the current zoom level of the map. Zooming in farther on the map will
eventually enable these choices. Check layer options you wish to view. For example,
204 Tableau 9: The Official Guide
checking street names, county borders, and place names will add elements on top of the
existing map.
Mla
Vs
a
£ OpenStmnetitan contreutors
Caption
Various map layers enabees via Map! Map Optons, Notice streets, county Borders. and “place names ~
[MakeDeteut [Reset]
Data layers (which are only available on U.S. maps) may be enabled by clicking the
drop-down menu in the Data Layer section of map options. Select the data layer you wish to
display. You may also choose the geographic area (such as state, county, or ZIP code) that you
wish to highlight for the chosen data layer, as well as the color palette you wish to use. The map
will be shaded to match your choices, and a color legend will appear denoting the data layer.
1ssoar
BOSsRa
S OparStruvtelap contrawwtors %
"_Mesan.apeby
ZIPcode,usingtreDivegreencomecalwon Thesechokes aremadetromtheDitaLayersrogdown tomMap|MapOptorm
Chapter 7: Tableau Maps 205
URL
|WMS for the GEBCO global bathymetric grid http: //www.gebco.net/data_and_products/gebco_web_services/web... |
[OK ) Cancel
(Add... _||_Import.. |
If you wish to edit or delete existing WMS servers in the WMS Server Connections
dialog box, select the desired entry and select Edit or Delete. WMS servers will be available
to all worksheets in the workbook. If you wish to share the WMS server URL with other
Tableau users, you may select an entry in the dialog box and click Export. Tableau will
display a Save As dialog box, prompting you for a filename. The file will contain a .tms
(Tableau Map Source) extension. This file may be shared with other Tableau users, who can
then add the WMS server to their copy of Tableau by clicking the Import button in the WMS
Server Connections dialog box (all a .tms file contains is the URL—you may find that simply
e-mailing the URL or providing it via some other interoffice communication method is
ating a .tms file).
their ,
BR COn ne fae one ismore WMS servers and Tableau has validated
background map options (beyond None, Online, and Offline)
capabilities, a list of additional
will appear on the Map |Background Maps sub-menu. Choose the desired WMS-supplied
206 Tableau 9: The Official Guide
map that you wish to use. In this example, a WMS is providing a custom background map
displaying “bathymetry,” the underwater counterpart to topography. Note that a separate
set of map and data layers will exist in the Map Options dialog box, based on the particular
WMS server’s capabilities.
x
=e Pages 1) Columns Longitude (generated)
Background :
#5 Rows Latitude (generated)
Style .
Filters
Washout —{} 15% Country / Region
Repeat Background
135 GB City
© Country/Regi.
& State
+) City
(MakeDefaut | {Reset)
Tip Ifyou often find the need to use offline maps or a particular custom WMS server,
you may change the default map source. First, choose the map source you wish to use
(Online Maps, Offline Maps, None, or a previously added WMS server). Then, select
Map |Background Maps | Set As Default from the drop-down menus.
Tip Although you may think you need geocoded fields to take full advantage of Tableau
mapping, you may use other nongeocoded fields to enhance your map. For example, by
simply color-coding a map based on another nongeocoded dimension (such as region),
your map exhibits various colors based on related geographic areas.
Filters
Marks
© Automatic ’
aioli ®
Color Size Label
Detail |Tooltip @ - @
suns $920
> e @
(S89 —s100,000 ® a e @
. e
{ } $200,000 @ bd
$200,000 ee @
{ } $457.68
Region €
By Centrai \
BB east
Py South
BB vest Mexica
® OpenStreetiap contributors
208 Tableau 9: The Official Guide
Two mark types have particular possibilities with maps. The first, Filled Map, is used
automatically if you choose the Filled Map option in Show Me when first creating the map.
However, if you initially created a map by just double-clicking a dimension, you may
change the mark type on the Marks card to Filled Map to replace the default circle mark
with a filled map. Filled maps benefit in particular from another dimension or measure
added to Color.
&
Country 7Regi.
+ Sate
SUM(Sales}
The second mark type that may not initially come to mind for map usage is Pie. Used
judiciously, this mark can provide extra value to maps by breaking down geographic data
by another dimension and measure. Once a map has been created, change the default
mark type to Pie. Drop the dimension you wish to subdivide the pies by on Color (each
dimension member will create a pie wedge)—but be careful, as any dimension with more
than four or five members will probably create too many wedges to be of use. Then, drop
the measure you wish to determine the size of pie wedges on Angle. Although you may
Chapter7: Tableau Maps 209
find it diminishes the value of the map if overused, you may even consider
dropping
another dimension or measure on Size to vary the size of each pie.
Marks ‘ ¢
© Pie aa
@jlalla
Color Size Label @ e e
oe
= Country
/ Regt.
- @« @ sg@
ad
@e@
Pei
&
&
Geo
« e @
Department
Hl curnture
Bom pplies & e & ®
BB techrcicg ay é ®&
SUM(Sales) @ e
With all the possibilities discussed earlier in this chapter, you may still find uses for
geospatial data representation in Tableau that built-in geocoding, Tableau background
maps, or custom WMS servers can’t satisfy. Well, Tableau provides yet another way to plot
data on your own custom background images. The possibilities are as rich as are the
availability of pictures or drawings.
Tableau 9: The Official Guide
&|i ol! % @ *: @
Neck
Am
& SUM(Numberof R- 6 e
3 SUM(Number of R.. oo
kK a Page =n
Hand
z os Leg
$
Knee
19
Foot
22
Consider the image illustrated in Figure 7-1. This type of visualization could be
invaluable to an orthopedic surgical practice that is analyzing its case mix. Or a company
that evaluates employee injuries on a regular basis might find this of immense benefit.
Much as with the two main components of Tableau mapping (geocoding data to derive
latitude and longitude, and background maps), Figure 7-1 depends on two main
components: (1) a consistent X/Y coordinate system to plot marks, and (2) a custom
background image.
values. Measures or dimensions representing these X and Y values are placed on the Row
and Columns shelves, which determine the specific location on the visualization where a
particular mark will appear.
Determining the proper placement and relationship of these X/Y coordinates (the
“coordinate system’) will be dependent upon the background image the marks will appear
on top of. Referring again to Figure 7-1, if the background image is 99 “units” wide and 325
“units” tall and the mark to indicate “Head” needs to appear at the top center of the image,
the X coordinate should be 50 (halfway across the image) and the Y coordinate should be
318 (close to the maximum height of the image).
Determining the number of “units” wide and high will be the first decision you'll need
to make. Although the width and height of the background image in pixels is one way to
achieve this (and the example in Figure 7-1 has been specified this way), this is not required.
In fact, you may specify any beginning and ending X and Y values you wish when you add
the background image. So, theoretically, the beginning X and Y values could be set to 0, with
the ending X and Y values set to 1. Your coordinate system would then assume that all X and
Y values used to plot marks would be fractional numbers between 0 and 1. The specified
beginning and ending values could be 0 and 100, between -100 and 100, and so forth—you
may set the minimum and maximum values to anything you choose, as long as the actual X
and Y values that will be used to place marks on the visualization will fall between the
minimum and maximum. In fact, you may often have to change the initial minimum
and maximum values you assign to a background image to achieve proper placement
of marks—a fair amount of experimentation may be required to get desired results.
Prior to adding a custom background image, you'll need to identify the X and Y fields
you wish to use to place marks on the image. They can be existing dimensions or measures
in your data source, or they can be calculated fields you create (calculated fields are covered
in Chapter 6). In the example illustrated in Figure 7-1, the X and Y coordinates are created in
calculated fields that assign specific values based on the type of injury being plotted.
e Provide a descriptive name for the image. This name will appear in the list of
images presented by the Background Images dialog box.
e Specify a filename or URL that points to the image. Tableau supports most standard
image formats, such as JPG, BMP, TIF, PNG, and so forth. Once you specify a
filename, a thumbnail of the image will appear on the dialog box. Slide the
Washout slider to change the contrast of the image.
e From the drop-down field list, specify the field in the data source to act as the X
field. Only numeric fields will appear in the drop-down. Make the same field choice
for the Y field.
e Specify left, right, bottom, and top values to establish the boundaries of your
coordinate system. For example, the background image illustrated in Figure 7-1 is
99 “units” (in this case, pixels) wide by 325 “units” (in this case, pixels) tall, and the
X and Y calculated fields have been designed to provide integer values between
Chapter 7: Tableau Maps 213
these limits. As such, left and right values are set to 0 and 99, with bottom and top
values set to 0 and 325.
¢ On the Options tab, check Lock Aspect Ratio if you wish Tableau to maintain the
same width-to-height ratio of the image as marks or zoom levels change.
Otherwise, the image may be stretched horizontally or vertically when the
worksheet resizes.
e On the Options tab, check Always Show Entire Image if you want Tableau to not
zoom in past the edges of the image.
e On the Options tab, click the Add button if you wish to add filter conditions to
determine when to show the images. For example, you may wish to choose from a
variety of background images, depending on a Male/Female filter or a Child/Adult
parameter.
| Injury LocationX |
Left: 0
Right: 99
Y Field
[Injury LocationY ¥}
Bottom: 0
Top: 325
Washout: (
vefields to the
Once the image has been added, any time you drag the specified Xx and
display behind the
Rows and Columns shelves, the background image will automatically
when pecine i
marks. Note that you won't want Tableau to aggregate the X and Y values
values. For siee eal
them on the worksheet, or the positions won’t match to the desired
but there are five
the X/Y value for a particular dimension member should be 10-20,
214 Tableau 9: The Official Guide
records in the underlying data source for that dimension member, Tableau will sum
the X/Y values and place the mark on the chart at position 50-100. This may not display the
background image at all, or may display it as a very small picture. In any event, marks won’t
be plotted at proper positions in front of the image.
To avoid this issue, either change the aggregation type for the X and Y values to
something that returns the actual underlying value (such as Average, Minimum, or
Maximum) or convert the numeric values to dimensions. Both of these approaches may be
accomplished by right-clicking the field indicators on the Rows and Columns shelves and
making the desired choice from the context menu.
Tip Charts displaying custom background images may still show an axis for the X and Y
values. You may hide these by right-clicking on the axis and unchecking Show Header.
You still may see unwanted lines next to the image. These “zero” lines are desirable
when charts and axes are denoting numeric values, but are probably a distraction when
displaying a custom background image. Set them to None with the Lines formatting
option.
Az SH /7| Fields ¥
| Sheet |Rows |Columns |
Lines —
=
Zero Lines: None, 5.03
teadines |
w
Ref Lines: |—————_——._
Axis Ticks: ¥
CHAPTER _
Creating Dashboards
and Stories
I:many Cases, the finished product in a business intelligence project consists of one
or more dashboards. A Google search on “dashboard” probably will return more
computer-related definitions than descriptions of the portion of a car that displays
the speedometer, fuel gauge, and other key performance indicators. Still, a business
intelligence (BI) dashboard serves a similar purpose: to combine in one viewable space
more than one key performance indicator, chart, or diagram to present a unified view to
your audience.
Although you can use dashboards with actions to create a “guided analytic,’ Tableau
features a built-in option specifically for this purpose. By combining multiple worksheets
and/or dashboards into a Tableau story, an organized, guided “move forward or move
backward view by view” chart series is simple to create.
Depending on how the workbook is finally distributed or viewed (in a copy of Tableau
Desktop or Tableau Reader, exported to a PDF file, or posted to Tableau Server or Tableau
Public), the end user may view the combined dashboard, individual sheets, stories,
or everything.
215
216 Tableau 9: The Official Guide
Although a fixed dashboard size lets you plan for specific device screen sizes, there are
tradeoffs. The first issue you may encounter with a fixed dashboard size is introduction of
scroll bars. Depending on how many sheets you add and how you size individual sheets,
horizontal/vertical scroll bars may appear. This may require inconvenient sizing or
placement requirements of some dashboard elements. The other tradeoff is compromises
for devices with other screen sizes that may use your dashboard. Whereas a dashboard
sized to the specific iPad pre-set may be sized perfectly on an iPad, a full computer screen
will suffer from the small overall dashboard size.
There are two alternatives that may better serve a wider array of devices or a varied set of
dashboard objects. Automatic size eliminates scroll bars and resizes objects within the
dashboard automatically as viewers resize their screens. The Range option provides a
potential “happy medium” between a restrictive fixed dashboard size and an unpredictable,
fully automatic dashboard size. Here, you may specify upper and lower width and height
limits, which will permit automatic sizing as long as the dashboard stays within the specified
limits. If the end user sizes their screen beyond the limits, the dashboard will size to the
specified limit and scroll bars or white space will appear. You may wish to experiment with
an initial dashboard size setting (perhaps automatic) and later modify to a range or fixed size
based on behavior of specific devices and feedback from viewers.
Adding Sheets
Next, you can begin adding worksheets to the dashboard. One immediate choice to make is
whether to add worksheets in tiled or floating mode. There are two buttons midway down
the Dashboard window that permit this selection, which applies to any worksheets you add
to the dashboard moving forward. If the default tiled setting is retained, worksheets will be
placed on the dashboard in a logical side-by-side, top-and-bottom fashion, with no
worksheet, legend, title, caption, or quick filter permitted to overlap any other dashboard
element. If floating is chosen, any worksheet added to the dashboard from that point
forward (even if there are already tiled worksheet elements on the dashboard) can be freely
placed in any location.
New objects:
| Tiled | _ Floating
with
we ~ Best Practice You may be immediately tempted to add all dashboard elements
| the floating option for maximum flexibility . You'll soon discover, however, that
e
*” perfectly aligning dashboard elements may prove difficult. It may be preferabl
to use the tiled option to facilitate good element alignment . You can then select
_
individual dashboard elements that you want to move freely (such as legends),
them only, as discussed later in the chapter under
and choose the floating option for
“Floating Placement.”
218 Tableau 9: The Official Guide
Tiled Placement
This default setting places worksheets and their associated elements (captions, quick
filters, and so forth) in a strict “no-overlap” order on the dashboard. The most basic way to
use tiled placement is to simply double-click worksheet names in the order you want to
add them to the dashboard. Tableau will add each worksheet to the dashboard in a side-by-
side, then top-and-bottom order.
For example, if you double-click two worksheets, the second will be placed to the right
of the first, with the dashboard divided in half vertically. If you double-click a third sheet,
the dashboard will split vertically on the left, with the third worksheet appearing below the
first. A fourth double-click will divide the dashboard into four even quarters, with one
worksheet being placed in each. All related worksheet elements (such as quick filters and
legends) will be placed on the right side of the dashboard. Figure 8-1 illustrates a simple
dashboard containing four worksheets that were double-clicked in order of appearance in
the worksheet list.
You can also drag and drop worksheets from the worksheet list onto the dashboard.
Although the resulting placement of new views can seem confusing if you're just getting
DOTS Sa a OU
(2) Tableau ~8 = Dashboards - ; :
File Data Worksheet Dashboard Story Analysis Map Format Server Window Help
we B & Gy > ay Ge- ,° uals © FSX (tes) ils Show Me
Dashboard
Gig) Soles/Proft by State
3 a é Sales/Profit
5 by State
: ~
80%1%, of Sales/Sub-Category Sak
es a
ui, 80% of Sales/Sub-Categ... Sub-Category A
i Sub-Category Profit $100,000
ug Segment Comparison $300,000 $ $200,000
® $300,000
& f = } $400.0
, firs a =
*@ ® g $200, e $457.68
Untited 8 E Profit
© States ,C08 Ge [az
: Ag $100,000 § 305723 $76,381
e 5 Within 80%?
t} : “ EENo
yes
CH Hor 1 Gt Segment
00) Horizontal [ad] Image BB consumer
= Vertical 8 Web Page Heatida porto iors BB Corporate
A Tet C] Blank s
Sub-Category Profit Segment Comparison jae once
New objects:
{Tiled || Floating
et a Chairs
B Tied FurnishingsStorage Copiers
jashboa Js ’ 7
Accessories“ Paper
Binders” Phones ope
= ibis Consumer
we Appliances
Size Automatic Ss
wi923 fs hi66a it
Show Title
(5 Data Source
used to dragging and dropping sheets, there are a few tips that will help you master exactly
where the sheet you are dragging will appear in relation to existing sheets:
e A large gray box indicates that the sheet will split the dashboard in half vertically
or horizontally.
| Sales/Profit by State
e A thin gray box (typically at the very edge of the dashboard, but also between
legends and worksheets) indicates that the sheet will take up that entire portion of
the dashboard, resizing all other dashboard elements to accommodate it.
RhSegment Comparison. Soles
Sales/Profit by State $920
$100,000
$200,000
} $300,000
} $400,000
} sas7.688
Canada as zB
bossyFi $76,381
Segment
Bl Consumer
BE Comsrate
BB Home Office
%
@
1 United
® Stetes @ce
Le &
& o¢
@ OpanStreetMap contribytors.
220 Tableau 9: The Official Guide
e Amedium gray box indicates that the sheet will be placed in between the two
elements on either side, resizing the other two elements to accommodate it.
ik.
Profit
~
[Se
=
w Soment
x
ems
50.56%
Consumer
Once you've placed a worksheet on the dashboard, you can move it to a different
location. When you select the desired sheet on the dashboard, you'll notice the small
series of white dots at the top of the title bar (known as a “move handle”). Hold your
mouse down on the move handle and drag the sheet to the desired location, keeping in
mind the tips just discussed.
You can also resize a worksheet or legend once it has been placed on the dashboard.
Point to the top, bottom, left, or right edge of the element you want to resize until you see a
double-arrow cursor. Drag to resize the selected element, and resize adjoining elements
accordingly. Tableau makes experimenting easy. If you don’t like the result of a worksheet
placement or resize, simply click the undo button in the toolbar or press CTRL-z
(COMMAND-z on Mac) and try again.
Tip After you add a worksheet to the dashboard, you may find that the visualization in the
worksheet is not properly sized. There may be scroll bars that you don’t want to see, or an
object may be too small or too large for the space it’s been allotted on the dashboard.
Similar to the fit option available in the toolbar when you’re creating a worksheet, you can
size the object separately within the dashboard. Select the desired sheet on the dashboard
and click the context arrow in the upper right of the title bar. Make the desired choice from
the Fit option on the context menu.
Chapter 8: Creating Dashboards and Stories 221
Segment Comparis a 3
~ Go to Sheet
18.70% Duplicate Sheet
Parameters > |
Use as Filter
Tonore
Ignore
Floating
Floating Placement
Although tiled dashboards guarantee perfect alignment, they also present a degree of
rigidity that may eliminate flexibility with certain dashboard layout requirements. Floating
placement permits worksheets and associated dashboard elements to be placed freely
anywhere on a dashboard.
After clicking the Floating button under Add New Sheets And Objects As, worksheets
can be freely placed anywhere on the dashboard. If the worksheet includes legends, quick
filters, or a caption, these items will also be placed on the dashboard as freeform elements.
Once they have been dropped, worksheets and their associated elements can be freely
moved and resized without limitation. An immediate benefit of floating placement is the
ability to move legends on top of existing worksheets that may have blank areas, such as
maps. Figure 8-2 illustrates this.
Tip You may alternate between floating and tiled behavior of individual worksheets when
you move them on the dashboard. Ifyou hold down suir1 and drag a floating sheet, it will
become tiled. Conversely, a tiled worksheet will float with suirt-drag.
If you already have existing tiled worksheets on the dashboard, floating worksheets will
always appear on top of them. If you have multiple floating worksheets, you can choose
the floating order, placing one object on top of or behind other floating objects. Select the
desired floating sheet on the dashboard, click the context arrow in the upper right of the
title bar on the object, and make the desired floating-order choice from the context menu.
You may accomplish the same task by dragging and dropping floating objects into a
different order within the Layout section in the left of the Dashboard window.
Object transparency becomes important with objects as well. Although text you add from
the Dashboard window, worksheet legends, and transparent images (such as transparent
PNG files) will permit the underlying worksheet image to show through, other worksheets
and some associated elements (such as quick filters and parameters) aren’t transparent and
won’t reveal the underlying worksheet image.
222 Tableau 9: The Official Guide
Sales/Profit byAtate
Year of Order Date
t “s
sie (iw) (All)
¥} 2011
VJ 2012
f¥} 2013
ad [¥] 2014
1
es ®@ eS
+ 7+ = 50.56%
@ Consumer
gg + | b |e a U’ \
ss Corporate
eee Tableau.com
50% Sales
You may find that a combination of tiled and floating dashboard elements, such as that
exhibited in Figure 8-2, gives you the best of both worlds. For example, you may prefer the
perfect alignment of several tiled worksheets. However, you then may want to place map
legends over unused areas of a map (such as open water). Simply select the legend you
want to float, click the context arrow in the title bar, and check Floating from the context
menu. The legend can then be moved to any place on the dashboard.
aa
ay Best Practice Ifyou have several worksheets that use the same quick filter, consider
“1 one of several approaches to eliminate duplicate quick filters appearing ona
dashboard. Look for choices to apply the quick filter to all worksheets using the
data source, or one or more sheets on the dashboard. You may also consider using a
parameter instead of a quick filter (for example, ifyou want a single prompt to
apply to worksheets not based on the same data source). The parameter can be
applied flexibly to more than one worksheet, but need only be displayed on the
dashboard once. Quick filters and parameters are covered in detail in Chapter 5.
emaeeacaaeaacaaaaacaacaaaaacaaaaasaaasaaaaaaa aas
en
Heenan cn
Layout Container
s,
A layout container is an outline or box that contains other objects, such as worksheet
container is automatic resizing of
legends, and quick filters. The main benefit of a layout
size of a workshee t ina container
objects within it. If, for example, a quick filter changes the
will automatically
(perhaps a crosstab shows fewer rows), the other objects in the container
resize to accommodate the smaller worksheet.
224 Tableau 9: The Official Guide
With tiled worksheets, layout containers are an integral part of a dashboard. In fact,
even though you don’t explicitly choose them, layout containers are added in quantity
when you add worksheets in tiled mode. Consider the dashboard illustrated in Figure 8-3,
which was created by simply dragging three worksheets to a new dashboard with tiled
mode selected. Because one worksheet includes two legends and a quick filter and each of
the other worksheets includes a legend, several layout containers are automatically created to
accommodate the combination of worksheets and associated dashboard elements.
There are two general ways to familiarize yourself with automatic layout container
creation:
-$25,729 $76,381
Within 80%?
80% of Sales/Sub-Category Segment Comparison in =
Sub-Category gs Ves
so 51 si
o ad ee e se 2 weeerevseewvwn 2
SRESSER
TE Zag
FRE< &a
assg
2: 3 =
2 SPF&Etecus
ak” Geese e sey 2 f=
=» oa 3 a a &
eS it,
Blank
Another dashboard element that’s primarily intended for tiled dashboards is the blank.
When dragged to a dashboard and sized to a desired width or height, this element simply
inserts white space that can be used to separate dashboard elements from each other.
Text
In addition to individual worksheet titles (which appear automatically when a worksheet
by way
is added to a dashboard), as well as an overall dashboard title that can be displayed
item, you can add text by dragging this
of the Dashboard |Show Title drop-down menu
226 Tableau 9: The Official Guide
item from the left side of the Dashboard window. When you drop the text element, an Edit
Text dialog box will appear, allowing you to type and format text, including adding pre-
defined dashboard fields from the Insert drop-down menu. Text can be added in either
tiled or floating mode. In tiled mode, text will exhibit the same “gray box” behavior as other
dashboard elements when being placed or moved on the dashboard.
Image
Also usable in tiled or floating mode, a bitmap graphic can be added to your dashboard by
dragging Image from the left of the Dashboard window. Once dropped on the dashboard, a
dialog box will appear prompting for the choice of an image file from a local or network drive.
Navigate to the desired folder and select an image file. You can also type in a full URL to an
image on a web server. Once an image has been added, you can change the image file, add a
URL to permit the image to act as a web page hyperlink, center the image, or scale the image to
fit by right-clicking the image on the dashboard or right-clicking on the image item in Layout.
Note Tableau 9 on the Mac takes special advantage of a high-resolution Retina display for
maps (covered in Chapter 7) and high-resolution image files on dashboards. By default,
Tableau will reduce the resolution of dashboard images to maintain similar image size
on standard resolution and high-resolution displays. Ifyou wish to retain the high
resolution of the original image, place the characters “@2x” at the end of the image
filename before the file extension (such as HighRes [email protected]). Tableau will add the
image to the dashboard in full resolution.
ei
= Best Practice Many a dashboard includes a large company logo, often in the upper
| left of the dashboard. Reconsider this approach. As the human eye generally
processes information from left to right and top to bottom, the upper left of a
dashboard is often the first thing seen. A key metric is probably better suited for
upper-left placement in a dashboard.
Web Page
A web page can be embedded in a dashboard by dragging Web Page from the left side of
the screen. A URL prompt accepts any standard web page address. All typical web page
interactivity, such as hyperlinks, is available on the web page in the dashboard. Although
this allows you to include a static web page in your dashboard, exceptional flexibility to
customize web page interactivity exists with dashboard actions, which are discussed later
in the chapter.
lower left of the Dashboard window, which provides precise control over
the position and
size of individual dashboard elements (provided they are in floating mode). Either
on the
dashboard itself or in the Layout section above the Size section, select the workshee
t, legend
or other element that you want to change. Then make desired entries in the Size section.
:
Sizing the overall dashboard is also accomplished here, as discussed earlier in this chapter.
Layout
Dashboard
Li] Segment Comparison pierrerisyy goss ag
A Tableau.com
la Tableau Logo.png
YY Year of Order Date
2= Profit
+ (8 Tiled 18.70%
4 [10 Horizontal ne ae
4 UB Tiled
fii) 80% of Sales/Sub-Category |
—<
{il Sub-Category Profit Sp SB%
Gil Sales/Profit by State we
Consumer
W.74%
“Segm
- ent Comp aoe E at Corporate
: 100.005
Dashboard Actions
Tableau provides flexible interactivity in your dashboards beyond the default tooltips that
appear when you hover your mouse over worksheet marks. This interactivity is supplied via
dashboard actions, interactive settings that allow you to highlight, filter, and navigate from
any mark on any worksheet on your dashboard.
Note Some of the interactivity discussed in this section also applies to individual worksheets.
When editing a worksheet, choose Worksheet |Actions from the drop-down menus to
create and edit actions.
Furthermore, there are three ways that the viewer can initiate a dashboard action:
Caution Be judicious with use of dashboard actions initiated by hovers. Typically, only
highlight actions are appropriate for this method. Otherwise, simple mouse movement
may initiate time-intensive or undesired actions.
Highlight Action
The purpose of a highlight action is to highlight related marks on other sheets in your
dashboard based on a chosen mark in a source sheet. A basic example of highlighting that
Tableau provides by default is exhibited when you click an individual entry in a color
legend. You'll typically see marks on the related sheet highlighted based on the legend
entry you click. When you deselect the color legend entry, marks are unhighlighted on the
sheet. A highlight action takes this capability a step further and allows worksheet marks
(not legends) to highlight other related marks on other sheets.
To create a highlight action, select Dashboard |Actions from the drop-down menu.
The Actions dialog box will appear. Click the Add Action button and choose Highlight
from the pop-up menu. From the Edit
Highlight Action dialog box, select the
method of initiating the action (hover,
select, or menu). In the Source Sheets Source Sheets:
aa ? ath
Profit byState 0
Tiled Dashboard
Tiled/Floating Dashboard
Centra
13.86%
West
37 86%
East
31.96%
South
16.32%
Filter Action
Although quick filters and parameters are options for filtering interactivity on a dashboard,
a filter action permits additional interactivity, where one or more worksheets on the
dashboard are filtered based on a chosen mark on the source sheet. For example, when a
certain mark is clicked on one sheet, other sheets will refresh, only showing marks that
match the item that was clicked on the source sheet.
Filter actions can be created directly from a worksheet’s context menu or from the
Dashboard |Actions dialog box discussed earlier. Decide which sheet you want to act as the
filter source. Select the context menu in the title bar (or right-click the desired sheet in
Layout) and check Use As Filter from the context menu. Thereafter, when you click any
mark in the source sheet, all other sheets on the dashboard will be filtered to only show
values matching what you clicked on the source sheet. Choose the same context menu and
uncheck Use As Filter if you want to turn this option off.
When you use the context menu option, a “generated” filter action will appear in the
Dashboard |Actions dialog box. If you want to remove or customize the generated filter
action, make choices from the Actions dialog box. You can also create new filter actions
directly from this dialog box. After creating a new filter action, select the method of
initiating the action (Select and Menu are probably the best two choices). In the Source
Sheets section of the dialog box, choose one or more worksheets that you want the action
to be executed from. In the Target Sheets section, choose one or more worksheets that you
want to be filtered based on the selected mark in the source sheet or sheets.
By default, you can multiselect marks on the source sheets with CTRL-click (COMMAND-
click on Mac) to filter on more than one mark. If, however, you only want to allow a single
mark to be highlighted to filter, check Run On Single Select Only. The three options under
Clearing The Selection Will allow you to specify behavior when a filter action is cleared
(for example, if the viewer clicks the same mark that was initially filtered, or clicks ona
blank area of the source sheet). Leave The Filter will leave the filter active on other sheets.
Show All Values will return all values to target sheets as though no filter was applied.
230 Tableau 9: The Official Guide
fprottbe sess, AE a ST
< >
x
|
:
|
|
Region Profit Comparison
v KeepOnty X Extude @~ Oe
|
Country United States
Regen Central
State Texas
|
i
|
Profit: -$25,729 31.
26%
| © OpenStreattap
L
Customer Detai I
contributors
a
Region State City PostalCode Customer Name Quantity Sales Discount Profit
Central Texas Abilene 7960S Dennis Kane 2 $1 80% $4 4
Allen 78002 Anna Gaymen 6 $260 25% sz (8
Anthony Witt 7 $30 DW. $14
Amariio 73109 David Smith 2 $205 32% $36
Fred MeMath 4 $307 20% $31
Hunter Glantz 4 $106 20% $30
Joel Eaton 8 $2,717 25% $308
Neoma Murray 8 $49 40% $2
Nick Radford 4 $367 30% S110
Susan Gilcrest 2 $20
Chapter 8: Creating Dashboards and Stories 231
Another capability of a filter action that may not be initially obvious is the ability to
navigate to another sheet or dashboard in your workbook. In this case, a standard filter
action is created as described previously, but a dashboard or worksheet other than the
current dashboard is selected in the Target Sheets area. In this example, an “arrow”
visualization has been placed on the dashboard to appear as a navigation button. A filter
action is initiated when it’s clicked. Notice, however, that the Target Sheets section displays
a completely different dashboard than the Source Sheets section.
bietaehein
re: FESS
Source Sheets:
URL Action
re, any
AURLaction allows a web page to be launched from within your dashboard. Furthermo
permits Tableau
field in use on the source worksheet can be used to customize the URL. This
d systems
to display custom web pages from the Internet or to integrate with other web-base
in your organization.
232 Tableau 9: The Official Guide
After creating a new URL action, select the method of initiating the action (Select and
Menu are probably the best two choices). In the Source Sheets section of the dialog box,
choose one or more worksheets that you want the action to occur on. Then type or paste
the desired URL into the URL box. To customize the URL depending on which mark is
selected to initiate the action, click the small right arrow at the end of the URL to display
fields that are used in the source sheets. When you select one of the fields, a placeholder
will be added to the current cursor position in the URL. When the URL is executed, the
current value from that field will be placed in the URL.
URL options at the bottom of the dialog box allow you to URL-encode custom field
values added to the URL (for example, to replace spaces or other special characters with %
encoded characters). You can permit multiple marks to be selected when the URL action is
initiated with the appropriate checkbox. You can then specify the item and escape
delimiter to separate the multiple values and end-of-the-value list in the URL.
In this example, if a user clicks a measure or right-clicks a dimension in the Customer
Detail sheet, he or she will be presented with a hyperlink option to Google the currently
highlighted customer. When this is clicked, a URL action will display the Google web page
with the current customer name added to the URL at an appropriate point (as a value to a
“qz=” parameter).
Source Sheets:
| Customer If'gme
URL Options i
- 4 Postal Code
] URL Encode Data Values Item Delimiter Profit Bin Size
Allow Multiple Values
4
Delimiter Escape: |\ Region
ae 1 FILTERVALUES(Region)
Co) State
SUM(Profit)
SUM(Quantity)
SUM(Sales) .
| Top Customers
Chapter 8: Creating Dashboards and Stories 233
| Profit oeState
Tiled Dashboard
Web x 5 4\ - ea t ‘ Central
Ci
13.28%
West
37.66%
alae Sy RN aed
Note J/fyour dashboard contains a Web Page element added from the dashboard menu, it
will be updated in place when a URL action takes place. If there is no such element in
your dashboard, Tableau will launch a separate web browser window as the target for
the URL action.
Creating Stories :
Generally speaking, a guided analytic is a series of charts/worksheets or dashboards that
are navigated through in an orderly, or “guided,” fashion from one to the next. A viewer can
progress through the views step by step to see the progression of charts in order. Although
you can use Tableau dashboards to create a guided analytic, Tableau stories are specifically
designed for this purpose. Although similar to creating dashboards, the concept of
combining existing worksheets together in a single screen isn ’t applicable to a story.
Instead, story points are added one at a time, each consisting of a single existing worksheet
or single existing dashboard (if you want more than one worksheet to appear on the same
screen in a story, you must create a dashboard combining the worksheets first and then
add the dashboard to the story).
Dashboards
and Worksheets =*
[4] Tiled Dasbhboard
EH Tiled/Floating Dashboard
{il Segment Comparison
(dil Sub-Category Profit
fil 80% of Sales/Sub-Categ...
{ih} Sales/Profit by State
E4) Dashboard Actions
Right Navigation
Left Navigation
Region Profit Comparison
fautomotic Se
E]
E) Automatic
| Exactly
Range
Laptop (800 x 600)
Desktop (1000 x 800)
| Story (1016x964)
Letter Portrait (850 x 1100)
Letter Landscape (1100 x 850)
Legal Landscape (1150 x 700)
A3 Portrait (1169 x 1654)
A3 Landscape (1654 x 1169)
Ad Portrait (827 x 1169)
A4 Landscape (1169 x 827)
Small Blog (420 x 420)
Small Blog Portrait (420 x 560)
Medium Blog (540 x 540)
~| Medium Blog Portrait (540 x 720)
| Large Blog (650 x 650)
SH Large Blog Portrait (650 x 860)
| iPad Portrait (764 x 855)
———-=1 iPad Landscape (1020 x 625)
Size: Story
w 1016 §¢ h 964 9
As with dashboards, there are pluses and minuses to using fixed story sizes as opposed
to automatically sized stories (see “Setting Dashboard Size” earlier in the chapter). And,
as
with dashboards, you may want to start by setting your story to an Automatic or Range size
and then modify it later, based on user feedback.
TREMOR EN gc 6) ey ; ai aaa
Tip Reordering story points is simple. Just drag the caption of the desired story point to the
new position you wish it to hold. Ifyou wish to add a new point to the middle of an
existing story, create the new point at the end of the story and then just drag the caption
to the desired position.
236 Tableau 9: The Official Guide
Formatting Stories
There are several approaches to formatting different parts of a story. To format individual
descriptions on a story point, right-click (COMMAND-click on Mac) the description and
choose Format. You may also select Story |Format from the drop-down menus. The Story
pane will be replaced with a format dialog box. Make various formatting choices for the
story background, title formatting, caption navigation options, and description formatting.
ee BR Wy- a ie ee oe ad
Format Story x rae a ~yr '
Story Shadng
Telling Stories With Tableau
‘Defauit: . ~~
Story Titie Duplicating a story Aston point can New Biank’Point }
Doint permits changes consist of asingle oe
Font: 4 ’ 3 to “state,~ such as worksheet or on rt
mark selection or dashboard 4 Duplicate E
Alignment: Left .
Shading: None
Your of Order Date
Border: None
237
238 Tableau 9: The Official Guide
e Export an individual worksheet image, either from the worksheet tab itself, or
when an individual worksheet is selected in a dashboard. You may copy it to the
Clipboard for pasting into other documents, or export it to a variety of standard
graphic file formats.
pantioPOr
Range Paper Size
sheets | Landscape
Options
A standard Windows dialog will appear, prompting for a filename. Specify the desired file
and click OK to save the .pdf file. If you checked the View PDF File After Printing checkbox,
the .pdf file will appear in Adobe Acrobat or Adobe Reader for your review.
Note On Mac, just choose File |Print. Then, choose PDF options from the standard print
dialog box, as you can with any Mac application.
Chapter 9: Working with Tableau Server 239
containing the table. On Mac, this option will simply prompt for a file location and
name. The result will be a comma-separated values (.csv) file.
Destination
Size Legend
Chapter9: Working with Tableau Server 241
e Export to Image File From the Worksheet drop-down menu, choose Export
|
Image. The same dialog box described for copying an image to the Clipboard will
display. Choose which portions of the visualization to include, as well as preferred
legend placement, and click Save. A standard Save dialog box will appear prompting
for a file location and name. You may choose a JPEG, PNG, or BMP format (EMF file
format is also available in Windows only). Click Save to export the image to the
specified filename and format.
Tip Ifyou have a dashboard selected, only the selected view in the dashboard will be
exported with the Worksheet drop-down menu options. Use the Dashboard drop-down
menu options to export the entire dashboard image.
sources (extracts are covered in Chapter 3), resave the .twbx file, and redistribute it to
Tableau Reader users.
@ & Tableau
Tableau Public
Once you have created a Tableau Public account (visit the Tableau Software website to
create an account), make sure your workbook meets Tableau Public requirements before
attempting to save it to the Tableau Public server:
Choose Server |Tableau Public |Save To Web. The first time you interact with Tableau
Public after starting Tableau Desktop, you'll be prompted for your user ID and password.
Specify a name for the workbook on the server and click OK. A confirmation dialog will
display illustrating the workbook you just saved. You may now share or view the workbook
on the Web via your Tableau Public account.
From the confirmation screen, click the Edit Details link to specify a few fine points for
your just-uploaded workbook. In particular, you may choose to disable the ability for viewers
to download the workbook with embedded data. By Tableau Public’s nature, everything is
viewable to everyone on the Internet. By default, anyone will also be able to download your
workbook and, if they have Tableau Desktop, make use of the embedded data. Make sure to
disable this option if you wish to only permit the viewing of your workbook.
ie PAS ES SEE 7
publish/8-Da: O ~ a Cc x] #82 8 - Dashboards - George Pe... * | }
|
Description 8 -Dashboard
L
Other Settings [F] Show workbook sheets as tabs
Save
More Detail
Other options on the Server |Tableau Public menu are helpful for managing content
and settings on Tableau Public:
¢ Open From Tableau Public Download an existing workbook from Tableau Public
to Tableau Desktop for editing or analysis.
e Save to Tableau Public As Saves the current workbook to Tableau Public. If the
existing workbook was initially opened from Tableau Public, it permits saving the
workbook to a different Tableau Public location.
e Manage MyProfile Launches a web browser displaying settings for your Tableau
Public account.
Note Tableau provides a free version of Tableau Desktop just for use with Tableau Public.
You'll find options to download this version from the Tableau Public website. Although
the techniques discussed earlier in this book generally apply to Tableau Public Desktop,
the list of data sources available is limited, as is the ability to save to any output location
other than the Tableau Public site.
Tableau Online
As with Tableau Public, Tableau Online is hosted by Tableau Software “in the cloud,’
negating the need for your organization to dedicate space on an internal network or
provide administrative or management resources. However, because of the hosted nature
of Tableau Public, connection to live SQL data sources in your network may be limited or
unavailable (although a limited set of “cloud” data sources, such as Amazon Redshift and
Google Big Query, as well as cloud-hosted SQL Server, MySQL, and PostgreSQL, are
available). And you won’t have the ability to integrate with any internal authentication
systems, such as Windows Active Directory. However, unlike Tableau Public, Tableau
Online is user segmented, allowing individual users to post content and limit the ability
of other users to see the content. Also, a limited set of permissions is supported to permit
selected users to access specific features.
Tableau Server =
Sample - Superstore
Note Jn order to fully support cloud-based SQL databases as just discussed, you must
check Allow Live Data Source Connections in Tableau Online Settings. In addition, you
must add a Tableau Online IP address block to the database server's “whitelist” in order
to ensure that the database will accept queries from Tableau Online (this may be a
requirement for other online data sources as well, such as Google and Salesforce.com).
The set of Tableau Online IP addresses may be found in the current version of Tableau
Online help from Tableau.com.
Manual Extract Refresh Before you publish your workbook to Tableau Online, extract data
from your corporate database to a local .tde file on your computer. You may choose to set
either an incremental refresh field or full refresh. If you only want to use this data
connection with the currently connected workbook, just publish your workbook to Tableau
Online. Tableau Online will store the extract as an “embedded” data source. That is, the
extract file will be uploaded to Tableau Online, but only will be accessible to the single
workbook you extracted it from.
If you wish to use the data source for multiple workbooks on Tableau Online, then after
you create the initial extract, “publish” the data source to Tableau Online from the data
source context menu. This will save the extract file as a stand-alone data source on Tableau
Online, permitting other workbooks to use it. Then, when you manually refresh the published
extract, all other connected workbooks will immediately reflect the updated data extract.
Chapter 9: Working with Tableau Server 247
Data Analytics :
Plays (C= ee
: a Edit Data Source...
Dimensions Ref
Abe Album ae
Abc Artist | == View Data...
FR Cc Date) |
4 Ig | Rename...
Atc Length Duplicate |
o | \
When you are ready to manually update the extract with new data, using either a full
or incremental refresh, just open the original workbook you extracted from and choose
the desired option from the data source context menu (the same menu you originally used
to create and publish the extract). The published data source on Tableau Online will be
updated manually. Repeat the process the next time you wish to update the Tableau Online
data source.
Caution As discussed in Chapter 3, make sure to save the original workbook you used to
create the initial Data Extract. This is the only workbook that “ties” the original database
and extract together. This is required for manual incremental and full refreshes,
modifications to the extract, and so forth. Although you can publish an extract to Tableau
Server and then use it with other workbooks, you'll be unable to do an incremental or full
refresh ifyou're not using the original workbook you extracted with.
The Tableau Online SyncClient The first minor update to Tableau 9, Tableau 9.0.1, adds the
Tableau Online Sync Client. This utility, available with the 64-bit version of Tableau Desktop
for Windows (32-bit Windows and Mac versions don’t include the utility), allows connection
of the Tableau Online cloud servers to your local computer. With this feature, automatic
scheduled updates of Tableau Online data sources from databases behind your corporate
firewall can happen behind the scenes without intervention as long as your computer is
turned on when the refreshes are scheduled.
Begin by extracting from the original corporate database to a .tde file on your local
computer. Specify the appropriate incremental refresh field if you wish to schedule both
full and incremental refreshes with the Sync Client. Then, publish the Data Extract to
Tableau Online as discussed in the previous section, Chapter 3, and later in this chapter
(just saving a workbook with an embedded Data Extract is insufficient—you'll need to
publish the extract as a Tableau Online stand-alone data source). When you publish, there’s
no need to embed source database credentials, even though you may be prompted to do
so. Also, choosing incremental or full refresh schedule options from the publish dialog
won't be of benefit, as any pre-defined schedules you choose will be deleted when you tie
the data connection to the Sync Client later.
Even though you may be tempted to now display Tableau Online in your web browser
and attempt to schedule an extract refresh on the just-published data source, any
scheduled refresh will fail, as Tableau Online won't be able to resolve the location of the
original database that was used—it’s behind your firewall!
Make sure you are using the 64-bit Windows Tableau Desktop version 9.0.1 or later
(About from the Help menu will display your current Tableau version and bit level). Choose
Help |Settings and Performance |Start Tableau Online Sync Client from the pull-down
menus. The client will display as an icon in the Windows system tray, and if this is the first
time you've started it, you'll be prompted to log in to Tableau Online. If you have previously
logged in to Tableau Online, you won't be prompted again—just double-click the icon in
the system tray to access the Sync Client.
Most options in the Sync Client will simply redirect you to Tableau Online in a browser.
For example, if you select the View All Data Sources option, a browser will open, navigating
directly to the list of published data sources in Tableau Online. Select the data source you
Chapter 9: Working with Tableau Server 249
just published that you wish to refresh automatically with the Sync Client. You'll notice that
the Refresh Schedules option within Tableau Online displays a small “0” character,
indicating that no extract refreshes are scheduled. Click the link to confirm this.
On the refresh list screen, click Select Where To Run Refreshes in the upper right.
A pop-up screen will appear, providing the option to refresh from Tableau Online or a
computer on your local network. The Tableau Online option is only appropriate for other
cloud-hosted data sources, such as Google BigQuery or SQL Server hosted in a Microsoft
Azure cloud. Because you need to access the original database behind your firewall for this
data source, select AComputer On My Network and select the computer running the Sync
Client (the current computer you opened the Sync Client on will be populated by default).
© Plays (Curre
DATA SOURCE By George Peck
Extract refreshes are scheduled tasks that keep your data in Tableau Online fresh. Click
New €xtract Refresh to start refreshing your cata on a schedule.
= liseli
Sh ei
Sa i aha Ai ae at SDeta
Once you have specified the local computer to use, click the orange New Extract
Refresh button on the Tableau Online screen. A pop-up screen will prompt for the refresh
schedule. You may choose a combination of full or incremental refresh and refresh time/
schedules if
day options. Click OK to create the scheduled refresh. You may add refresh
250 Tableau 9: The Official Guide
you choose (perhaps you want to perform a full refresh one day a week and an
incremental refresh every weekday).
Src |
Finally, return to the Sync Client on your local computer. If necessary, double-click the
icon in the system tray. Notice that any Tableau Online data connections that you assigned
to the local computer will now appear within the Sync Client. Select the data connection
you just scheduled refresh options for in Tableau Online, and click the small edit “pencil”
icon. Specify login credentials for the original database on your network. Otherwise, when
Tableau Online attempts to refresh the cloud-based extract through your local Sync Client,
the client will be unable to log in to the local database.
Plays (CurrentTrack) x pS
Lz
As long as your computer is on and the Sync Client icon appears in the system tray (you
may close Tableau after you have started the Sync Client), extract refreshes will be launched
from Tableau Online according to the schedule you created. Tableau Online will find your
local computer, connect to the Sync Client, and instruct the Sync Client to log in to the
database on your network. The Sync Client will query for a full or incremental set of data
and send it to Tableau Public, which will update the cloud-based Data Extract.
Chapter9: Working with Tableau Server 251
Windows Command Prompt Prior to release of the Tableau Online Sync Client, the only way
to refresh Tableau Online extracts from your local database was through a local copy of
Tableau Desktop. Although a manual refresh is a straightforward process (as outlined
earlier in this section), performing incremental or full refreshes on a schedule was
potentially cumbersome. The Tableau Sync Client has streamlined this process; however,
you may still choose to perform an extract refresh by launching your copy of Tableau
Desktop through the Windows command prompt.
This feature, available for any Windows version of Tableau (but not Tableau for Mac), may
be used on an as-needed basis to refresh extracts manually. It also may be used to add data to
a Tableau Online extract from a file (which the Sync Client doesn’t support). In addition, by
creating batch files that contain various sets of command-line options, you may automatically
run command-line-based extracts with Windows Task Scheduler. This is helpful if you wish
to perform extracts on a schedule different from that provided by Tableau Online and the
Sync Client (for example, monthly).
Open a Windows command prompt and change the directory to the location of the
Tableau 9 executable (this will be different, depending on whether you're using 32-bit or
64-bit Tableau Desktop). Once you have navigated to the proper directory, build a command
using options documented in Tableau Online help or documented with the commands:
<=. Best Practice Options discussed in this section permit you to expose data from
“384 databases in your network to cloud-based systems. Ensure that you adhere to your
“* erganization’s data governance and data security policies as you publish to
Tableau Online. Although Tableau Online is hosted in a secure environment, it is an
Internet-based system. You should consider the possible consequences of an
unanticipated data compromise.
schedule. Tableau Server features a robust security system, permitting various users and
groups to be defined for granular viewing and access rights, as well as user-based filtering to
provide different views of the same workbook, based on Tableau Server security settings.
Tableau Server includes its own user ID/password management system, or it can interface
with Windows Active Directory to permit centralized user management. Several approaches
to single sign-on capabilities, such as Kerberos and Security Assertion Markup Language
(SAML) authentication, are available. Tableau Server also allows (with proper permissions)
web-based modification of existing worksheets or creation of new simple worksheets, all in a
web browser, tablet, or smartphone.
Viewing Content
If you are primarily concerned with interacting with Tableau Server after workbooks have
been published by other designers, or when you're ready to validate that your workbooks
have been properly published, you'll need to sign on to and navigate the general Tableau
Server interface. Tableau Server 9 has improved this user interface to make navigating and
interacting with server content easier.
Launch a web browser and navigate to Tableau Server via the uniform resource
locator (URL) that your administrator has provided you (by default, it’s simply the name
or IP address of the system where Tableau Server is installed). If you don’t have a single
sign-on method in place, you'll be prompted to sign on with a user ID and password. Use
the proper credentials (if Active Directory has been configured, you'll use your standard
Windows ID and password). If your server and user ID are configured with multiple
sites (creating sites is discussed later in this chapter), you’ll be prompted to choose one.
Once you successfully sign in, you'll be presented with the main Tableau Server screen.
Although you are initially presented with Projects view, you or an administrator may
change the default view to one of the other available object views: Workbooks, Views, or
Data Sources.
Chapter 9: Working with Tableau Server 253
Workbooks 15
* 2 selected ~ Actions
General Filters
Project
Owner
Modified on or before
Only my favorites »
Only my recently viewed . " neti et Tae: whe i
e Projects Somewhat like folders, projects organize content into related categories.
Given the appropriate right, you may create additional projects when you publish
workbooks to Tableau Server from Tableau Desktop.
e Workbooks Workbooks published to Tableau Server. When you select a
workbook, all nonhidden content within the workbook (worksheets, dashboards,
and stories) will be available to view.
e Views Individual worksheets, dashboards, and stories from all workbooks.
e DataSources Shared data sources stored on Tableau Server. If you have appropriate
rights, you may analyze data in your browser or tablet using techniques similar to
those available in Tableau Desktop (see “Creating New Content” later in the chapter). »
254 Tableau 9: The Official Guide
To view and interact with Tableau worksheets, dashboards, or stories published from
Tableau Desktop, find the workbook or individual view by navigating the Workbooks or
Views options at the top of the screen. You may also search or filter to narrow down to
specific content you're looking for. Click the desired object to view it, or select one or more
objects with the upper-left checkbox and make choices from the Actions drop-down link.
If you click a workbook, an additional Tableau Server screen will show worksheets and
dashboards within the workbook. A “breadcrumb navigation” list will also appear at the
top of the screen to permit navigation back to the original object category.
When you view an object, most features in Tableau Desktop will be usable in your
browser or tablet. Dashboards and worksheets will appear as tabs at the top ofthe view.
Tooltips will appear when you hover over marks. If you click a mark, Keep Only and
Exclude action buttons from within the tooltip will appear. Quick filters and parameters
will appear and can be interacted with. Sort icons will be available on chart axes and
headers. You may zoom in and out on maps, pan maps, and select using different tools.
Dashboard and worksheet actions will permit complete interactivity among worksheets
and dashboards in the workbook.
If you make filter or parameter choices to change the current state of the worksheet or
dashboard, you may choose to save the modified view for future use. You may also wish to
share the worksheet or dashboard URL in an e-mail or embed the view into another web
page. Or, perhaps you wish to export the current view to a variety of file formats, revert to
the original state of the view when it was first opened, pause Tableau Server’s automatic
updating of the view, or refresh the view against the data source. A series of buttons appear
at the top of the view to permit these options.
fP+ebleau
+14,
Note Some of the features just described may not be available, depending on how the
workbook was initially designed or the permissions that may be granted you by the
worksheet designer or Tableau Server administrator.
Subscriptions
In addition to viewing Tableau content interactively in a browser or on a tablet or
smartphone, you may elect to receive e-mails of periodic snapshots of Tableau content via
subscriptions. To subscribe to a workbook or individual worksheet or dashboard, look for
the small envelope at the upper right of the screen (if it’s not there, expand your browser
to make sure it’s not hidden or check with your Tableau administrator to make sure
subscriptions are enabled).
If an e-mail address isn’t already associated with your Tableau Server account, you'll
be prompted to add it. Then, specify the subject line of the subscription e-mail and the
frequency you'd like the e-mail to be sent (subscription schedules are specified in a
Tableau Server administrative screen discussed later in this chapter). You'll also be able to
choose whether to include just the current worksheet or all worksheets in the workbook in
the subscription e-mail.
Subscribe
To:
Subject:
Tale of 100 Entrepreneurs
Schedule:
Monday morning
Monday morning
Weekday moms
. TH 5
(LS
SS /j
This Sheet Sheets in Workbook
3
Once you've subscribed, Tableau Server will send an e-mail based on the frequency
as
you selected. The worksheet or worksheets you selected will appear in the e-mail
browser will launch and navigate to the
embedded images. If you click an image, a web
256 Tableau 9: The Official Guide
source workbook you initially chose within Tableau Server (you may be prompted to log in
to Tableau Server before the workbook will appear in the browser). You may then fully
interact with the workbook within the browser.
To modify or delete existing subscriptions, click the Manage My Subscription Settings
link within the subscription e-mail, or log in to Tableau Server, click the drop-down arrow
next to your user name in the upper right, and choose My Account Settings. Then click the
Subscriptions link at the top of the page. A list of existing workbook subscriptions will
appear. Check the subscription or subscriptions you wish to modify or delete, and make the
desired choice from the Actions link.
€ ¢ 10.211.55.3/#/user/tocal/William/subscriptions
;
Hi +ableau
Back To Content
r@) . .
o William
USER William Interactor c Jul 28, 2015, 1:38 PM
* 1 selected ¥ Actions
Change Schedule
Workbook / oD aa Subject Last update Next update
Chang® Subject
}, Business pe}
Delete
4rea Sales Performance Weekly at 6:00 AM on Monday Never Aug 3, 2015, 6:00 AM
¥| [&) Real Estate +++ Puget Sound Home Sales by Index Monday maming - Weekly at 6:00 AM on Monday Never Aug 3, 2015, 6:00 AM
Tale of 100 Entrepreneurs +++ Tale of 100 Entrepreneurs gs - Weekly at 6:00 AM on Monday, Tuesday, Never Jul 29, 2015, 6:00 AM
Using Tableau with iPad, Android, and Other Smartphones and Tablets
Not only can Tableau web-based options (Tableau Public, Tableau Online, and Tableau
Server) provide complete interactivity in a web browser; they can support various
mobile devices as well. If your audience will want to interact with a worksheet,
dashboard, or story on their smartphone or tablet, several options are available.
Department
(Al)
¥ Furniture
Office Supplies
¥ Technology
Calendar Quarter
8/24/2010
ul x +;
Workbooks
The app also features the ability to modify existing worksheets, including
interacting with the Data pane, using Show Me, dragging and dropping dimensions
and measures to shelves, manipulating the Marks card, and modifying and creating
calculated fields. This powerful feature opens an entirely new set of possibilities by
allowing rich design capabilities on an iPad.
And, as with the app, the ability to edit existing worksheets right in the mobile
browser is supported. Dimensions and measures can be dragged to and from shelves,
options can be set from the Marks card, and Show Me can be used. An additional
benefit of connecting via a mobile browser instead of the app is the ability to analyze
directly from a Tableau Server-stored data connection (just tap Data Sources from
the top navigation area). Tap the checkbox for the desired data source and then choose
New Workbook from the Actions drop-down link at the top of the list. A Tableau
Desktop-like screen will display dimensions, measures, Rows and Columns shelves,
| the Marks card, and so forth. Drag and drop as you normally would to analyze data.
Show Me may be used, and you can even tap measures or dimensions and choose
options from a context menu, including the ability to create and edit calculated fields.
You may even double-tap in appropriate places to create an ad hoc calculation!
ee Marks 7
*<
eere
Department
(nil Automatic Sor
+)
Da “
foc Item & S 5
Ren Msaairei Nance Color Size Label m
Measures ‘
Detail Toolti
* Discount se EI
* Order Quantity Rersiesl aes seme
# Product Base Margin
# Profit
# Profit Ratio
Profit Ratio Levels
* Sales
# Shipping Cost
# Unit Price
Chapter 9: Working with Tableau Server 259
Publishing Content
Before workbooks can be viewed on Tableau Server, they must be published from a copy of
Tableau Desktop. Although the process of publishing workbooks to either Tableau Server or
Tableau Online is basically the same, Tableau Server will permit publication of workbooks
connecting to any data source, including those within your network (just make sure the
same data source drivers have been installed on the Tableau Server computer).
Open the workbook you wish to publish in Tableau Desktop and select Server |
Publish Workbook from the pull-down menus. If you have not already logged in to a
server, you'll be prompted for the server name. If you have a single sign-on method
enabled, you will be automatically logged in after you specify a server name. Otherwise,
supply a user ID and password. If your server and user ID are configured for multiple
sites (Tableau Server sites are discussed later in this chapter), select the desired site.
Then, the Publish Workbook To Tableau Server dialog box will appear. Supply the name of
the workbook. If you wish to replace an existing workbook on the server, click the drop-
down arrow next to the name and choose an existing workbook. In addition, there are
other options to complete on this dialog box:
Description: Sales and Sales Rep Anaiysis for International and US Regions
Views to Share
Remove
Scheduling
& Authentication...
260 Tableau 9: The Official Guide
Project Like a folder, a project is a category that you may assign your workbook to.
Then, when looking for available workbooks on Tableau Server, you may select a
specific project to narrow down your search. Choose an existing project from the
drop-down list (projects are created using administration tools on Tableau Server).
Description Optional free-form description to annotate details about the workbook.
Add Tags Add one or more optional keyword tags, separated by spaces or commas
(if the tag itself contains a space, surround it with quotation marks). Tags may be
used to search for workbooks on the server.
Views to Share Select the worksheets/dashboards/stories (generally, Tableau
Server refers to an individual worksheet, dashboard, or story as a view) you want
to be visible within the workbook. You may prefer to only include dashboards or
stories in this list, unchecking the worksheets that make them up. This will prevent
viewers from navigating to the individual worksheets that make up the dashboard
or story (these worksheets, however, will be available if a user downloads the
workbook from the server).
View Permissions By default, all users will be given a set of default permissions
(determined by the All Users group), whereas you, as the owner, will have full
permissions to the workbook. If you wish to set more granular permissions for your
workbook, click the Add button below the View Permissions list. The Add/Edit
Permissions dialog box will appear.
Select a user or group on the left side of the dialog box, and set permissions for the user
or group on the right. You may choose from a pre-defined set of rights by choosing an entry
in the Role drop-down list, or select individual rights with radio buttons. When finished,
click OK. The users and groups you added rights for will appear in the View Permissions list.
Add/Edit Permissions Se ee
Chris 4
Erin Web Edit:
Caution [fyou are using filter actions in your worksheets or dashboards (covered in
Chapter 8) to navigate from one dashboard or worksheet to another, you must select
this option to enable navigation on the server.
If your workbook contains a combination of data sources that have been extracted to a
Tableau Data Extract (.tde) file or connections to standard corporate SQL databases that
require permission to access, an additional Authentication, Scheduling, or Scheduling &
Authentication button will appear.
You may choose to automatically refresh Data Extracts that will be published to the
server with your workbook via the drop-down list. Schedules such as “End of Month,’
“Saturday Night,” and “Weekday Early Mornings” are configured on the server in advance
(as discussed later in the chapter under “Schedules”) and will be available for you to
choose for automatic extract refresh. If incremental refresh fields are specified for any Data
Extracts within the workbook, you'll be able to specify separate schedules for both
incremental and full refreshes. :
External databases (such as standard corporate SQL databases) may require
authentication when processing queries from your on-premise version of Tableau Server.
Select any such databases in the Authentication list, and choose how you wish to supply a
262 Tableau 9: The Official Guide
user ID and password to the database when the workbook is displayed (various options
appear, depending on your Tableau Server authentication method and database being
used). Click OK to return to the Publish Workbook dialog box.
Extract Schedule
Incrementally refresh extracts in this workbook on the following schedule:
Learn more
When all options have been selected, click Publish to publish the workbook to the server.
After the workbook and any associated data files are published, a confirmation dialog box
will appear. You may interact with the workbook in the confirmation dialog box, click Open
In Browser Window to open the workbook in your browser, or just close the confirmation
dialog box.
will appear, displaying a list of Tableau Server users and groups on the left and the
members of the selected dimension on the right. Select each user or group on the left,
and then check the members of the dimension that the selected user or group should |
1
}
be able to see in the worksheet. 1
The All and None buttons under the Members list will select all or no members as a
starting point. If you have many users and you wish to copy settings from one user to
another, click the Copy From button and select an existing user to copy to the currently
selected user. When finished setting user/member combinations, click OK to save the
filter. It will initially appear in the Data window in the Sets category (with a slightly
different icon than traditional sets). The user filter will not take effect until dragged to
the Filters shelf.
a es
User Filter
|[) central
|B
Administrator
; _ Anna Andreadi
Cassandra Brandow
Chris
Chuck Magee
Denise Roberts
Erin
George Peck Test Account
Kelly Williams
Pat
Sam
_ Tableau Software
‘pace lemmamad
Sets =r mete 7 f
@2 Region Rep Filter -
@ Topoper ie bylatofit
You may now test the application of the user filter by selecting a user from the
you
pop-up user list at the bottom of the Tableau screen (initially showing the user ID
a user from the list, the filter will be applied and will
logged in with). When you select
(continued)
264 Tableau 9: The Official Guide
5 |+||ioeo) =a°
el 3 anep)|
=P | onfobGul
oO |||
Ge|Se)a. =)
|eS |mh
ic“< atae =os
Se) (= | |ayo~rjo) fo) =< a =e
||fn,o) =
= |=
cS ©) tant ©|
io = (SEN Sire
Nn
—=fe)(on
| x <i oO
narrowed the filter too far and some users, such as yourself, cannot see any data),
right-click the user filter in the Sets portion of the Data window and choose Edit from
the context menu.
Filter as User
2s AllUsers
A» Sales
Administrator | 4 @ ;
Anna Amdreadi |
ea Brandow
Chris
Chuck Magee
Denise Roberts
Erin }
George Peck Test Account | °
Kelly Williams |
Pat
StreetMap contributors Sam
Tableau Software
Trusted Ticket Test Account
Another way to filter based on a Tableau Server user ID is available if a data source
used in your worksheet contains (or can derive) matching user IDs. Because the currently
logged-on Tableau user ID is available in a Tableau calculated field, you can create a
Chapter 9: Working with Tableau Server 265
calculated field that compares a user name from a data source (or other calculated field)
to the currently logged-on Tableau Server user. The filter will return only data that
matches the currently logged-in user. In this example, the Administrator account will
return all data, whereas another user will only return data that matches their user ID.
As with other filters, place the calculated field on the Filters shelf and choose the
True value.
As with user filters described previously in this section, the filter may be tested by
selecting different users from the pop-up list at the bottom right of the Tableau screen.
Editing Content
Once you add a workbook to Tableau Server from Tableau Desktop, you'll almost certainly
want to make changes to it at some point in the future. This is straightforward. Choose Server
|Open Workbook from the Tableau Desktop drop-down menus. If necessary, log in to the
server. Then, navigate to the project and file you wish to modify to open it in Tableau Desktop.
Once you've made the desired changes, simply resave to Tableau Server from the Server
menu as you originally did (or save to a different project and/or with a different filename).
But, what if you’re just using Tableau Server in a browser and don't have a copy of
Tableau Desktop? If you have proper permission, a small hyperlink is available, although it
may not be immediately obvious. And the power behind it may not immediately come to
mind either. If you are viewing a worksheet or dashboard (the option wont be available
266 Tableau 9: The Official Guide
with a story), look for the Edit hyperlink. Or, if you are displaying the Views page, select a
worksheet or dashboard and choose Edit View from the Actions drop-down menu.
Server
Settings
Home >» &3 Tableau 9 The Official Guide Samples >» fe} Dashboards and Stories > ili) Sales/Profit by State
rm
@ Share ® Remembermychanges’ Edit red] 5S (0) La
Sales/Profit by State
Sales
$920
$100,000
$200,000 +
$300,000 =
$400,000 Yo
$457,688 &
Profit
$25,729 $76,381
iti OO a"Mii
ee ill
Home > & Tableau 9 The Official Guide Samples > =} Dashboards and Stories j
Se + 1 selected ¥ Actions
Edit View
SiH ame Workbook t Sheet
fe) Tag
When you choose these options, a separate tab will appear in your browser with the
worksheet you were viewing or selected, or the first worksheet in the dashboard you
were viewing or selected, appearing in web edit mode. Web edit mode looks very much like
Chapter9: Working with Tableau Server 267
Tableau Desktop, permitting you to use many of the techniques discussed in the earlier
sections of this book to edit worksheets right in your browser. You'll see the Data and
Analytics panes, dimensions and measures, shelves, cards, and a toolbar. You may
double-
click a dimension or measure to add it to a default location on the worksheet. Drag and
drop measures and dimensions to shelves and cards. Right-click (CONTROL-click on Mac),
or Click the small drop-down arrow, on dimension or measure field indicators or cards to
choose options. Click Show Me to select from pre-defined chart types (for example, this will
permit you to create shared axis charts because you can’t drag a second measure on an
existing axis in web edit mode). And you can create or modify both ad hoc and standard
calculated fields.
Tabs for all worksheets in the workbook (even those that you didn’t explicitly select in
the Views To Share list when you originally published the workbook) will appear in your
browser. Just click the desired sheet to edit it (dashboards and stories are exceptions and
won't be available in web edit mode). A new worksheet tab is also available to create new
worksheets within the existing workbook.
Some options behave differently in web edit mode than they do in the full version of
Tableau Desktop. Filters are an example. If you drag a dimension or measure to the Filters
shelf, web edit mode will immediately treat it like quick filters, displaying an interactive
filter on the right side of the worksheet. If you don’t want the quick filter to be visible,
select the value you wish the “hard-coded” filter to have on the quick filter on the right side
of the worksheet. Then right-click the filter on the Filters shelf and uncheck Show Filter.
Also, there are options not available in web edit mode at all. For example, even though you
may see existing parameters in the Data pane, you can’t display them on a new worksheet
or make any modifications to them. Although web edit mode is a very flexible way to
provide introductory-to-intermediate real-time analysis capabilities in a browser, you may
still need to employ the full version of Tableau Desktop to realize complete design
capabilities.
Once you’ve made changes to an existing view, you may revert to the original version,
replace the existing workbook with the modified version, or save the modified version to a
different project or with a different name. Use the Save, Save As, and Revert options at the
top of the screen. Clicking Done will close web edit mode and return to the updated view or
the Views page.
Note The ability to use most features covered in this section, such as editing existing
workbooks, replacing existing workbooks with the Save option, saving to different
locations, or creating new workbooks, are all controlled by Tableau Server permissions.
Permissions are discussed later in this chapter. If these options don’t appear when you
log in, you may not be granted the proper permission. Check with a Tableau Server
administrator (or change the permissions yourself ifyou are granted that permission).
@ SC x: data Sources
-Tabieas » =
a
Connection type Connects to Live / Last extract Project Owner
stom Data View re Excel Aug 25, 2014, 4:50 P™ Scaling Tableau Server — Administrat
General Filters Permissions stomer Timecards (SQL es Microsoft SQL Server 3 locathost Live Scaling Tableau Server Administrat
neCard+ (BlockConsultin.. -*+ Microsoft SQLServer 8 10.211.55.3 Live Scaling Tableau Server — Administrat
A new tab will appear in your browser using web edit mode. As discussed previously in
this chapter, the Data and Analytics panes will appear and rows and columns shelves will
be available, as will Show Me. Use these features to design one or more new worksheets
using the selected data source. When you are finished, you may save your new workbook
with Save options at the top of the screen. Clicking Done will close the tab and return to the
previous Data Source list from the Content page.
Tip Although the initial data source view shows just published data sources, you may
change the filter to display embedded data sources. These data sources actually are
embedded within an existing workbook on the server. They do not stand alone. You may
perform some limited modifications on this screen; however, embedded data sources
cannot be used to create new workbooks. Ifyou need to use an embedded data source,
navigate to a view (worksheet or dashboard) based on the embedded data source and
edit that view.
Once you’ve finished designing the organization of the data connection, you may
choose to extract the original data source to a Tableau Data Extract (some cloud-based
data sources will require you to extract). When you do so, you may choose to set an
incremental refresh field to permit Tableau Server to perform scheduled incremental
and full data refreshes. If you don’t create an extract, Tableau Server will connect
directly to the data source to provide real-time results to web edit mode or Tableau
Desktop users.
Tip The “data proxy” feature of Tableau Server provides an additional benefit to
Tableau Desktop for Mac users. Even though Tableau Desktop for Mac won't
connect to all the data sources the Windows version will, non-Mac-supported
data sources can be published to Tableau Server and then used on a Mac by
selecting the Tableau Server connection option.
When you
re ready to publish the data source to Tableau Server, right-click the data
source name in the Data pane (CONTROL-click on Mac) and choose Publish To Server
from the context menu. You may also choose Data |<desired data source> |Publish To
Server from the drop-down menus. The Publish Data Source To Tableau Server dialog
box will appear. Select the desired project (similar to a folder) that you want the data
source published in. Give it an appropriate name and, optionally, a description. You
may also add one or more tag keywords, separating each by a comma or space (if you
want the tag to include a space, surround the tag with quotation marks). Other tags
already used on the server will also appear. To maintain consistency, you may click one
or more to add them to the data source.
If the data source you are publishing requires authentication (such as a database
user ID and password), select how you want Tableau Server to provide the credentials
(such as prompting the user on Tableau Server or embedding the currently used
credentials in the data source). If you are publishing a Data Extract, select the server-
based schedule you wish to use to refresh the extract (these schedule options are
pre-defined on the server, as discussed later in this chapter). You may see both
incremental and full refresh options, depending on whether you specified an
incremental refresh field when you created the extract. And finally, if you want to set
specific permissions for the data source, such as who can view it, change it, and so
Chapter9: Working with Tableau Server 271
forth, click the Add button at the bottom of the dialog box Ae siete
teehee
permissions.
{Tableau9TheOfficalGudeSamples
Streaming Log Data
When the data source is uploaded to Tableau Server, you'll receive a confirmation
message. You may wish to test the published data source with either Tableau Desktop
or Tableau Server in web edit mode to determine if the data source is properly
organized and returns reliable data. In Tableau Desktop, choose Tableau Server on the
initial Connect screen, log in, and navigate to the project you uploaded the data source
to. In Tableau Server, either select Data Sources from the main Content page, or select
a Project from the main Content page and then select Data Sources in that project.
(continued)
eres
272. Tableau 9: The Official Guide
i]
© Data Source i 0
¢ Cc 10.211 .55.3/#/dataso.
i +ableau
stom Data View Excel ty Aug 25, 2014, 4:50 OM Scaling Tableau Server
General Fitters stomer Timecards (SQt “- «Microsoft SQL Server f22 localhost Live Scaling Tabitau Server
| Provect : Teaming Log Data “+ Microsoft SQL Server =] focalhost Jul 30, 2015, 4:51 PM Tableau S The Official Guide ¢
x neCard+ (BiockConsultin. -*- Microsoft SQi Server HY 10.211.55.3 Live Scaling Tableau Server
Owner re
“a
Modified on or after
Modified on or before
Hes en alert
Note As illustrated earlier in the chapter, many of these web-based edit, create, and
server-
based data source capabilities are also available to mobile devices via either dedicated
iPad and Android apps, or HTML5 mobile browsers.
Creating Sites
A Tableau Server site is, logically, an entirely separate Tableau Server system from the initial
default site that is configured when Tableau Server is installed. It contains separate projects
and content isolated from other sites and is logically separated completely from other sites.
Physically, it exists on the same Tableau Server as other sites, using the same hardware
resources, authentication method, and configuration. Some features are completely
separated by site and cannot cross sites, such as workbooks and data sources. Some can
optionally cross sites, such as users. Other items are common to all sites on the same
server, such as schedules.
As a user, the first hint you'll have that you are using a multisite Tableau Server is if
you’re prompted to choose a site when you initially log in. In this case, your user ID is
configured to use more than one site, and you need to select which site you want to use
when you initially log in (you'll see this prompt in your browser, on your tablet, or in
Tableau Desktop when logging in). If your user ID is only set to use one site, you won't be
prompted—you'll simply go directly to that site. The URL in your browser will actually
274 Tableau 9: The Official Guide
reflect the nondefault site you may be logged in to, but no other indicators within Tableau
Server screens will indicate the site you're logged in to.
& c 192.168.1.134/#/site
+i+
itt tableau
Select a Site
Default
Assuming you are using the initial configuration of Tableau Server that only provides
one site and you are one of the initial server administrators, click Settings at the top of the
Tableau Server Content page. Select Add A Site from the menu that appears below. Then,
click Add A Site. The New Site dialog will appear. Specify the site name and any configuration
options, such as number of allowable users, maximum disk space allotment, site-wide
options to use web authoring and subscriptions, and so forth, that you wish to specify just
for this site.
Chapter9: Working with Tableau Server 275
Once you create an additional site, the top of the Tableau Server screen will change.
Server and Site links will appear. Click Server to manage settings that are server-wide, such
as schedules. Click Site to view or manage content or other items that are specific to a
single site. You may change the site that you are managing from the small drop-down next
to the current site at the top of the screen.
+t4
iy tableau
Settings
Ablaze Test orp 2
et a ee Ze ee ee a eee
Caution Ifyou are responsible for installing Tableau Server, consider this choice carefully, as
you will be unable to change it after you initially make the selection at installation. Ifyou
later must change authentication methods, your only choice is to uninstall and reinstall
Tableau Server entirely.
276 Tableau 9: The Official Guide
This initial authentication choice determines how you add new users to Tableau
Server. If your server is set to use local authentication, you will add all user information
manually—either by adding users one at a time or importing a .csv file containing a list of
users to add. If your server is set to use Active Directory authentication, you will add users
one at a time by typing in their existing Active Directory user name, or select one or more
Active Directory groups to add all at once.
Furthermore, if you have set up a multisite server (sites are discussed in the previous
section), you have the choice of adding users at the server level, where they can be
permitted to use more than one site, or at the site level, where they will be limited to using
one site only. This choice is made by selecting either the server or an individual site from
the options at the top left of the server (discussed in the previous “Creating Sites” section).
If you create users at the server level, you'll be presented with a list of existing sites and you
may assign the user to one or more, specifying a site role for each site. Or, you may click
the Server Admin checkbox at the bottom of the Add User dialog box to permit them to
administer all sites on the server. If you create users at the site level, the multiple site
option won't appear. You may still choose to make the user a site administrator or server
administrator, however.
Username available
Password: seenee
Email (optional):
¥| Default | Interactor al
Server Admin
Chapter9: Working with Tableau Server 277
When you add users, you must select a site role for the user, which sets
a series of
default permissions for the user. Available options appear in a drop-down
list. If you click
the small “i” information icon, a pop-up window will appear annotating the various
permissions granted by each role. In particular, notice that site and server administ
rators
appear to be granted the same permissions. The difference, however, is that server
administrators may manage all sites on a multisite server, whereas a site administrator
can
only manage the specific site(s) that their user ID exists on.
Server Administrator Y ¥ ¥ v¥
Site Administrator Y ¥ v ¥
Publisher v ¥ vx
Interactor v v
Viewer v
Unlicensed
Tip You may be somewhat confused by the various unlicensed options you see in the Site
Roles drop-down list. An unlicensed role exists to permit you to maintain an existing user
who no longer needs an active license, such as an employee who goes on extended leave,
or an employee who is no longer involved with your organization but still has content on
the server that they own. The Unlicensed (can publish) role is specifically provided for
Tableau Desktop users who don’t normally need to view content on Tableau Server. With
this role, they don’t use an active license, but still have the ability to publish content to the
server from Tableau Desktop.
If you are using Tableau Server core licensing (a licensing option based on the number
of CPU cores being used by your server, rather than by the number of user IDs created on
it), you may make use of the Guest user account. The Guest account is provided to allow
Tableau Server content to be viewed without needing to be specifically authenticated to a
user ID, such as with custom web-based systems that may embed Tableau Server content.
Even if you are not using core licensing, you may still see the Guest account in the user list.
depending on whether you initially choose local or Active Directory authentication. If you
chose local authentication, all groups are created and maintained manually, whereas
Active Directory authentication will permit you to specify Active Directory groups,
replicating them and the users they contain, on Tableau Server. Groups are maintained at
the site level (there is no such thing as a “server” group on a multisite Tableau Server).
To maintain a group, click Groups at the top of the main Content view. A list of any
existing groups will appear, including the All Users group, which cannot be deleted and
includes all users on the site. If you wish to add a new group manually (regardless of
whether you are using local or Active Directory authentication), click the New Group button
and give the group a meaningful name. If you are using Active Directory authentication, you
may choose Import Group. Once groups have been created, you may check one or more
individual groups and make management choices from the Actions drop-down.
To add or remove users from manually created groups, click the group name on the
Groups list. Any existing users in the group will appear. Check one or more of them and
make management choices from the Actions drop-down. Click Add Users to add users to
the group. A list of all users on the site will appear, where you may select as many users as
desired to add to the group.
Add Users
Choose users to add to group “Central Region”.
Administrator
Anna Andreadi
Cassandra Brandow
Chris
Chuck Magee
Denise Roberts
Erin
Kelly Williams
Pat
<
fs) Sam
Tableau Software
William
Projects
A project is similar to a folder in other business intelligence (BI) toolsets. Unlike folders in
some other tools, however, projects in Tableau Server cannot be nested (that is, projects
cannot contain sub-projects—they can be only one level deep). All content in Tableau
Chapter 9: Working with Tableau Server 279
Server (workbooks and data sources) are added to a particular project, and they can only
reside in a single project. Projects are completely separated by site. If you have multiple
sites, you will have a separate set of projects for each site. By organizing projects that match
the business rules and processes of your organization, you are able to make navigating and
managing Tableau Server more straightforward.
Tableau Server pre-installs a “default” project that can’t be renamed or deleted in each
site you create and (if selected during installation) a “Tableau Samples” project in the initial
default site that you can rename or delete. Beyond those, you are completely free to create
and manage as many projects as you choose.
From Tableau Server’s main screen, select Projects. A list of existing projects in the site
will appear. To add a project, click New Project. Give the project a descriptive name and,
optionally, a description. Once the project has been created, Tableau Desktop users (based
on permissions) will be able to save workbooks and data sources to it. From the Projects
view, you can also select one or more projects and choose options from the Actions
drop-down. Note that if you delete a project, all content within the project is deleted. Make
sure you really want to do this before you proceed.
Moving content from one project to another can’t be accomplished from the Projects
view. You need to select one or more workbooks from the Workbooks view (you can only
move entire workbooks, not individual views). Select one or more workbooks that you wish
to move, and choose Move from the Actions drop-down. Select the destination project and
click Move.
Move to Project
Choose a project for the 2 selected workbooks.
BusinessObjects Integration
default
Tableau Samples
PARAL scaSR Bu
ia
<= oe
—_—
280 Tableau 9: The Official Guide
Permissions
Of course, Tableau Server users should be limited to seeing content that is required to meet
their business needs. And only relevant users should be granted the ability to add, delete,
or change Tableau Server content. For this key aspect of managing even the simplest of
installations, Tableau Server permissions are used. Although the initial introduction to
permissions may come from Tableau Desktop when you publish a workbook or data source
to Tableau Server, many additional permission tasks are carried out in a web browser with
Tableau Server itself.
An initial concept to consider when assigning permissions is that of object ownership.
Initially, the user who creates the content (who publishes a workbook or data source from
Tableau Desktop) or who creates a project is considered that project’s owner. Ownership
grants extended permissions to that object by default. Also, it’s important to consider how
to deal with members of your organization who may leave or move on to other tasks that no
longer involve Tableau Server. You cannot remove a user who owns any content, but you
can “unlicense” them. If you remove their content, then you may remove the user account.
Or, you may change the owner from the Actions drop-down on the Projects, Workbooks, or
Views view and assign a new one.
Although the owner of an object is given special consideration, so is a project leader.
This permission permits the user to grant permissions for all objects within the project they
are assigned to be a “leader” of. This permits administrators to create projects (discussed
earlier in the chapter) and assign one or more users the Project Leader permission for that
project. Then, that user can manage content within that project, while still having limited
permissions for other content on the server outside of their specific projects.
Another important concept to grasp is that permissions are granted at the content level,
not the user or group level. For example, you can’t select a user or group and assign
permissions that user or group has for a project, data source, workbook, or view. However,
you can select the project, data source, workbook, or view; choose Permissions; and select
users and groups to apply permissions for that project or workbook. Start permission
assignment by clicking Projects, Workbooks, or Views on the main Tableau Server content
view. Select the desired object (you can check multiple objects), and choose Permissions
from the Actions drop-down.
The Permissions screen, illustrated in Figure 9-1, will appear. If any previous
permissions have been assigned, additional lines below the All Users line will appear. Each
line at the top of this screen is referred to as a permissions rule—a set of individual
capabilities that can be granted, denied, or not specified (the relationship between these
options is discussed later in this section). To add a permissions rule, click Add A User Or
Group Rule just above the Resulting Permissions list. Then select either a group or user to
assign the rule for. You may select the option for Group or User next to the drop-down
arrow and then enter the first few characters of the group or user name to narrow down the
list. Once you've selected the group or user to assign permissions to, you may select from a
set of pre-defined permissions, such as Editor, Interactor, and so forth. A resulting set of
capabilities will be granted (as indicated by the green checkmark), denied (as indicated by
the red x), or not specified, as indicated by the small gray dot. You may also choose the
Chapter9: Working with Tableau Server 281
Permissions
Edit permissions for the workbook “Real Estate”,
G) T. >)
G) Tabbed views are +
hidde ; changing
: workbook permissions S w le) affect€ ct +t the permissions edit
Ss ionss of f individual
S of itsz views. Edi pe viguaP >
view t
ws ¢ >
pO
Assign Permissions to Contents
G
oe 2" N Py
2 § 6 ¢ E e
SHhewerie
& r &cE E a
2iss? ay Q
8e
o 8 6 ip ae wee 8 i
t € oO a p Ww = 2 oO
‘ SUS EE Teh a etal oie Se bei OS
St eS eee Co 8 teed nh ee 8. ae
ah ni ness
2% Eastern Region (3)
cute
Denied
Lane a
Mo EXE Be SE Se RSE x
s Bees Ese: Oe Enes bbe
=,
an) Cassandra Brandow Custom Se
A Chris Custom
Custom option and individually click a capability to cycle through granted, denied, and
unspecified options.
Once you have specified permissions on one or more permission rule lines, you will
want to ensure that the end result is, in fact, what you want. Because of overall permissions
provided by a user's site role and other permissions that may be granted at higher levels
(for example, a denial permission), the end result may be something different than you
specified in this screen. Click either the All Users line or any permissions line you created
to see users affected by that line. The Resulting Permissions portion of the Permissions
screen will show the net permissions that are granted. For example, in Figure 9-1, note that
some users match the set of permissions granted to the All Users rule. However, note that
Cassandra Brandow is denied the ability to export an image because of the permission rule
added just for her. And notice that Denise Roberts has no permissions at all, as she is a
member of the Eastern Region group that has been denied all permissions to this content.
282 Tableau 9: The Official Guide
Tip Although you don’t set permissions for content at the user level, there is a basic set of
permissions that a user gets based on the site role they are assigned when first added to
the Tableau Server. This site role determines the maximum permissions you can assign to
content for that user. For example, ifyou assign a user the Viewer site role, you may
remove their ability to view certain content (you can reduce permissions below their site
role). But ifyou attempt to assign permissions that are higher than their site role, the
permissions still won't be granted (you cannot supersede the permissions provided by the
site role).
As you assign permissions, remember that there is a relationship (to a certain extent, an
“inheritance” )between groups and users. By default, if you assign permissions to an object
for a group, users within the group are given the same permissions to the object. However,
if a different set of permissions is assigned to a specific user, those permissions will take
precedence over those specified at the group level.
With projects, workbooks, and the views (worksheets, dashboard, stories) they contain,
a different relationship exists. If you assign permissions to a project, existing workbooks
within the project won’t automatically take on those permissions—only workbooks added
after the project permissions are set will take on identical permissions. Assigning
permissions to a workbook won't automatically set views within the workbook to the same
permissions (workbooks with Show Views As Tabs selected being an exception). If, for
example, you later add a new sheet to a view in web edit mode, the workbook permission
will be applied. In each of these cases, to propagate the higher-level permissions to the
lower-level contents, make sure to click the Assign Permissions To Contents button in the
upper right.
There’s also a relationship between granted, denied, and unspecified permissions and
where they are specified. For example, if a permission is denied in one place and granted in
another, the denial takes precedence—the user won’t be able to perform that task. Ifa
permission isn’t specified anyplace, the user won't be able to perform the task. However, if
the permission is unspecified in one place and granted in another, the user will be able to
perform the task (granted supersedes unspecified).
x “ Best Practice Permissions are often the most confusing aspect of even a minimally
complex enterprise system. Give yourself extra time to experiment with permissions
before you roll major system or organizational changes out to production. In
particular, TEST permissions before you roil out a major production system. Create
several test accounts in various groups and assign desired permissions at user,
group, project, data source, and workbook/view levels. Then log in with the test
accounts to make sure you achieve the desired results.
Chapter 9: Working with Tableau Server 283
Schedules
As discussed earlier in several sections of this chapter, Tableau Server includes the ability to
perform two general types of tasks on a schedule: Tableau Data Extract refreshes (both
incremental and full) and subscription delivery (e-mail sent to users containing the most
current representation of a view). Schedules for these two types of activities are maintained
separately—any schedules that can be provided for extract refreshes won’t be available for
subscriptions, and vice versa. When Tableau Server is initially installed, there are a few
“sample” schedules added for each type of activity, but you'll probably want to modify or
remove these sample schedules and add your own.
Creating and modifying schedules is done slightly differently, depending on whether
you are using a single-site or multisite server. If you are running a single-site server, all
schedule choices are made from the Schedule option at the top of the screen. However,
if you are running a multisite server, the options on the Schedules screen will vary,
depending on whether you have selected Server (you are administering all sites) or have
selected a specific site at the very top of the screen. Although you may create new schedules
and run a schedule immediately in either case, you'll only be able to rename, remove, or
modify schedules if you are administering the entire server.
Click Schedule. A list of existing schedules will appear. You may select one or more
schedules and choose options from the Actions drop-down. If you wish to add a schedule,
click New Schedule. Give the schedule a meaningful name, assign the schedule to either
extract refreshes or subscriptions, select the priority of the schedule (this is relevant when
multiple schedules may be running at the same time), choose whether to execute the
schedule in a parallel or serial thread, and set the date/time specifics of the schedule.
When you save the schedule, it will be available when extract refreshes are specified when
publishing or when subscriptions are added from a view.
| New Schedule
Create a schedule users can choose for running extract refreshes or subscriptions.
Default priority so
Tasks are executed in priority order from 1 (highest) to 100 (lowest)
} Execution @ Paraliel: Use all available background processes for this schedule
Serial: Limit this schedule to one background process
Command-Line Options
Although a fairly rich set of administrative and management options is available from your
web browser when logged in to Tableau Server, there may be occasional features or
requirements that aren’t met with the web interface. Or, you may want to have several
administrative or maintenance steps proceed one after the other without having to
manually execute them one at a time in the web interface. And finally, you might benefit
from a regularly required administrative feature running automatically on a schedule, such
as nightly or weekly. For that, Tableau Server provides two command-line tools that can be
run from a Windows command window. In addition, several of these commands can be
combined in a Windows batch file. Either a single command or a batch file can be
scheduled with the Windows built-in Task Scheduler.
Tip /fyou wish to be able to run either of these commands from any directory, add the
program files location of your Tableau Server installation (in particular, the “bin”
subdirectory) to the Path environment variable in computer properties. Otherwise,
you'll need to change to that directory before you execute either a tabcmd or tabadmin
command.
tabcmd
Tabcmd can perform general maintenance and content tasks, such as removing or adding
content, adding sites, adding users en masse, and so forth. Because tabcmd can be run on
any computer in your network, you must establish a valid Tableau Server session at the
beginning of a series of tabcmd commands by logging in. Get specific options from Tableau
Server online help, or type the following at the command line:
tabcemd --help
Chapter 9: Working with Tableau Server 285
For example, a series of tabcmd commands can be used to log in, add
a new site to the
server, and log out.
Server: http://localhost
Username: administrator
Connecting to the server...
Signing in...
ad
Huu
fluto-sign in to site: Default
Creating new session
Server: http://localhost
Username: administrator
Connecting to the server...
Signing in...
Succeeded
oe
eRe
£2
Or Succeeded
Tip Even though tabcmd is installed on the Tableau Server computer by default, you may
install it on other computers on your network that don’t have Tableau Server installed.
This permits you to run maintenance tasks on any computer on the network. On the
original Tableau Server, find the Extras folder within the original Tableau Server
installation folder within Program Files. Find the TabcmdInstaller.exe file and copy it to,
and run it on, the computer where you like tabcmd installed. Note that tabadmin can
only be run from the Tableau Server computer.
tabadmin a
Tabadmin will perform a variety of administrative tasks, such as customizing some server
behavior and appearance, resetting user passwords, and starting and stopping the server.
Because tabadmin can only be run from the actual Tableau Server itself, you don’t need to
execute commands to log in to the server before executing tabadmin. Get specific options
from Tableau Server online help, or type the following on the command line: 4
For example, a series of tabadmin commands can be used to customize the logo and
name of your Tableau Server. Once the customizations are applied, tabadmin is used to
restart the server.
peaaneene
=
plicrosof ¢ Vindows (Version 6.1.76611
opyright ¢c> 2689 Microsoft Corporation. All rights reserved.
287
288 Tableau 9: The Official Guide
3
Share View
» Display Options
Email:
Copy and Paste link into your email message
http://10.211.55.3/views/InteractiveDashboard/inte
Embed:
Copy and Paste HTML code to embed the view in your website
<script type='text/javascript' src='http://10.211.55
e JavaScript API This approach, used with Tableau Public, Tableau Online, or
Tableau Server, is designed to customize the appearance of existing views. The
JavaScript API permits you to completely customize appearance and behavior, such
as modification of filters, parameters, toolbars, and so forth, with JavaScript API
calls. As the name implies, the JavaScript API is a pre-defined JavaScript library
installed on Tableau Server by default that you may call from your custom
JavaScript web applications.
Tip Although there is no Tableau Desktop interface for legacy full-client application
development, you may consider embedding a web browser object in a full-client
application. You may then use the JavaScript API with a Tableau Server implementation
to provide a custom Tableau interface in the application.
Chapter 10: Custom Programming Tableau and Tableau Server 289
The remainder of this chapter will cover the last three options. This is designed to
introduce you to each API, providing an introductory look at techniques to perform
common tasks. Each API has a complete set of online documentation that fully covers all
objects, methods, requirements, and capabilities.
JavaScript API
The JavaScript API provides a complete object model for retrieving content from Tableau
Server. Using the JavaScript API, you can augment or replace the standard Tableau Server
interface in your own custom web applications.
var options = {
width: "900px",
height: "500px",
hideTabs: true,
hideToolbar: true,
onFirstInteractive: function () {
workbook = viz.getWorkbook
() ;
activeSheet = workbook.getActiveSheet
() ;
}
he
In this sample code, the choice made with radio buttons on the source web page is used
to navigate between two sheets. Although not related to actually changing sheets, notice
use of an additional method in this code to turn an “event listener” on or off, which will fire
an event if the viewer selects marks on the view. This event listener is discussed in more
detail later under “Trapping Events.”
function ChangeSheets() {
if (document .getElementById('bars').checked) {
workbook.activateSheetAsync("Sales By Year/Category") ;
viz.removeEventListener
(tableau. TableauEventName.MARKS SELECTION, onMarksSelection) ;
} else {
workbook.activateSheetAsync("Sales/Goal By State");
viz.addEventListener
(tableau. TableauEventName.MARKS SELECTION, onMarksSelection) ;
function UpdateParameter() {
workbook. changeParameterValueAsync("Goal", document.
getElementById("Goal")
.value) ;
}
Chapter 10: Custom Programming Tableau and Tableau Server 293
Changing Filters
Although traditional quick filters will be fully functional within views exposed by the
JavaScript API, you are free to change filter values with API code. If you change quick filter
values, the quick filters will reflect the change. If you change filters that are not visible as
quick filters, the worksheet will reflect the change. As an aside, filters that are set within the
workbook to apply to more than one worksheet will propagate to all related worksheets
when code changes one (as in the case of the two sheets used in this example).
An additional option permits specification of the filter update type, which permits
specifying “All” (equivalent to checking All in the quick filter), “Remove” (equivalent to
unchecking the value in the quick filter), “Add” (equivalent to checking the value in a quick
filter), or “Replace” (replaces any existing filter value with that specified in the call).
In this example, a combo box on the encompassing web form is used to set a filter that
applies to both worksheets within the sample workbook. As such, the filter will change
whichever sheet happens to be viewed at the time. Because the filter is specified in the
workbook to apply to both sheets, the alternative sheet will reflect the filter if the view
changes to the other sheet, even though the filter is changed only once.
function ChangeFilter() {
workbook.getActiveSheet
() .applyFilterAsync (
"Region",
document .getElementById("Region")
.value,
tableau. FilterUpdateType.REPLACE) ;
Trapping Events
So far, examples covered in this section are the result of some action being performed by
the viewer, such as changing radio buttons or specifying a new value in a text box. The
JavaScript API has been called based on these actions. However, another capability of the
JavaScript API is to “catch” events that may be “fired” by various behaviors of a workbook.
294 Tableau 9: The Official Guide
In this example, an event handler is enabled to trap the selection of marks on the
worksheet. When a viewer selects one or more marks, the event code is executed.
This example shows an asynchronous call from the JavaScript API, which “chains” to a
function when it is finished. The second function creates a variable to retain the collection
of dimensions or measures and their values, which are included within the mark (an
immediate way to confirm that multiple fields and values are on a mark is to hover over
the mark and look at the fields and values that appear on the tooltip—the collection will
contain the field/value pairs in the same order). As such, this example retrieves the state
(the second member of the zero-based collection) and passes it to an external Wikipedia
web search.
Note Because the intent of the sample application is to only trap mark selections on one
worksheet, notice removeEventListener and addEventListener calls that are executed
when sheet navigation occurs. This is illustrated earlier in the section under “Navigating
Multiple Sheets in a Workbook.”
function onMarksSelection(marksEvent) {
return marksEvent .getMarksAsync() .then(reportSelectedMarks) ;
anne
re rreenrreeeeeeee re
SSF AS TSP ESIES
REST API
Although the JavaScript API (discussed previously in the chapter) is the key to a custom web
interface to present content, the REST API permits custom approaches to administrative and
maintenance tasks for Tableau Server. Tableau Server and the REST API are web-based;
Chapter 10: Custom Programming Tableau and Tableau Server 295
however, the language and development environment you use need not be. The development
tool used need merely support a standard REST HTTP/XML-based interface and does not
have to present a user interface in a web browser.
The example described in this section, which is presented as a Python script, performs
the following steps:
It’s helpful to understand several concepts that will present themselves throughout the
sample code:
The REST API makes use of HTTP URIs (universal resource identifiers) that are
similar to those placed on a web browser address line when navigating the
World Wide Web. For example, the URI to initially sign in with the REST API is
http://<your Tableau server>/api/2.0/auth/signin. If you have implemented
Secure Sockets Layer (SSL) support on your Tableau Server, or if you're using
Tableau Public, the URI will begin with https://.
HTTP calls fall into POST (to create new items), GET (to retrieve information),
PUT (to update existing items), and DELETE (to remove items) categories.
296 Tableau 9: The Official Guide
e The REST API makes use of tsRequest XML “payloads” for certain calls to provide
supporting data to the call and returns results in a block of XML text. Several
libraries (such as ElementTree/ET) are used to form payload XML.
The REST API returns a status code (such as 200 for “OK,” 201 for “Created,” and so
forth) indicating the result of the API call. In addition, a block of XML is returned
containing the results of the call, such as the LUID for a new user ID or a list of
workbooks. An included library provides a utility for parsing and searching the
resulting XML block.
# Sign in to Tableau Server and retrieve a user LUID (Local Unique ID)
import
import xml.etree.ElementTree as ET # Contains methods used to build and parse XML
import requests # Contains methods used to make HTTP requests
# The following packages are used to build a multi-part/mixed request.
# They are contained in the 'requests' library.
from requests.packages.urllib3.fields import RequestField
from requests.packages.urllib3.filepost import encode multipart formdata
### SIGN IN
NAME = 'George'
PASSWORD = 'George'
SITE = '' #Empty for default site
# Send to server
server response = requests.post (url+'auth/signin', data=xml_payload_for_request)
if server _response.status_code != 200:
# Something went wrong
print (server _response.text)
Slee:
# Reads and parses the response
xml response = ET.fromstring(server_response.text)
Note Several API calls in this initial code return local unique identifiers, referred to as
LUIDs (similar to, but shorter than, global unique identifiers, or GUIDs, that you may be
familiar with). LUIDs are helpful in that they permit the REST API to refer to a specific
workbook, user, Tableau Server site, and so forth, even ifthey are renamed on the server.
LUIDs retrieved are then used in subsequent calls to identify specific resources, such as
users and workbooks.
NEWUSER = 'Denise'
SITEROLE = 'Interactor'
xml_payload_for_request = ET.tostring(xml_payload_
for request)
Chapter 10: Custom Programming Tableau and Tableau Server 299
# Send to server
server response = requests.post (url+'sites/! + SITE_ID + '/users/', data=xml_payload for request,
headers={"x-tableau-auth": TOKEN})
if server_response.status_
code != 201:
# Something went wrong
xml_response = ET.fromstring(server_response.text)
WORKBOOK
TO LOOKUP = 'Science'
# Send to server
= requests.get(url+'sites/' + SITE_ID + '/users/' + NEWUSER_LUID + ¢/workbooks',
server response
headers={"x-tableau-auth": TOKEN})
300 Tableau 9: The Official Guide
else:
xml_response = ET.fromstring(server_response.text)
else
Set Permissions
e e
Next, permissions are set on the desired workbook. A request is built to execute the
sites/<site signed into>/workbooks/<desired workbook>/permissions/ URI, which is
submitted via a PUT request. Both the site and workbook are included in the URI via their
LUID. In addition, a block of desired permissions, organized as a map, is created with a
series of permission capability/grant-or-deny pairs to use in the XML payload.
If the call is successful (the response status code is 200), the permissions were properly
set and no response XML need be used.
"ViewComments": "Deny",
Chapter 10: Custom Programming Tableau and Tableau Server 301
"ExportData": "Deny",
"ChangeHierarchy": "Allow",
"WebAuthoring": "Allow"}
xml_payload_for_request = ET.tostring(xml_payload_for_request)
print (xml_payload_for request)
server response = requests.put (
if server_response.status_code != 200:
print (server _response.text)
eae:
print ('Permissions Set...')
# Sign Out
response = requests.post (url+'/signout', headers={'x-tableau-auth': TOKEN})
server
302 Tableau 9: The Official Guide
This code results in a new user named Denise being created and her account granted a
separate permissions rule for the Science workbook.
es x
| Permissions
Edit permissions for the workbook “Science”.
| 4 gN a
/ as a os Rs ee 8
Se All Users (15) Custom See ee Ree BS os S Tea OF
| a Denise Custom a ee 5; (ata: oe SS 7s es wie; ace
im 6©6Resulting Permissions
Select a permission rule above to see the permissions for users affected by that rule.
| 3
or recae eo ones OE eT Se Be eee!
Chapter 10: Custom Programming Tableau and Tableau Server 303
The TDE API example presented in this section as a Python script creates a .tde file and
imports the contents of a .csv file into it. If the .tde file doesn’t exist, it is created and data is
added (much as in a full refresh from Tableau Server or Tableau Desktop). If the .tde file
already exists, data is appended to the existing file (much as in an incremental refresh from
Tableau Server or Tableau Desktop).
This is accomplished via the following steps:
e The desired .tde file is “opened” (if it doesn’t exist, it will be created). The .csv file to
import is opened.
e The schema (field names/data types) is retrieved from the existing .tde. If the .tde
doesn’t exist, the schema is defined from scratch.
e The.csv file is read row by row, with each .csv field being mapped to a commensurate
tde field. The .tde row is added to the .tde file.
e The.tde file is closed.
304 Tableau 9: The Official Guide
# Import Modules
import dataextract #Tableau Data Extract API
import os
import datetime
import csv
#Open CSV
csvFile = csv.reader(open('Sample Source Data.csv', 'rb'), delimiter=',')
Cycle Through the .CSV File and Add Rows to the .TDE File
The TDE newrow object is created to represent the new row that will be written to the .
tde file. Again, the previously referenced tableDef object, representing the schema, is
supplied. The current date is added to a variable to add to the .tde file as the DateStamp
field. The .csv file is advanced to the second record (via the next() method) to skip the
header row.
A loop through the .csv file, one record at a time, is then established. Within the
loop line[field order] data from the .csv file is passed to the newrow object via data
type-appropriate set options. The newrow is added to the .tde file via insert.
Note An if test is provided in the sample script to test for the existence of data from the .csv
file in the existing .tde. This logic may be used to perform the equivalent of a Tableau
Server or Desktop incremental refresh, only adding data to the .tde file ifit can be
determined that the .tde doesn’t already contain it. Your custom application must make
this determination on its own without reading existing data in the .tde file (perhaps
write a separate file containing a date stamp or last key field used that can be read
later). This is required because the TDE API will only write data to a .tde file—it cannot
read .tde file data.
newrow = dataextract.Row(tableDef)
numrows = 0
if True: #Potentially add Togic to determine if data is new -- TDE API doesn't *READ* existing TDE
table.insert (newrow)
numrows = numrows + 1
print('Rows added to TDE: ' + str(numrows) )
else:
The result is the data in the sample .csv file being written to a Tableau Data Extract. If
the script is run multiple times without deleting the .tde file, the .csv data is appended to
the previous data in the .tde.
Tableau - Bookt
Ce Abc
| Detail ‘Tooltip)
Measures
Quantity
Unit Price
Latitude (generated)
Longitude (generated)
Number of Records
+@ Measure Values
Symbols rolled-up, 91
- (minus sign), 54 SUM, 147, 149
‘(apostrophe), 142, 147 table calculations and, 156-158
““ (quotation marks), 142, 147 analysis, statistical, 167-179
+ (plus sign), 54, 143 Analytics pane, 168-169
{ }curly braces, 151 forecasting, 177-179
[ ]square brackets, 141 groups, 125-126
Instant Analytics, 169-170
seca \ erences reference bands, 92, 172-173
actions reference distributions, 87, 92,
dashboards, 122, 227-233 173-175
filter, 114-117, 227, 229-231 reference lines, 87, 88, 170-172
highlight, 114, 117-119 sets, 131-132
naming, 118 speed of analysis, 2
URL, 114, 120-122, 227, 231-233 trend lines, 82, 175-177
worksheets, 114-122, 227-233 analytic annotations, 169-170
activateSheetAsync method, 291-292 Analytics pane, 168-169
ad hoc calculations, 137-139, Android, 256-257
165-166 annotations, 82
Add Tags option, 260 APIs (application programming interfaces)
addressing, 160 JavaScript, 289-294
administration, 273-286 REST, 294-303
administrators, 265, 273, 276-277, 280 TDE, 303-307
aggregations apostrophe (‘), 142, 147
calculated fields, 147-149 application programming interfaces.
LOD expressions and, 150-156 See APIs
309
310 Tableau 9: The Official Guide
eames
[) cums extracted. See extracted data
dashboards, 215-233 filtering. See filtering data
actions, 122, 227-233 geocoded, 181
adding worksheets to, 217 geographic, 181, 183-187
associated worksheet elements, numeric. See numeric data
222-223 sort order, 10
blank, 225 string, 142-143
.tds, 55-56
functions
built-in, 136
.tdsx, 56
calculated fields, 141
.twb, 3
inventory-related; 38
.twbx, 4, 198, 241
table calculation, 164-167
xlsx, 239
Filled Map option, 208 seemed G memmcee
filter actions, 114-117, 227, 229-231
gauge, 89
filtering data, 97-107
geocode mismatches, 186-187
basic filtering, 98-102
geocoded data, 181
calculations, 101-102, 110
geocoded fields, 183-200
date filters, 99-102
geocoding, custom, 190-200
date/time filters, 99, 105-106
geographic data, 181, 183-187
filter actions, 114-117, 227, 229-231
geographic hierarchies, 188-194
geocode mismatches and, 187
geographic roles, 190, 192, 196, 198
including/excluding from
GET requests, 295
worksheets, 98
316 Tableau 9: The Official Guide
ee
halo option, 18 JavaScript API, 289-294
Hanrahan, Pat, 1-2 accessing/initializing, 290-291
heat map, 18, 19, 20 asynchronous calls, 291, 294
Hide Card option, 7 filters, 293
hierarchies navigating worksheets, 291-292
creating, 54 overview, 288, 289-290
described, 53 sample application, 289-290
geographic, 188-194 supplying parameter values, 292
organizing dimensions in, 53-54 trapping events, 293-294
highlight actions, 114, 117-119, 227, 228-229 joining tables, 38-40, 60. See also
histograms, 134. See also bar charts data blending
Hover method, 114 JPEG format, 241
Index 317
2 ‘
~
* \
ej
; a ’
~—=_
. Pe — >
2 f
t se j
os ' nh Cher eae hi y!
é iui
[L,)? @olninn
Z ‘4 Weel! patie iites seo
b -_
i A :
r7 ; ‘ayy
iv he Py lit
bow
You are slelteliare the official guide to Tableau
feyEsaes
FeBS
@ @e@ OC
6066
©0009000
Deliver meaningful BI visualizations and real-time dashboards to users Foose o+s )
across your organization—quickly and easily. Written by an experienced SSCOOE
author and certified trainer, Tableau 9: The Official Guide offers 5@O608
step-by-step instruction, best practices, examples, and downloadable beeps.
video tutorials. See how to get up and running on Tableau, load data, ty cee
drag and drop components, add graphics and maps, create complex
calculations, and distribute dynamic dashboards and stories. This
practical book teaches how to work with Tableau Server, write custom
programs, and publish your results to the Web.
George Peck is an Accredited Tableau trainer. His company, The Ablaze Groun ic 2 Tahlass: -naatta~ -= 4 ;
George is the bestselling author of several BI books, including multiple editic MO\ WA, ince.
TABLEAU 9
ee PECK PB
MHPROFESSIONAL.COM CAMPUS BOOK&SUPPLY
WP Follow us on Twitter @MHComputing 978-0-07-184329-4%
Sarat a lil INI! 99929
UA ll
caisn
02
{ a4