0% found this document useful (0 votes)
39 views106 pages

Tableau

The document provides a comprehensive guide on various data manipulation functions in Tableau, including date calculations, string functions, logical expressions, and number functions. Each function is explained with its purpose and examples for better understanding. It emphasizes the importance of these functions in cleaning and analyzing data effectively.

Uploaded by

gv691270
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views106 pages

Tableau

The document provides a comprehensive guide on various data manipulation functions in Tableau, including date calculations, string functions, logical expressions, and number functions. Each function is explained with its purpose and examples for better understanding. It emphasizes the importance of these functions in cleaning and analyzing data effectively.

Uploaded by

gv691270
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 106

Domain 2: Explore and Analyze Data

2.1. Create calculated fields

2.1.1. Write date calculations (DATEPARSE, DATENAME…)

1. DATE

 What it does: Turns text or numbers into a date.

 Example:
DATE("9/22/2018") → September 22, 2018

2. DATEADD

 What it does: Adds time (like days, months, years) to a date.

 Example:
DATEADD('week', 1, [due date]) → Adds 1 week to your due date.

3. DATEDIFF

 What it does: Finds the difference between two dates (in days, months, etc).

 Example:
DATEDIFF('day', #3/25/1986#, #2/20/2021#) → 12,751 days

4. DATENAME

 What it does: Returns the name of a date part (like the month or day name).

 Example:
DATENAME('month', #1986-03-25#) → "March"

5. DATEPARSE

 What it does: Turns a specially formatted text into a date (when DATE doesn’t work).

 Example:
DATEPARSE('yyyy-MM-dd', "1986-03-25") → March 25, 1986

6. DATEPART

 What it does: Returns the number for a date part (like month as 3 for March).

 Example:
DATEPART('month', #1986-03-25#) → 3

7. DATETRUNC

 What it does: Rounds a date down to the start of a time period (like the first day of the
month).

 Example:
DATETRUNC('month', #9/22/2018#) → September 1, 2018

8. DAY, MONTH, YEAR, QUARTER, WEEK


 What they do: Return the day, month, year, quarter, or week number from a date.

 Examples:
DAY(#September 22, 2018#) → 22
MONTH(#1986-03-25#) → 3
YEAR(#1986-03-25#) → 1986
QUARTER(#1986-03-25#) → 1
WEEK(#1986-03-25#) → 13

9. ISDATE

 What it does: Checks if something is a valid date.

 Example:
ISDATE("09/22/2018") → True
ISDATE("22SEP18") → False

10. MAKEDATE

 What it does: Builds a date from year, month, and day numbers.

 Example:
MAKEDATE(1986, 3, 25) → March 25, 1986

11. MAKETIME

 What it does: Builds a time from hour, minute, and second.

 Example:
MAKETIME(14, 52, 40) → 2:52:40 PM (on Jan 1, 1899 by default)

12. NOW & TODAY

 NOW(): Gives the current date and time.

 TODAY(): Gives just the current date.

13. MAX & MIN

 MAX: Finds the latest (most recent) date.

 MIN: Finds the earliest date.

14. ISO Functions

(For week-based calendars, often used in business)

 ISOYEAR, ISOQUARTER, ISOWEEK, ISOWEEKDAY: Get the ISO year, quarter, week, or
weekday.

Common Arguments

 date_part: Tells the function what part of the date to use (like 'year', 'month', 'day', etc).

 start_of_week: Lets you choose which day is the start of the week (like "Sunday" or
"Monday").

Quick Tips
 Want to change how a date looks? Use formatting, not a calculation.

 Not sure if your data is a date? Look for the calendar icon in Tableau.

2.1.2. Write string functions

String functions help you work with text data (like names, codes, or IDs). You can use them to
extract, change, or check parts of text.

Common String Functions (with Easy Examples)

Function What It Does Example Result


ASCII Gives the code number of a ASCII('A') 65
character
CHAR Gives the character for a CHAR(65) 'A'
code number
CONTAINS Checks if text contains CONTAINS("Calculation", TRUE
certain letters "alcu")
ENDSWITH Checks if text ends with ENDSWITH("Tableau", "leau") TRUE
certain letters
FIND Finds where a set of letters FIND("Calculation", "alcu") 2
starts
LEFT Gets the first few letters LEFT("Matador", 4) "Mata"
LEN Counts how many letters LEN("Matador") 7
LOWER Makes all letters lowercase LOWER("ProductVersion") "productversion"
PROPER Capitalizes first letter of each PROPER("PRODUCT name") "Product Name"
word
REPLACE Swaps part of the text with REPLACE("Version 3.8", "3.8", "Version 4x"
something else "4x")
RIGHT Gets the last few letters RIGHT("Calculation", 4) "tion"
SPLIT Splits text by a symbol and SPLIT("a-b-c-d", "-", 2) "b"
picks a part
STARTSWITH Checks if text starts with STARTSWITH("Matador", "Ma") TRUE
certain letters
TRIM Removes spaces at the start TRIM(" Calculation ") "Calculation"
and end
UPPER Makes all letters uppercase UPPER("Calculation") "CALCULATION"

Example: Extracting Order Numbers

Suppose you have an order ID like CA-2011-100006 and you want just the number at the end
(100006):

 Use: RIGHT([Order ID], 6)

 This grabs the last 6 characters.

Notes on SPLIT Function

 SPLIT divides text into parts using a symbol (like - or |).

 You can pick which part you want (counting from the left or right).
 Some data sources (like Excel, MySQL) let you split from both ends, but others (like Oracle,
Redshift) only let you split from the left.

Why Use These Functions?

 Clean up messy data

 Pull out useful info (like last names, codes, or numbers)

 Make your data easier to analyze and visualize

In short:
Tableau’s string functions help you quickly find, change, or pull out parts of text in your data. Use
them to make your data tidy and useful for analysis!

Or

Function What It Does Example Result


ASCII(string) Returns the ASCII code of ASCII("A") 65
the first character
CHAR(number) Returns the character for a CHAR(65) "A"
given ASCII code
CONTAINS(str, Checks if a string contains CONTAINS("Calculation", TRUE
sub) a substring "alcu")
ENDSWITH(str, Checks if a string ends with ENDSWITH("Tableau", TRUE
sub) a substring "leau")
FIND(str, sub, Finds position of a FIND("Calculation", "a", 3) 7
[start]) substring (starts at 1).
Returns 0 if not found
FINDNTH(str, sub, Finds the position of the FINDNTH("Calculation", "a", 7
n) nth occurrence of a 2)
substring
LEFT(str, n) Returns the first n LEFT("Matador", 4) "Mata"
characters of a string
LEN(str) Returns the number of LEN("Matador") 7
characters in a string
LOWER(str) Converts string to all LOWER("ProductVersion") "productversion"
lowercase letters
LTRIM(str) Removes spaces at the LTRIM(" Matador ") "Matador "
beginning of the string
MAX(expr1, Returns the max value MAX("Bob", "Zane") "Zane"
expr2) (e.g., alphabetically last for
strings)
MID(str, start, Returns part of string MID("Calculation", 2, 5) "alcul"
[len]) starting at position
MIN(expr1, Returns the min value MIN("Abebi", "Zander") "Abebi"
expr2) (e.g., alphabetically first
for strings)
PROPER(str) Capitalizes first letter of PROPER("product NAME") "Product Name"
each word
REPLACE(str, old, Replaces part of the string REPLACE("Version 3.8", "Version 4x"
new) with new text "3.8", "4x")
RIGHT(str, n) Returns the last n RIGHT("Calculation", 4) "tion"
characters of a string
RTRIM(str) Removes spaces at the RTRIM(" Calculation ") " Calculation"
end of the string
SPACE(n) Returns a string of n space SPACE(2) " " (2 spaces)
characters
SPLIT(str, delim, Splits a string and returns SPLIT("a-b-c", "-", 2) "b"
n) the nth piece
STARTSWITH(str, Checks if string starts with STARTSWITH("Matador", TRUE
sub) a substring "Ma")
TRIM(str) Removes spaces from both TRIM(" Calculation ") "Calculation"
start and end of string
UPPER(str) Converts string to all UPPER("Calculation") "CALCULATION"
uppercase letters

✅ Example Use Case

Extract order number from a full Order ID like 'CA-2011-100006':

tableau

CopyEdit

RIGHT([Order ID], 6)

Result: '100006'

2.1.3. Write logical and Boolean expressions (If, case, nested, etc.)

Logical Functions in Tableau: Simple and Understandable Guide

Logical functions in Tableau help you make decisions in your data-like checking if something is true or
false, handling missing values, or categorizing data. Here’s a breakdown of each function and
operator, with clear examples and explanations so you don’t miss any points:

AND

 Checks if two conditions are both true.

 Example:
IF [Season] = "Spring" AND [Season] = "Fall" THEN "It's the apocalypse" END
Both must be true for the result to be true.

OR

 Checks if at least one of two conditions is true.

 Example:
IF [Season] = "Spring" OR [Season] = "Fall" THEN "Sneakers" END
If either is true, the result is true.

NOT
 Reverses the result of a condition.

 Example:
IF NOT [Season] = "Summer" THEN "Don't wear sandals" ELSE "Wear sandals" END
True becomes false, and vice versa.

IF / ELSEIF / ELSE / END

 Tests conditions and returns results based on which condition is true.

 Example:

text

IF [Season] = "Summer" THEN 'Sandals'

ELSEIF [Season] = "Winter" THEN 'Boots'

ELSE 'Sneakers'

END

Checks each condition in order and returns the result for the first true one. If none match, returns the
ELSE result.

CASE / WHEN / THEN / ELSE / END

 Compares a value to several options and returns a result for the first match.

 Example:

text

CASE [Season]

WHEN 'Summer' THEN 'Sandals'

WHEN 'Winter' THEN 'Boots'

ELSE 'Sneakers'

END

Simpler than multiple IF statements for comparing one field to many values.

IIF

 Short for "Immediate IF". Checks one condition and returns one value if true, another if false,
and optionally another if unknown (null).

 Example:
IIF([Season] = 'Summer', 'Sandals', 'Other footwear')
Like a compact IF statement.

IN

 Checks if a value matches any in a list or set.


 Example:
SUM([Cost]) IN (1000, 15, 200)
Returns true if the value is one of those listed.

ISNULL

 Checks if a value is null (missing).

 Example:
ISNULL([Assigned Room])
Returns true if the value is missing.

IFNULL

 Returns the first value if it’s not null; otherwise, returns the second value.

 Example:
IFNULL([Assigned Room], "TBD")
If the room is missing, returns "TBD".

ZN

 Returns the value if it isn’t null; otherwise, returns zero.

 Example:
ZN([Test Grade])
If the grade is missing, returns 0.

MAX / MIN

 Returns the maximum or minimum of two values, or the highest/lowest in a set.

 Example:
MAX(4,7) returns 7
MIN(4,7) returns 4

ISDATE

 Checks if a string is a valid date.

 Example:
ISDATE("2018-09-22")
Returns true if the string is a proper date.

Key Points

 Use IF for multiple conditions, CASE for comparing one value to many options.

 AND, OR, NOT combine or reverse conditions.

 ISNULL, IFNULL, ZN help handle missing data.

 MAX and MIN find the largest or smallest values.

 IN checks if a value is in a list or set.

 IIF is a compact IF statement.


 ISDATE checks if text is a date.

2.1.4. Write number functions

Number Functions in Tableau: Simple and Understandable Guide

Number functions in Tableau help you perform calculations on numeric data fields. Here’s a clear
summary of each function and what it does-no steps skipped.

Why use number functions?

 They let you compute or transform numeric data, like finding absolute values, rounding
numbers, or calculating logarithms.

List of Number Functions in Tableau

 ABS(number): Returns the absolute (positive) value.


Example: ABS(-7) = 7

 ACOS(number): Returns the arccosine (angle in radians) of a number.


Example: ACOS(-1) = 3.14

 ASIN(number): Returns the arcsine (angle in radians).


Example: ASIN(1) = 1.57

 ATAN(number): Returns the arctangent (angle in radians).


Example: ATAN(180) = 1.57

 ATAN2(y, x): Returns the arctangent between two numbers (in radians).
Example: ATAN2(2, 1) = 1.11

 CEILING(number): Rounds up to the nearest integer.


Example: CEILING(2.1) = 3

 COS(number): Returns the cosine of an angle (input in radians).


Example: COS(PI()/4) = 0.707

 COT(number): Returns the cotangent of an angle (in radians).


Example: COT(PI()/4) = 1

 DEGREES(number): Converts radians to degrees.


Example: DEGREES(PI()/4) = 45

 DIV(integer1, integer2): Returns the integer part of the division.


Example: DIV(11, 2) = 5

 EXP(number): Returns e raised to the power of the number.


Example: EXP(2) = 7.389

 FLOOR(number): Rounds down to the nearest integer.


Example: FLOOR(7.9) = 7

 HEXBINX(x, y): Maps coordinates to the x-coordinate of the nearest hexagonal bin.

 HEXBINY(x, y): Maps coordinates to the y-coordinate of the nearest hexagonal bin.
 LN(number): Returns the natural logarithm (base e).
Example: LN(50) = 3.91

 LOG(number, [base]): Returns the logarithm for a given base.


Example: LOG(16, 4) = 2

 MAX(expr1, expr2): Returns the maximum of two values.


Example: MAX(4, 7) = 7

 MIN(expr1, expr2): Returns the minimum of two values.


Example: MIN(4, 7) = 4

 PI(): Returns the constant pi (3.14159).

 POWER(number, power): Raises number to the given power.


Example: POWER(5, 3) = 125

 RADIANS(number): Converts degrees to radians.


Example: RADIANS(180) = 3.14

 ROUND(number, [decimals]): Rounds to a specified number of decimal places.


Example: ROUND(1/3, 2) = 0.33

 SIGN(number): Returns -1 if negative, 0 if zero, 1 if positive.


Example: SIGN(-5) = -1

 SIN(number): Returns the sine of an angle (in radians).


Example: SIN(PI()/4) = 0.707

 SQRT(number): Returns the square root.


Example: SQRT(25) = 5

 SQUARE(number): Returns the square (number × number).


Example: SQUARE(5) = 25

 TAN(number): Returns the tangent of an angle (in radians).


Example: TAN(PI()/4) = 1

 ZN(expression): Returns the expression if not null, otherwise zero (replaces nulls with 0).
Example: ZN(null) = 0

How to Create a Number Calculation in Tableau

1. Connect to your data source.

2. Go to a worksheet and select Analysis > Create Calculated Field.

3. Name your field (e.g., "Minimum Sales transaction").

4. Enter a formula, such as MIN(Sales).

5. Click OK. The new calculation appears in your data pane and can be used in visualizations.

These functions help you clean, transform, and analyze numerical data in Tableau, making your
analysis more accurate and flexible1.

2.1.5. Write type conversion functions


Type conversion functions in Tableau let you change the data type of a field-like turning a number
into a string, or a string into a date. This is also called "casting." Type conversion is important because
some calculations or visualizations only work if your data is in the right format. For example, you
can't use a string as a date in a date calculation until you convert it.

Why Use Type Conversion Functions?

 To make sure your data is in the correct format for calculations or visualizations.

 For example, if you have a date stored as a text string, you must convert it to a date type to
use it in date functions like DATEDIFF.

 You can change a field's data type for the whole dataset in the Data pane, or just for a
specific calculation using a type conversion function3468.

Common Type Conversion Functions in Tableau

Function What It Does Example Usage Result/Output


DATE Converts a string/number DATE("9/22/2018") 2018-09-22
to a date
DATETIME Converts to datetime (date DATETIME("April 15, 2005 2005-04-15
+ time) 07:59:00") 07:59:00
FLOAT Converts to decimal FLOAT(3) 3.000
(floating point number)
INT Converts to integer (whole INT(8/3) 2
number)
STR Converts to string (text) STR(2025) "2025"
MAKEDATE Makes a date from year, MAKEDATE(2020, 4, 31) 2020-05-01
month, day numbers
MAKEDATETIME Combines date and time MAKEDATETIME("2024-01- 2024-01-01
to datetime 01", #12:00#) 12:00:00
MAKETIME Makes datetime from MAKETIME(14, 52, 40) 1899-01-01
hour, minute, second 14:52:40
MAKEPOINT Converts lat/long to MAKEPOINT(40.7, -74.0) Spatial point
spatial point
MAKELINE Creates a line between MAKELINE(Point1, Point2) Spatial line
two spatial points
How to Create a Type Conversion Calculation (Example)

Suppose you want to convert the "Postal Code" field from a number to a string:

1. Open Tableau Desktop and connect to your data (e.g., Sample - Superstore).

2. Go to a worksheet.

3. Click Analysis > Create Calculated Field.

4. Name the field (e.g., "Postal Code String").

5. Enter the formula:

text

STR([Postal Code])
6. Click OK.

Now, "Postal Code String" will appear in your Data pane as a string (text) field. Tableau will treat it as
text, not a number, so it won't aggregate it as a numeric value568.

Extra Tips

 You can often change a field’s data type directly in the Data pane by clicking its icon.

 Use type conversion functions in a calculation if you only want to change the type for a
specific use, or if Tableau can't automatically recognize the format (such as unusual date
strings)346.

 Boolean values can also be converted: True becomes 1 (or "1"), False becomes 0 (or "0"), and
Unknown becomes Null.

Summary

 Type conversion functions help you change data types in Tableau.

 Use them when your data isn’t in the right format for your analysis or visualization.

 Common functions: DATE, DATETIME, FLOAT, INT, STR, MAKEDATE, MAKEDATETIME,


MAKETIME, MAKEPOINT, MAKELINE.

 You can use these functions in calculated fields for flexible, on-the-fly conversions.

2.1.6. Write aggregate functions

 Aggregate functions help you summarize your data.

 They let you change the level of detail (granularity) in your analysis.

 Example: To find out how many unique orders you had in a year, you can use COUNTD(Order
ID).

Why Use Aggregate Functions?

 To summarize data (like totals, averages, counts).

 To group data (like sales per year, average profit per region).

 To analyze trends or relationships between variables.

Common Aggregate Functions in Tableau

Here are the main aggregate functions you can use:

1. ATTR

 Syntax: ATTR(expression)

 Use: Returns the value if all rows have the same value; otherwise, returns *.

2. AVG

 Syntax: AVG(expression)
 Use: Returns the average (mean) of the values.

3. COLLECT

 Syntax: COLLECT(spatial)

 Use: Combines spatial values. Used for maps.

4. CORR

 Syntax: CORR(expr1, expr2)

 Use: Finds the correlation between two fields (from -1 to 1).

5. COUNT

 Syntax: COUNT(expression)

 Use: Counts the number of items (ignores nulls).

6. COUNTD

 Syntax: COUNTD(expression)

 Use: Counts the number of unique (distinct) items.

7. COVAR / COVARP

 Syntax: COVAR(expr1, expr2) or COVARP(expr1, expr2)

 Use: Measures how two variables change together (covariance).

8. MAX

 Syntax: MAX(expression) or MAX(expr1, expr2)

 Use: Returns the largest value.

9. MEDIAN

 Syntax: MEDIAN(expression)

 Use: Returns the middle value (median).

10. MIN

 Syntax: MIN(expression) or MIN(expr1, expr2)

 Use: Returns the smallest value.

11. PERCENTILE

 Syntax: PERCENTILE(expression, number)

 Use: Returns the value at a given percentile (e.g., 90th percentile).

12. STDEV / STDEVP

 Syntax: STDEV(expression) / STDEVP(expression)

 Use: Returns the standard deviation (spread) of values.


13. SUM

 Syntax: SUM(expression)

 Use: Adds up all the values.

14. VAR / VARP

 Syntax: VAR(expression) / VARP(expression)

 Use: Returns the variance (how much values vary).

Important Notes

 Null values are ignored in most aggregate functions.

 Some functions only work with certain data types (e.g., AVG only with numbers).

 Some functions may not be available for all data sources.

Example: Creating an Aggregate Calculation

1. Connect to your data in Tableau.

2. Go to a worksheet and select Analysis > Create Calculated Field.

3. Name the field (e.g., Margin).

4. Enter a formula, for example:

text

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

o This calculates profit margin, but only if sales are not zero.

5. Click OK. The new field appears under Measures.

Rules for Aggregate Calculations

 Do NOT mix aggregated and non-aggregated fields in the same formula.

o Example: SUM(Price)*[Items] is NOT allowed.

o But SUM(Price*Items) or SUM(Price)*SUM(Items) is allowed.

 All arguments in a function must be either all aggregated or all not aggregated.

o Example: MAX(SUM(Sales), SUM(Profit)) is OK.

 Aggregate calculations are always measures (not dimensions).

 Grand totals are calculated correctly with aggregate functions.

Special Note on Floating-Point Arithmetic

 Sometimes, due to how computers store numbers, you may see very small rounding errors
(like -1.42e-14 instead of 0).

 You can use the ROUND function or format numbers to hide extra decimals.
Summary Table

Function What it Does Example Syntax


SUM Adds up values SUM([Sales])
AVG Calculates average AVG([Profit])
COUNT Counts items COUNT([Order ID])
COUNTD Counts unique items COUNTD([Customer Name])
MIN Finds smallest value MIN([Order Date])
MAX Finds largest value MAX([Sales])
MEDIAN Finds median value MEDIAN([Discount])
PERCENTIL Finds a specific percentile PERCENTILE([Score], 0.9)
E
STDEV Standard deviation (sample) STDEV([Sales])
STDEVP Standard deviation (population) STDEVP([Profit])
VAR Variance (sample) VAR([Sales])
VARP Variance (population) VARP([Profit])
CORR Correlation between two fields CORR([Sales], [Profit])
COVAR Covariance (sample) COVAR([X], [Y])
COVARP Covariance (population) COVARP([X], [Y])
ATTR Single value or * ATTR([Category])

2.1.7. Write basic spatial calculations

Spatial functions let you analyze and combine location-based data (like maps, coordinates, or shapes)
with other types of data (like spreadsheets or text files). For example, you can:

 Join a map of city districts with a list of pothole locations (latitude/longitude) to see which
district has the most repairs.

 Draw lines between two points, like showing the path from where a commuter starts to
where they end their trip.

List of Spatial Functions in Tableau

1. AREA

 What it does: Calculates the surface area of a polygon (like a district or park).

 Syntax: AREA([Geometry], 'units')

 Units: meters, kilometers, miles, feet (must be in quotes, like 'miles')

 Example: AREA([Geometry], 'feet')

2. BUFFER
 What it does: Creates a shape (circle or area) around a point or line at a set distance.

 Syntax:

o For points: BUFFER([Point], distance, 'units')

o For lines: BUFFER([Line], distance, 'units')

 Example:

o BUFFER([Spatial Point Geometry], 25, 'mi')

o BUFFER(MAKEPOINT(47.59, -122.32), 3, 'km')

3. DIFFERENCE

 What it does: Shows what part of one area is left after removing the overlapping part with
another area.

 Syntax: DIFFERENCE(Polygon1, Polygon2)

 Example: DIFFERENCE([Polygon1], [Polygon2])

 Note: Only works with polygons, not points or lines.

4. DISTANCE

 What it does: Measures the distance between two points.

 Syntax: DISTANCE(Point1, Point2, 'units')

 Example: DISTANCE([Origin Point],[Destination Point], 'km')

 Note: Only works with live data connections when creating, but works with extracts after.

5. INTERSECTION

 What it does: Finds the area where two polygons overlap.

 Syntax: INTERSECTION(Polygon1, Polygon2)

 Example: INTERSECTION([Polygon1], [Polygon2])

 Note: Only works with polygons.

6. INTERSECTS

 What it does: Checks if two shapes (point, line, or polygon) overlap or touch.

 Syntax: INTERSECTS(geometry1, geometry2)

 Output: True or False

7. MAKELINE

 What it does: Draws a line between two points.

 Syntax: MAKELINE(Point1, Point2)

 Example: MAKELINE(MAKEPOINT(47.59, -122.32), MAKEPOINT(48.5, -123.1))


8. MAKEPOINT

 What it does: Turns latitude and longitude into a spatial point.

 Syntax: MAKEPOINT(latitude, longitude, [SRID])

 Example: MAKEPOINT(48.5, -123.1)

 Note: Can't use Tableau's auto-generated latitude/longitude fields. Data must have its own
coordinates.

9. LENGTH

 What it does: Measures the length of a line.

 Syntax: LENGTH(geometry, 'units')

 Example: LENGTH([Spatial], 'metres')

10. OUTLINE

 What it does: Turns a polygon into an outline (line).

 Syntax: OUTLINE(polygon)

11. SHAPETYPE

 What it does: Tells you the type of spatial object (like Point, Line, Polygon).

 Syntax: SHAPETYPE(geometry)

 Example: SHAPETYPE(MAKEPOINT(48.5, -123.1)) returns "Point"

12. SYMDIFFERENCE

 What it does: Shows the parts of two areas that don't overlap.

 Syntax: SYMDIFFERENCE(Polygon1, Polygon2)

 Example: SYMDIFFERENCE([Polygon1], [Polygon2])

13. VALIDATE

 What it does: Checks if a spatial object is valid (not broken or self-intersecting).

 Syntax: VALIDATE(geometry)

 Example: UNION(VALIDATE([Geometry]))

How to Use Spatial Calculations

1. Create a Spatial Data Source with MAKEPOINT

 Step 1: Open Tableau and connect to a spatial data source.

 Step 2: Add a second, non-spatial data source (like a spreadsheet with lat/lon).

 Step 3: Double-click a data source to open the Join dialog.

 Step 4: Drag the non-spatial data source onto the Join dialog.
 Step 5: Click the Join icon.

 Step 6: In the Join dialog:

o Choose a join type.

o For the spatial file, pick a spatial field (has a globe icon).

o For the non-spatial file, select "Create Join Calculation".

o Enter: MAKEPOINT(Latitude, Longitude)

o Click OK.

o Use the "Intersects" join operator for spatial analysis.

 Step 7: Close the Join dialog.

2. Draw Lines with MAKELINE

 Step 1: In Tableau, go to a worksheet.

 Step 2: Create a calculated field (e.g., name it "Flight Paths").

 Step 3: Enter: MAKELINE(MAKEPOINT([Lat],[Lng]),MAKEPOINT([Dest Lat],[Dest Lng]))

 Step 4: Click OK.

 Step 5: Double-click the new field to add it to your map.

3. Create Buffer Areas

 Step 1: Go to a worksheet.

 Step 2: Right-click Data pane > Create Parameter.

 Step 3: Name it "Buffer Distance", set Data Type to Integer, Allowable values to Range (e.g.,
100 to 1000, step 100).

 Step 4: Show the parameter.

 Step 5: Create a calculated field named "Buffer":

o Formula: BUFFER(MAKEPOINT([Dest Lat],[Dest Lng]),[Buffer Distance],"miles")

 Step 6: Click OK.

 Step 7: Double-click the Buffer field to add it to your map.

 Step 8: Drag Destination to the Color panel for visualization.

 Tip: Make sure Mark type is set to Map, not Circle.

Summary Table

Function What it Does Example Syntax

AREA Calculates area of a polygon AREA([Geometry], 'miles')

BUFFER Creates area around a point or line BUFFER([Point], 10, 'km')


Function What it Does Example Syntax

DIFFERENCE Area left after removing overlap DIFFERENCE([Poly1], [Poly2])

DISTANCE Measures distance between points DISTANCE([P1], [P2], 'mi')

INTERSECTION Gets overlapping area of two polygons INTERSECTION([Poly1], [Poly2])

INTERSECTS Checks if two shapes touch or overlap INTERSECTS([G1], [G2])

MAKELINE Draws a line between two points MAKELINE([P1], [P2])

MAKEPOINT Turns lat/lon into a point MAKEPOINT(48.5, -123.1)

LENGTH Measures length of a line LENGTH([Line], 'meters')

OUTLINE Turns a polygon into an outline OUTLINE([Polygon])

SHAPETYPE Tells the type of geometry SHAPETYPE([Geometry])

SYMDIFFERENCE Shows non-overlapping areas SYMDIFFERENCE([Poly1], [Poly2])

VALIDATE Checks if geometry is valid VALIDATE([Geometry])

2.2. removed from tableau

2.3. Create table calculations

2.3.1. Moving average and Window Average

What is a Moving Average?

A moving average is a calculation that takes the average of a set number of data points in a
sequence, typically time-based, and moves this window forward one step at a time. For each new
point, the oldest value drops out and the newest value is included. This smooths out short-term
fluctuations and highlights longer-term trends in the data379.

Key Points for Moving Averages:

 A moving average calculates the average of the current value and a specified number of
previous values (and optionally, future values), moving through the data one step at a
time367.

 It is most often used to smooth out noisy data, making it easier to see overall trends-
common in financial data, sales figures, or any time series.

 For example, a 3-month moving average of monthly sales will, at each month, take the
average of that month and the two months before it. The result is a new, smoothed value for
each month, except at the very start where there aren’t enough previous values.

 You can adjust the window size (how many points to include) and whether to include points
before, after, or both relative to the current value.
 The moving average does not skip any points in the data; it simply shifts the window forward
one step at a time, recalculating the average each time.

 This technique is available in tools like Tableau as a "Moving Calculation" or "Moving


Average" table calculation, where you can specify the aggregation type (average, sum, min,
max) and the window size.

Example Table:

Mont Sales 3-Month Moving Average


h

Jan 100 -

Feb 120 -

Mar 110 110

Apr 130 120

May 125 121.67

 For March: (100 + 120 + 110) / 3 = 110

 For April: (120 + 110 + 130) / 3 = 120

WINDOW_AVG in Tableau?

 WINDOW_AVG is a function that calculates the average of a number across a group of rows
in your chart or table.

 It helps you find the average value within a specific part of your data, not just one row.

How does it work?

 Imagine you have sales data for different months.

 Using WINDOW_AVG, you can find the average sales over all months or over a few months
around the current month.

 It looks at the numbers in your view and calculates the average based on the window (range)
you choose.

Simple example

If you want to find the average sales for all months shown in your chart, you write:

text

WINDOW_AVG(SUM([Sales]))

This will give you the average sales across all months visible in your chart.

Moving average example

If you want to calculate the average sales of the current month and the previous month, you write:
text

WINDOW_AVG(SUM([Sales]), -1, 0)

 -1 means "one row before" (previous month)

 0 means "current row" (current month)

Why use WINDOW_AVG?

 To compare each value to the overall average.

 To create moving averages (smooth trends).

 To highlight which values are above or below average.

Quick summary

Function What it does

AVG([Sales]) Average of sales for each row

WINDOW_AVG() Average of sales across many rows

2.3.2. Percent of total

Percent of Total is a common table calculation used in tools like Tableau to show how much each
value (for example, sales in a given month) contributes to the total within a specified group or
partition (such as a quarter or a year).

How It Works

For each mark (or cell) in your view, the Percent of Total calculation divides the value of that mark by
the total of all values in the current partition, then expresses the result as a percentage.

Percent of Total=Value of MarkTotal of Partition×100\text{Percent of Total} = \frac{\text{Value of


Mark}}{\text{Total of Partition}} \times 100Percent of Total=Total of PartitionValue of Mark×100

Example Scenarios

 Percent of Total within a Quarter:


If you have sales data by month, you can calculate what percent of quarterly sales each
month represents. For instance, if January 2011 sales are 18.73% of Q1 2011 sales, this
means January contributed 18.73% to the quarter's total sales.

 Percent of Total within a Year:


Similarly, you can see what percent of yearly sales each month represents. If January 2011 is
2.88% of 2011's total sales, January contributed 2.88% to the year's total sales.

How to Apply in Tableau

 Quick Table Calculation:


Right-click your measure (e.g., Sales), select "Quick Table Calculation," then choose "Percent
of Total."
 Adjusting the Partition:
You can control the partition (the group over which the total is calculated) by selecting
options like "Pane (down)" for quarters or "Table (down)" for years.

Visual Example

Suppose your table looks like this (simplified):

Year Quarter Month Sales Percent of Total Percent of Total (Year)


(Quarter)

2011 Q1 January $5,000 18.73% 2.88%

2011 Q1 Februar $6,000 22.47% 3.46%


y

... ... ... ... ... ...

 The Percent of Total (Quarter) column shows each month’s sales as a percent of the
quarter’s total.

 The Percent of Total (Year) column shows each month’s sales as a percent of the year’s total.

Key Points

 The calculation is always relative to the total of the current partition (e.g., quarter, year,
table, or a custom group).

 Changing the "Compute Using" option in Tableau changes the partition, allowing you to view
percentages at different levels (e.g., by quarter, by year, or for the whole table.

 The sum of all percentages within a partition will always add up to 100%.

In summary:
Percent of Total calculations provide context by showing the contribution of each part to the whole,
and can be flexibly applied to different groupings in your data visualization tool.

2.3.3. Running total

A running total calculation in Tableau allows you to aggregate values cumulatively across a partition,
such as summing sales month by month within each year, so each value builds on the previous ones.
Here’s a clear, step-by-step approach to creating and customizing a running total view, using sales
data as an example.

1. Create the Basic View

 Connect to the Sample - Superstore data source.

 Drag Order Date to the Columns shelf; by default, it appears as YEAR(Order Date).

 Drag Order Date to the Rows shelf. Right-click and choose Quarter (the first option).

 Drag Order Date again to the Rows shelf, to the right of Quarter(Order Date). Right-click and
select Month (the first option).

 Drag Sales to the Text shelf on the Marks card.


Now, you have a table showing monthly sales totals, broken out by year, quarter, and month.

2. Add a Running Total Table Calculation

 Click the SUM(Sales) pill on the Marks card and select Add Table Calculation.

 In the Table Calculation dialog, set the Calculation Type to Running Total.

 For Compute Using, choose Table (Down). This ensures the running total accumulates down
each year’s column, so each month adds to the previous months within that year.

You should now see each month’s sales value added to a cumulative total for the year. The December
value for each year matches the column grand total, confirming the calculation.

3. Customize the Running Total Calculation

 The running total doesn’t have to be a sum. In the Table Calculation dialog, you can choose:

o Sum: Adds each value to the previous.

o Average: Averages the current and all previous values.

o Minimum: Shows the lowest value so far.

o Maximum: Shows the highest value so far.

4. Restarting the Running Total

 To restart the running total at a specific dimension (e.g., each year or quarter), click
SUM(Sales) on the Marks card and choose Edit Table Calculation.

 In the dialog, select Specific Dimensions.

 When multiple dimensions are checked (e.g., Quarter and Month), the Restarting every
option appears. Select the dimension where you want the running total to reset (e.g.,
Quarter of Order Date to restart every quarter).

This is useful for hierarchical data, ensuring the running total restarts at the chosen level, such as at
the start of each year or quarter.

5. Add a Secondary Calculation (Optional)

 After adding a running total, you can layer a secondary calculation (e.g., year-over-year
percent difference).

 Click SUM(Sales) on the Marks card, select Edit Table Calculation, and then Add Secondary
Calculation.

 In the second panel, choose the calculation type (e.g., Percent Difference From), and set the
appropriate Compute Using option1.

Summary Table: Running Total Calculation Options

Option What It Does

Sum Adds each value to the cumulative total

Average Shows the average of all values up to that point


Option What It Does

Minimum Shows the lowest value so far

Maximum Shows the highest value so far

Key Points

 Running total aggregates values cumulatively, typically by sum, but can also use average,
min, or max.

 Compute Using controls the direction and scope (e.g., Table Down for columns, Table Across
for rows).

 Restarting every allows you to reset the running total at a specific dimension, such as each
year or quarter.

 Secondary calculations can be layered for advanced analytics, such as percent change over
time.

2.3.4. Difference and percent of difference

1. Difference

What is it?

 Difference shows the actual change (increase or decrease) between two values in your data.

 It tells you “how much” one value is different from another.

How is it calculated?

 Difference = Current Value – Comparison Value

 The “comparison value” can be the previous value, next value, first value, or last value in
your table, depending on what you choose.

Example:

 If sales in 2013 were $10,000 and in 2012 were $8,000:

o Difference = $10,000 – $8,000 = $2,000

 This means sales increased by $2,000 from 2012 to 2013.

How to use in Tableau (or similar tools):

 Right-click your measure (like Sales) and choose Add Table Calculation.

 Select Difference From.

 Choose what you want to compare to (Previous, Next, First, Last).

Key Points:

 Shows the actual amount of change.


 Useful to see real increases or decreases.

2. Percent of Difference (Percent Difference)

What is it?

 Percent Difference shows the change between two values as a percentage.

 It tells you “how big” the change is compared to where you started.

How is it calculated?

 Percent Difference = (Current Value – Comparison Value) / Comparison Value × 100

 Like with Difference, you can choose what to compare to (Previous, Next, First, Last).

Example:

 If sales in 2013 were $10,000 and in 2012 were $8,000:

o Percent Difference = ($10,000 – $8,000) / $8,000 × 100 = 25%

 This means sales increased by 25% from 2012 to 2013.

How to use in Tableau (or similar tools):

 Right-click your measure (like Sales) and choose Add Table Calculation.

 Select Percent Difference From.

 Choose what you want to compare to (Previous, Next, First, Last).

Key Points:

 Shows the size of the change relative to the original value.

 Useful for comparing changes across different scales or categories.

Summary Table

Feature Difference Percent Difference

Shows Actual amount of change Change as a percentage of the original value

Formula Current – Comparison (Current – Comparison) / Comparison × 100

Example $10,000 – $8,000 = $2,000 ($10,000 – $8,000) / $8,000 × 100 = 25%

Best for Seeing real increase/decrease Comparing changes across different scales
amounts

In Add Table Calculation > Difference Add Table Calculation > Percent Difference
Tableau From From

Extra Tips

 First value always has no previous value to compare to, so it’s blank.

 Don’t filter out the first row/year if you want calculations to work correctly-just hide it if
you don’t want to show it.
 You can choose what to compare to: previous, next, first, or last value in your data.

In short:

 Difference = “How much did it change?”

 Percent Difference = “How big was the change, compared to where I started?”

2.3.5. Percentile

A percentile table calculation in Tableau computes the percentile rank for each value within a defined
partition of your data. Rather than assigning a traditional rank (e.g., 1st, 2nd, 3rd), each value is
assigned a percentile (from 0% to 100%) that reflects its relative standing within the group.

How Percentile Calculation Works

 Percentile Rank: Each value in the partition is ranked, then converted to a percentage based
on its position. For example, the lowest value gets 0%, the highest gets 100%, and values in
between are distributed evenly depending on the number of items in the partition.

 Partitioning: The calculation is performed within the partition you define (e.g., all months in
a year, all sub-categories, etc.).

 Order: You can choose ascending (least to most) or descending (most to least) order, which
affects how percentiles are assigned.

Example

Suppose you have monthly sales data for one year. If you use a percentile table calculation:

 The month with the lowest sales is ranked at 0% (1 out of 12).

 The next lowest is at 9.1% (2 out of 12), and so on.

 The month with the highest sales is at 100% (12 out of 12).

When to Use Percentile Calculations

Percentile calculations are useful when you want to compare the relative standing of a value within a
group. For example:

 Comparing an employee’s performance to peers.

 Ranking a university’s score among all universities.

 Showing how a particular month’s sales compare to other months in the year.

How to Use Percentile Calculation in Tableau

1. Add Your Data to the View: For example, display sales by month and year.

2. Add a Table Calculation:

o Right-click the measure (e.g., SUM(Sales)), select "Add Table Calculation."

o Choose "Percentile" as the calculation type.

3. Set Compute Using:


o Choose how to partition the calculation (e.g., Table (down), Pane, or Specific
Dimensions)69.

o "Table (down)" computes percentiles down each column; "Pane" computes within
each group; "Specific Dimensions" allows for custom partitioning.

4. Adjust Order: Select ascending or descending, depending on whether you want to rank from
least to most or vice versa.

Key Points

 Percentile table calculations transform raw values into relative ranks as percentages.

 They are partitioned and ordered based on your chosen dimensions and settings.

 Useful for visualizing and comparing relative performance within a group.

Summary Table: Percentile Calculation vs. Rank Calculation

Feature Percentile Calculation Rank Calculation

Output Percentage (0% to 100%) Integer rank (1, 2, 3, ...)

Use Case Relative standing Absolute position

Partitionin Customizable (table, pane, dimension) Customizable


g

Order Ascending or Descending Ascending or


Descending

Percentile calculations provide a normalized way to compare values, making them ideal for
benchmarking and performance analysis.

2.3.6. Index

Returns the index of the current row in the partition, without any sorting with regard to value. The
first row index starts at 1. For example, the table below shows quarterly sales. When INDEX() is
computed within the Date partition, the index of each row is 1, 2, 3, 4..., etc.

Example

For the third row in the partition, INDEX() = 3.


Extra

FIRST( )

Returns the number of rows from the current row to the first row in the partition. For example, the
view below shows quarterly sales. When FIRST() is computed within the Date partition, the offset of
the first row from the second row is -1.

Example

When the current row index is 3, FIRST() = -2.

LAST( )

Returns the number of rows from the current row to the last row in the partition. For example, the
table below shows quarterly sales. When LAST() is computed within the Date partition, the offset of
the last row from the second row is 5.

Example

When the current row index is 3 of 7, LAST() = 4.

2.3.7. Ranking

Overview of RANK and Related Functions

RANK(expression, ['asc' | 'desc'])


 Returns the standard competition rank for each row in a partition.

 Identical values receive the same rank.

 The next rank after a tie is incremented by the number of tied values, creating gaps.

 Default order is descending.

 Nulls are ignored-they are not ranked and do not affect percentile calculations.

Example:
For the set (6, 9, 9, 14), the ranks would be (4, 2, 2, 1).

Comparison of Ranking Functions

Function Description Example Output for


(6, 9, 9, 14)

RANK Standard competition rank; ties get same rank, next 4, 2, 2, 1


rank is skipped.

RANK_DENSE Dense rank; ties get same rank, next rank is 3, 2, 2, 1


consecutive (no gaps).

RANK_MODIFIED Modified competition rank; ties get same rank, next 4, 3, 3, 1


rank is incremented by 1

RANK_PERCENTIL Percentile rank; shows relative standing as a value 0.00, 0.67, 0.67, 1.00
E between 0 and 1.

RANK_UNIQUE Unique rank; each value gets a unique rank, even if 4, 2, 3, 1


tied.

Key Points

 Partitioning:
You can use PARTITION BY to rank within groups (e.g., by department or class). Each group is
ranked independently.

 Ordering:
The ORDER BY clause determines how the values are sorted before ranking is applied.

 Handling Nulls:
Null values are ignored in all ranking functions-they are not assigned a rank and do not affect
percentile calculations.

Simple Examples

 RANK:
For values (6, 9, 9, 14):

o 14 gets rank 1

o 9 gets rank 2 (both 9s)

o 6 gets rank 4 (since ranks 3 is skipped after the tie)


 RANK_DENSE:
Same set:

o 14 gets rank 1

o 9 gets rank 2 (both 9s)

o 6 gets rank 3 (no skipped ranks)

 RANK_MODIFIED:
Same set:

o 14 gets rank 1

o 9 gets rank 3 (both 9s)

o 6 gets rank 4

 RANK_PERCENTILE:
Same set:

o 6: 0.00

o 9: 0.67 (both 9s)

o 14: 1.00

 RANK_UNIQUE:
Same set:

o 14: 1

o 9: 2, 3 (each 9 gets a unique rank)

o 6: 4

Summary

 Use RANK to assign ranks with gaps after ties.

 Use RANK_DENSE for consecutive ranking with no gaps.

 Use RANK_MODIFIED for a variation where the next rank increases by 1 after ties.

 Use RANK_PERCENTILE for relative ranking as a percentage.

 Use RANK_UNIQUE to give every value a unique rank, even if tied.

 Nulls are always ignored in these calculations.

2.3.8. Apply quick table calculations

Quick table calculations in Tableau are pre-built, commonly used calculations that you can apply
instantly to your visualizations. They are designed to save time and simplify analysis by automatically
using the most typical settings for each calculation type, so you can focus on insights instead of
manual configuration.

Available Quick Table Calculations


 Running total

 Difference

 Percent difference

 Percent of total

 Rank

 Percentile

 Moving average

 YTD (Year-to-date) total

 Compound growth rate

 Year-over-year growth

 YTD growth

How Quick Table Calculations Differ from Regular Table Calculations

 Quick table calculations: Instantly apply a common calculation with default settings. No
manual setup required.

 Regular table calculations: Require you to manually select the calculation type, aggregation,
and how the calculation is computed (addressing and partitioning.

Feature Quick Table Calculation Regular Table Calculation

Setup speed Very fast, one-click Manual, more steps

Customization Limited (defaults used) Fully customizable

Use case Standard, common calculations Complex, tailored calculations

Step-by-Step Example: Applying a Quick Table Calculation

Scenario: Show the moving average of profit by state and year using Tableau's Sample-Superstore
data.

1. Set Up the Visualization

 Open Tableau Desktop and connect to the Sample-Superstore data source.

 Drag Order Date to the Columns shelf.

 Drag State to the Rows shelf.

 Drag Sales to Text on the Marks Card.

 Drag Profit to Color on the Marks Card.

 On the Marks card, set the Mark Type to Square.

This creates a heatmap showing sales data by state and year.

2. Apply a Quick Table Calculation


 On the Marks card, right-click SUM(Profit).

 Select Quick Table Calculation > Moving Average.

You will see a delta symbol (∆) on the field, indicating that a quick table calculation is applied. The
colors now reflect the moving average of profit across years.

3. (Optional) Customize the Calculation

 Right-click SUM(Profit) again and select Edit Table Calculation.

 In the dialog, you can adjust:

o The calculation type (e.g., change from Moving Average to Running Total)

o Aggregation method

o How the calculation is computed (addressing and partitioning: e.g., across table,
down table, by specific dimensions).

As you make changes, the visualization updates automatically.

Key Points

 Quick table calculations are ideal for fast, standard analysis.

 They can be further customized if needed by editing the calculation.

 Only measures (not dimensions) can have quick table calculations applied directly.

 The way the calculation is computed (across table, down table, by pane, or by specific
dimensions) affects the result and can be adjusted for more precise analysis5.

In summary: Quick table calculations in Tableau let you quickly add common calculations to your
visualizations, saving time and simplifying your workflow. They are perfect for standard needs and
can be further customized as your analysis requires.

2.3.9 Customize table caclculations

Table calculations in Tableau are powerful tools for transforming and analyzing your data directly
within your visualizations. You can customize these calculations in several ways to fit your analytical
needs, using both the context menu and the calculation editor.

Customizing via the Context Menu

 Click any field in the view with a table calculation to open its context menu.

 From here, you can change the Compute Using option, which controls the direction and
scope of the calculation relative to your visualization. Options include computing across the
table, down the table, across then down, down then across, or by specific dimensions649.

 For certain calculations like Difference From, Percent Difference From, and Percent From, you
can also specify what the calculation is relative to (e.g., Previous, Next, First, Last) using the
Relative to list6.

Customizing via the Calculation Editor

 Drag a table calculation into the calculation editor to view and modify its underlying formula.
 In the editor, you can further customize the logic or create a new named calculated field
based on the original calculation.

 Clicking Default Table Calculation in the editor opens the Table Calculation dialog box, where
you can adjust settings and save your changes as a new field6.

Nested Table Calculations

 Nested table calculations are calculated fields that either:

o Contain more than one field with a table calculation, or

o Are themselves table calculations that include at least one other table calculation.

 With nested calculations, you can independently set the Compute Using configuration for
each calculation within the nest6.

 Example workflow:

o Create a calculated field using a table calculation function, such as


TOTAL(SUM([Sales])).

o Create another calculated field, e.g., TOTAL(SUM([Profit])).

o Combine them in a third calculation, e.g., [1-nest] + [2-nest].

o Add this combined field to your view and edit each underlying calculation’s settings
independently in the Table Calculation dialog box.

Compute Using Options Explained

Option Description

Table (across) Computes across columns for each row, restarting after each partition.

Table (down) Computes down rows for each column, restarting after each partition.

Table (across then Computes across columns, then down rows for the entire table.
down)

Table (down then Computes down rows, then across columns for the entire table.
across)

Pane (down/across) Computes within each pane (group), either down or across, based on the
selected dimensions.

Specific Dimensions Calculates based on the dimensions you select, making the calculation
dynamic.

Summary

 Use the context menu for quick adjustments to direction, scope, and relative reference.

 Use the calculation editor for deeper customization or to create new calculated fields.

 Nested calculations allow for complex, layered analytics, with independent control over each
calculation’s settings.
 The Compute Using option is central to how your table calculation partitions and processes
data, so choose it carefully for accurate results.

2.4 Create and use filters

2.4.1. Apply filters to dimensions and measures

Filtering Categorical Data (Dimensions) in Tableau

When working with dimensions-which represent discrete, categorical data such as product
categories, regions, or customer segments-Tableau offers several ways to filter your data. Here’s a
clear, step-by-step explanation of the available options and how each works:

How to Apply a Dimension Filter:

 Drag a dimension field from the Data pane to the Filters shelf. This opens the Filter dialog
box, which contains four main tabs, each offering a different way to filter your data.

Tabs in the Dimension Filter Dialog

General Tab

 Select specific values to include or exclude in your view.

 You can check or uncheck values from a list, or enter a custom value list.

 This is the most straightforward way to filter by category, such as showing only certain
regions or product types.

Wildcard Tab

 Filter based on a pattern or partial match.

 Useful for text fields. For example, to show only products containing "Office" in their name
or emails ending with "@gmail.com".

 Options include "Contains", "Starts with", "Ends with", or "Exactly matches".

Condition Tab

 Set rules to filter data based on aggregated values or custom formulas.

 Example: Show only products where average unit price is greater than or equal to $25, or
sub-categories where profit is less than zero.

 You can use built-in controls or write custom formulas for more advanced filtering.

Top Tab

 Display only the top or bottom N items based on a measure.

 Example: Show the top 10 states by sales, or the bottom 5 products by profit.

 You define the number (N) and the measure (e.g., Sales, Profit) to rank by.

Important Note:
Selections from multiple tabs can be combined. For example, you can exclude certain values using
the General tab and then apply a Top N filter in the Top tab. All definitions are summarized on the
General tab.

Additional Options and Features

 Context Filters:
You can set one or more categorical filters as context filters. These are processed first and
can affect how other filters behave, especially when combining dimension and measure
filters.

 Filter Card Modes:


Choose how filters appear and interact in your worksheet (e.g., single value list, multiple
values dropdown, etc.).

 Apply to Multiple Worksheets:


Right-click a filter on the Filters shelf to apply it to multiple worksheets at once.

Example Scenarios

 Filter by Region:
Drag "Region" to the Filters shelf, use the General tab to select "Central" only, and click
Apply.

 Filter Products Containing "Office":


Drag "Product Name" to the Filters shelf, use the Wildcard tab, select "Contains" and type
"Office".

 Filter Sub-categories with Negative Profit:


Drag "Sub-category" to the Filters shelf, use the Condition tab, select "Profit" < 0.

 Show Top 10 States by Sales:


Drag "State" to the Filters shelf, use the Top tab, select Top 10 by Sales9.

Summary Table: Dimension Filter Tabs

Tab Purpose Example Use Case

General Include/exclude specific values Show only "Central" region

Wildcard Filter by pattern match Show products containing "Office"

Conditio Filter by aggregated value or custom formula Show products with avg. price ≥ $25
n

Top Show top/bottom N by measure Show top 10 states by sales

All these options make it easy to control which categories appear in your Tableau visualizations,
supporting both simple and advanced filtering needs.

Filtering Quantitative Data (Measures) in Tableau

Measures represent quantitative data such as sales, profit, or quantity. Filtering measures usually
involves selecting a range or condition based on numeric values.

How to Apply a Measure Filter:


 Drag a measure field from the Data pane to the Filters shelf.

 A Filter Field dialog box appears, prompting you to select how to aggregate the measure
(e.g., Sum, Average, Minimum, Maximum).

 After choosing the aggregation, click Next to open the filtering options.

Types of Quantitative Filters Available:

1. Range of Values

o Specify a minimum and maximum value to include in the view.

o All values within this range (including the boundaries) are included.

o Example: Show sales between $10,000 and $50,000.

2. At Least

o Include all values greater than or equal to a specified minimum.

o Useful when the upper limit is unknown or variable.

o Example: Show all products with sales of at least $25,000.

3. At Most

o Include all values less than or equal to a specified maximum.

o Useful when the lower limit is unknown or variable.

o Example: Show all orders with shipping time at most 5 days.

4. Special

o Filter based on Null values.

o Options: Include only Null values, only Non-null values, or All values.

o Useful to handle missing or incomplete data.

Important Performance Note:

 Filtering on measures in large data sources can slow down performance significantly.

 A more efficient approach can be to create a set based on the measure and then filter on
that set.

 Sets pre-aggregate or pre-select data, reducing the filtering workload during visualization.

Summary Table: Measure Filter Types

Filter Type Description Example Use Case

Range of Select a minimum and maximum Sales between $10,000 and $50,000
Values range

At Least Include all values ≥ minimum Products with sales at least $25,000

At Most Include all values ≤ maximum Orders with shipping time at most 5
days

Special Filter on Null or Non-null values Show only records with missing sales
data

2.4.2. Configure filter settings including Top N, Bottom N, include, exclude, wildcard, and
conditional

Filter Type Purpose Configuration Steps Example

Top N / Show highest or 1. Select the field to filter Show top 5 products by
Bottom N lowest N records 2. Choose Top/Bottom N sales
option
3. Set N and metric

Include / Explicitly include or 1. Open filter dialog Include only


Exclude exclude values 2. Select values to include or "Electronics" category
exclude

Wildcard Filter based on 1. Select Wildcard filter Filter regions containing


pattern matching option "st" (East, West)
2. Choose pattern type
(contains, starts with, etc.)
3. Enter matching string

Conditional Filter by numeric or 1. Open Condition tab Show sales greater than
logical conditions 2. Set condition operator (>, 10,000
<, =, between, etc.)
3. Enter value(s)

2.4.3. Add filters to context

What Are Context Filters in Tableau?

Context filters in Tableau are special filters that determine the order in which filters are applied to
your data. By default, all filters in Tableau operate independently, each accessing all rows in your data
source. When you set a filter as a context filter, it becomes the first filter Tableau applies, and any
other filters become dependent filters, processing only the data that passes through the context
filter156.

Why Use Context Filters?

You might use context filters to:

 Force a filter to be carried out first: Ensures that a specific filter is always applied before
others.

 Create dependent numerical or Top N filters: For example, you can filter to a specific
category (like "Furniture") first, and then apply a Top 10 filter to find the top 10 products
within that category.
 Improve performance: On large data sources, context filters can reduce the amount of data
processed by subsequent filters, making dashboards faster15610.

How to Create a Context Filter

Follow these steps to create a context filter in Tableau:

1. Add a Categorical Filter: Drag a dimension (like "Category") to the Filters shelf and select the
values you want to include.

2. Set as Context: Right-click the filter on the Filters shelf and select Add to Context. The filter
turns gray, indicating it is now a context filter156.

3. Add Dependent Filters: Add other filters (like a Top N filter) to process only the data that
passes through the context filter.

Example: Top 10 Furniture Products

Suppose you want to see the top 10 furniture products by sales:

1. Create a View: Use the Sample - Superstore data. Drag "Sub-Category" to Rows and "Sales"
to Columns to create a bar chart.

2. Apply a Top N Filter: Drag "Sub-Category" to Filters, go to the Top tab, and set it to show the
Top 10 by Sum of Sales.

3. Add a Category Filter: Drag "Category" to Filters and select "Furniture."

4. Set Category as Context: Right-click the "Category" filter and choose Add to Context. Now,
the Top 10 filter will only consider furniture products, not all products15.

If there are only four sub-categories in "Furniture," the chart will show those four-because the Top 10
filter is now limited to the context of "Furniture."

Key Points About Context Filters

 Order of Operations: Context filters are applied before other filters, affecting how data is
processed and displayed11011.

 Appearance: Context filters appear at the top of the Filters shelf and are shown in gray. They
cannot be rearranged1.

 Modification: You can remove a context filter, edit it (which recalculates the context), or
select Remove from Context to turn it back into a regular filter1.

 Performance Tips:

o Use a single context filter that significantly reduces data size rather than many
context filters.

o Complete data modeling before creating a context filter, as changes will require
recomputation.

o Set up context filters before adding other fields to shelves for better query
performance.

Summary Table: Context Filters vs. Regular Filters


Feature Context Filter Regular Filter

Order of Application First After context filters

Affects Other Filters Yes (makes them dependent) No (all are independent)

Appearance on Gray, top position Blue, can be rearranged


Shelf

Performance Impact Can improve speed May slow down with large data

In Simple Terms

 Context filters let you control which filters are applied first, making other filters dependent
on them.

 They are useful for focusing analyses (like Top N within a category) and improving
performance on large datasets.

 To create one, right-click a filter and select Add to Context. All other filters then work only on
the data that passes through this context filter.

This approach ensures your Tableau dashboards are both accurate and efficient.

2.4.4. Apply filters to multiple sheets and data sources

How to Apply Filters to Multiple Worksheets in Tableau

By default, when you add a filter to a worksheet in Tableau, it only affects that worksheet. However,
you can easily apply the same filter to multiple worksheets for consistency and efficiency. Here’s how
you can do it, simply explained:

1. Apply a Filter to All Worksheets Using the Same Data Source

 Right-click the filter field on the Filters shelf.

 Select Apply to Worksheets > All Using This Data Source.

 This makes the filter global to all worksheets that use the same primary data source. Any
changes to the filter will update all these worksheets automatically15.

2. Apply a Filter to All Worksheets Using Related Data Sources

 Right-click the filter field on the Filters shelf.

 Select Apply to Worksheets > All Using Related Data Sources.

 This option works if your data sources are related (relationships set up in Tableau Desktop).
The filter will apply to all worksheets using those related sources1.

3. Apply a Filter to Selected Worksheets

 Right-click the filter field on the Filters shelf.

 Select Apply to Worksheets > Selected Worksheets.

 In the dialog box, choose the worksheets you want the filter to affect.

 Click OK. Now, changes to the filter will update only the selected worksheets157.
4. Apply a Filter to the Current Worksheet Only

 This is the default. Right-click the filter field and select Apply to Worksheets > Only This
Worksheet1.

 The filter will only affect the worksheet where it was created.

5. Apply a Filter to All Worksheets in a Dashboard

 In a dashboard, click the drop-down menu on a filter card.

 Select Apply to Worksheets > Selected worksheets.

 In the dialog, click All on dashboard, then OK. The filter will now control all worksheets on
that dashboard that use the same or related data sources12.

Why Use Filters Across Multiple Worksheets?

 Consistency: Ensures all related worksheets show the same filtered data.

 Efficiency: Saves time compared to adding the same filter to each worksheet individually.

 Interactivity: Makes dashboards more interactive and user-friendly, as changes to the filter
are reflected across all relevant views57.

Quick Reference Table

Option What It Does

All Using This Data Source Applies filter to all worksheets with the same primary data source

All Using Related Data Applies filter to all worksheets with related data sources
Sources

Selected Worksheets Lets you pick specific worksheets for the filter

Only This Worksheet Filter applies only to the current worksheet

All on Dashboard Filter applies to all worksheets in the dashboard with the
same/related data

Tip: Filters applied to multiple worksheets are marked with icons in Tableau, so you can easily
identify their scope.

You can always change or remove these settings later by right-clicking the filter and adjusting the
"Apply to Worksheets" option. This flexibility helps keep your Tableau dashboards interactive and
consistent.

2.5. Create parameters to enable interactivity

2.5.1. In calculations

1. Parameter in Tableau?

A parameter is a dynamic input control you create. It lets users change a value (like a number, date,
or text) and see how the dashboard or worksheet updates in response.

2. How to Create a Parameter


Step-by-Step

1. Open the Data Pane

o Find the Data pane on the left side of Tableau.

2. Create Parameter

o Click the dropdown arrow (top-right of the Data pane).

o Select Create Parameter.

3. Set Parameter Properties

o Name: Give your parameter a clear name (e.g., "Top N", "Select Category").

o Data Type: Choose what type of value it will accept:

 Integer (whole numbers)

 Float (decimal numbers)

 String (text)

 Date or DateTime

o Current Value (Optional): Set the default value the parameter will have when you
open the workbook.

o Display Format (Optional): Choose how numbers or dates are shown (e.g., currency,
percent).

4. Allowable Values

o Decide how users can pick values:

 All: Any value can be typed in (free text or number).

 List: Users pick from a list you create.

 Type values in the left column, or click “Add values from” to pull
from a field or paste values.

 Range: Users pick a value within a range (for numbers and dates only).

 Set minimum, maximum, and step size (e.g., min=1, max=10,


step=1).

5. Dynamic List or Range (Optional):

o For List or Range, you can choose to refresh values each time the workbook opens.
This keeps the list up-to-date with your data.

6. Finish

o Click OK.

o Your parameter now appears in the Parameters section at the bottom of the Data
pane.
3. Edit or Delete a Parameter

 Edit:

o Right-click the parameter in the Data pane, select Edit.

o Or, click the dropdown on the parameter control card and select Edit Parameter.

o Change any property, click OK to save.

 Delete:

o Right-click the parameter and select Delete.

o Warning: If any calculation or filter uses this parameter, those will break.

4. Use a Parameter

A parameter does nothing until you connect it to something in your viz.

Where you can use parameters:

 In Calculations:

o Example: Create a calculated field using the parameter (e.g., IF [Sales] > [My
Parameter] THEN "High" ELSE "Low" END).

o Type the parameter name in the calculation editor or drag it in from the Data pane.

 In Filters:

o Example: Use a parameter to control a Top N filter (e.g., show Top [N] products,
where N is your parameter).

o In the Filter dialog, choose to use a parameter for the value.

 In Reference Lines:

o Example: Add a reference line to a chart at the value of your parameter.

o In the Add Reference Line dialog, select your parameter as the value.

5. Show Parameter Control

 Why?

o So users (or you) can change the parameter value and see the effect.

 How?

o Right-click the parameter in the Data pane, select Show Parameter.

o A control appears on your worksheet/dashboard (like a slider, dropdown, or input


box).

o Use the dropdown arrow on the control to change its display (slider, radio buttons,
dropdown, etc. – options depend on parameter type).

6. Make Parameters Dynamic


Parameter Actions

 What: Let users change parameter values by interacting with the viz (e.g., clicking a bar
updates the parameter).

 How: Go to Dashboard > Actions > Add Action > Change Parameter.

Dynamic Current Value

 What: The parameter’s value can update automatically based on a calculation or field.

 How:

o Use a FIXED Level of Detail (LOD) expression to return a single, view-independent


value.

o Example: Set the default value to the latest date in your dataset.

 Note:

o The calculation must return a single value.

o Don’t use for data extract filters if possible (performance impact).

7. Troubleshooting Parameters

If the parameter’s value/list doesn’t update:

 The field for the default value must return a single value and match the parameter’s data
type.

 The data source must be connected.

 The field can’t return NULL.

 If the list is empty, Tableau assigns a fallback value (e.g., 1 for integer, "" for string).

To refresh:

 Press F5 or right-click the data source and select Refresh.

8. Key Points to Remember

 Parameters are global: Once created, use them in any worksheet in your workbook.

 They do nothing until referenced in a calculation, filter, or reference line.

 Always show the parameter control if you want users to interact.

 Edit or delete parameters carefully to avoid breaking your calculations and filters.

2.5.2. With filters

Sure! Here’s a simple explanation:

How to Use a Parameter in a Filter (Easy Steps)

1. Create a parameter

o This is a number you can change anytime (like "Top N").


o For example, choose numbers from 1 to 10.

2. Use the parameter in your filter

o When you set a filter to show the "Top N" items, pick the parameter instead of
typing a fixed number.

3. Let users change the parameter

o Show a control (like a slider or box) so users can pick how many items to see.

Example:

 You want to show the top products by sales.

 Create a "Top N" parameter (1 to 10).

 Use this parameter in the filter to show the top products.

 Users can change "N" to see more or fewer products.

Why use a parameter?


It makes your report flexible and easy to update without changing the filter every time.

2.5.3. With reference lines

Sure! Here’s a simple and easy-to-understand summary of the information from your file about
Reference Lines, Bands, Distributions, and Boxes in Tableau:

What Are Reference Lines, Bands, Distributions, and Boxes?

These are tools in Tableau that help you highlight important values or ranges on your charts. They
make it easier to compare your data to things like averages, targets, or ranges.

Types

1. Reference Lines

o A straight line at a specific value (like average or maximum) on your chart.

o Useful for showing things like the average sales.

2. Reference Bands

o Shaded areas between two values (like between minimum and maximum).

o Helps you see ranges in your data.

3. Reference Distributions

o Shaded gradients or bands that show how your data is spread out.

o Can be based on things like percentiles or standard deviations.

4. Box Plots

o Special charts that show the spread and center of your data.
o Includes quartiles and “whiskers” to show variation.

How to Add Them in Tableau

Adding a Reference Line

1. Go to the Analytics pane.

2. Drag Reference Line onto your chart.

3. Choose where you want it (whole table, a section, or a single cell).

4. Set what value it should show (average, sum, min, max, etc.).

5. Choose how you want it labeled and formatted.

Adding a Reference Band

1. Go to the Analytics pane.

2. Drag Reference Band onto your chart.

3. Choose the range (between which values).

4. Set the values (like min to max, or average to max).

5. Choose labeling and formatting.

Adding a Reference Distribution

1. Go to the Analytics pane.

2. Drag Distribution Band onto your chart.

3. Choose how to split the data (percentages, percentiles, quantiles, or standard deviation).

4. Set the values or ranges.

5. Choose labeling and formatting.

Why Use These?

 Quickly spot trends (like which products are above or below average).

 Highlight important targets (like sales goals).

 Show ranges (like typical or expected values).

 Visualize data spread (see if your data is clustered or spread out).

In short:
Reference lines, bands, distributions, and boxes help you make your Tableau charts more informative
and easier to understand by highlighting key values and ranges.

2.5.4. Set parameters to dynamically refresh

Sure! Here's a simple and clear explanation of how to make a dynamic parameter in Tableau without
skipping any important points:
How to Make a Dynamic Parameter in Tableau (Simple Guide)

What is a Dynamic Parameter?

A dynamic parameter is a parameter that updates automatically based on your data. For example, it
can always show the latest date or a list of values that change as your data changes.

Steps to Create a Dynamic Parameter

1. Create a Parameter

o In Tableau, go to the Data pane.

o Click the dropdown arrow and choose Create Parameter.

o Give your parameter a name (like "Select Date" or "Choose Category").

o Choose the data type (Number, Date, String, etc.).

o For Allowable values, you can choose:

 All (any value)

 List (a list of specific values)

 Range (a minimum and maximum range)

2. Make the Parameter Dynamic

o Dynamic Current Value: You can set the parameter’s default value to a calculation
that changes with your data.

 The calculation must return only one value and must not depend on the
current view.

 Use a FIXED Level of Detail (LOD) expression like this to get the latest date:

text

{ FIXED : MAX([Order Date]) }

 This means the parameter will always start with the latest date when you
open or refresh the workbook.

 Important: If you use context filters, the dynamic parameter will NOT update
based on those filters.

o Dynamic List of Values: You can set the list of allowed values to come from a field in
your data.

 This list will update automatically when the data changes or when you
refresh the data source.

3. Use Parameter Actions for Interactivity

o Parameter actions let people change the parameter by clicking or selecting


something in the viz.

o To add a parameter action:


 Go to Worksheet > Actions > Add Action > Change Parameter.

 Set it so when someone clicks a mark, it changes the parameter value.

o This makes your dashboard interactive and user-friendly.

Important Notes

 The calculation for the default value must be a single value and view-independent (does not
change when you change the viz).

 Avoid using dynamic parameters as filters on data extracts because Tableau has to process all
data first, which slows down performance.

 Dynamic parameters update only when you open the workbook or refresh the data source,
not in real-time.

Summary

What to Do How to Do It Why It’s Useful

Create Parameter Data pane > Create Parameter To have a control that users can
interact with

Set Dynamic Current Use FIXED LOD expression like { FIXED : Automatically sets default to
Value MAX([Date]) } latest value

Populate List Use field values for parameter list Keeps list up-to-date with data
Dynamically changes

Add Parameter Worksheet > Actions > Add Action > Let users change parameter by
Actions Change Parameter clicking on viz

Avoid as Extract Don’t use dynamic parameter as Prevents slow performance


Filter extract filter

2.6. Structure the data

2.6.1. Sets

Here’s a simple, clear, and complete summary of how to create and use Sets in Tableau, based on
your file. No points are skipped.

What are Sets in Tableau?

 Sets are custom fields that define a subset of your data based on certain conditions.

 Sets help you compare and analyze specific groups within your data.

Types of Sets

1. Dynamic Sets

o Membership changes when the data changes.

o Based on a single dimension.


2. Fixed Sets

o Membership does NOT change, even if the data changes.

o Can be based on one or more dimensions.

How to Create a Dynamic Set

1. In the Data pane, right-click a dimension and select Create > Set.

2. In the Create Set dialog box, configure your set using:

o General tab: Select specific values or use all values.

o Condition tab: Set rules (e.g., sales > $100,000).

o Top tab: Limit to top N items (e.g., top 5 products by sales).

3. Click OK.

4. The new set appears under the Sets section in the Data pane.

How to Create a Fixed Set

1. In the visualization, select one or more marks (data points or headers).

2. Right-click the selection and choose Create Set.

3. Name the set in the dialog box.

4. Optionally:

o Exclude selected members instead of including them.

o Remove unwanted dimensions or rows.

o Set a character to separate dimensions if combining multiple.

o Choose Add to Filters shelf if you want to filter the view immediately.

5. Click OK.

6. The set appears under the Sets section in the Data pane.

Add or Remove Data Points from Sets

1. Select data points in your visualization.

2. In the tooltip, click the Sets drop-down.

3. Choose Add to [set name] or Remove from [set name].

Using Sets in Visualizations

 Drag the set from the Data pane into your worksheet.

 You can display:

o In/Out Mode: Shows which members are in or out of the set.

o Members List: Only shows members inside the set (acts like a filter).
Show In/Out Members

 Right-click the set in the worksheet.

 Select Show In/Out of Set.

 "IN/OUT [set name]" appears on the shelf.

Show Members in Set

 Right-click the set in the worksheet.

 Select Show Members in Set.

 This filters the view to only show set members.

Let Users Change Set Values

Add a Set Action

 Set actions let users update set values by interacting with the visualization.

 For example, clicking marks can add/remove them from the set.

Show a Set Control

 Right-click the set in the Data pane, select Show Set.

 This adds a filter-like control to your worksheet/dashboard.

 Only available for dynamic sets.

Combine Sets

1. In the Data pane, under Sets, select two sets based on the same dimension(s).

2. Right-click and choose Create Combined Set.

3. In the dialog:

o Name the new set.

o Choose how to combine:

 All Members in Both Sets

 Shared Members in Both Sets

 Except Shared Members (subtract one set from the other)

o Set a separator if using multiple dimensions.

4. Click OK.

Notes

 Some features (like In/Out mode and combining sets) may not be available in older
workbooks or with certain data sources.

 Set controls are only for dynamic sets, not fixed sets.
Summary:
Sets in Tableau help you focus on and analyze specific groups of data. You can create dynamic or
fixed sets, use them in your visualizations, let users interact with them, and even combine sets for
deeper analysis. All these features make your Tableau dashboards more interactive and insightful!

2.6.2. Bins

Creating Bins from a Continuous Measure in Tableau

Bins in Tableau help you group continuous numeric data into equal-sized intervals, making it easier to
analyze distributions and spot patterns. Here’s a simple, step-by-step guide to creating bins from a
continuous measure, applicable to Tableau Desktop, Tableau Cloud, and Tableau Server.

What Are Bins?

 Bins are equal-sized containers that group data values within a specified range.

 They transform a continuous measure (like Sales or Age) into discrete intervals (e.g., 0–10,
10–20, etc.), making it easier to summarize and visualize data5712.

Step-by-Step: Creating a Binned Dimension

1. Choose the Measure to Bin

 In the Data pane, locate the continuous measure you want to bin (e.g., Sales, Profit, Age)512.

2. Create the Bin

 Right-click (or control-click on Mac) the measure.

 Select Create > Bins from the menu5712.

3. Name the Bin Field

 In the dialog box that appears, accept the suggested name or enter a custom name for your
new bin field512.

4. Set the Bin Size

 Enter a value for the Size of bins (the interval for each bin), or let Tableau suggest a size by
clicking Suggest Bin Size.

o Tableau uses the formula:

Number of Bins=3+log⁡2(n)×log⁡(n)\text{Number of Bins} = 3 + \log_2(n) \times \


log(n)Number of Bins=3+log2(n)×log(n)

where nnn is the number of distinct rows. The bin size is calculated by dividing the range (Max - Min)
by the number of bins56.

 The dialog box also shows:

o Min: Minimum value of the field

o Max: Maximum value of the field

o Diff: Difference between Max and Min


o CntD: Number of distinct values5

5. Finish and Use the Bin

 Click OK. The new bin field appears in the Data pane as a dimension512.

 Drag this binned dimension into your worksheet to use it in your visualizations. Each bin acts
as a container for values within its range, and the bin label shows the lower limit (inclusive)5.

Creating a Histogram from a Binned Dimension

Histograms are a common use case for bins, showing the distribution of values across intervals.

To create a histogram:

 Right-click the binned dimension and choose Convert to Continuous (if you want a
continuous axis)5.

 Drag the binned dimension to the Columns shelf.

 Drag the original measure (e.g., Sales) to the Rows shelf.

 Change the aggregation on Rows from SUM to COUNT (right-click the field and select
Measure > Count)3.

This will display a histogram, with each bar showing how many records fall into each bin.

Important Notes

 Bins can only be created from relational data sources (not cubes)5.

 Binned fields cannot be directly used in calculations. However, you can mimic binning with
calculated fields using formulas like:

FLOOR([Sales]/1000)×1000\text{FLOOR}([Sales]/1000) \times 1000FLOOR([Sales]/1000)×1000

This creates bins of size 1000 and can be used in calculations5.

 Once created, a binned dimension can be switched between discrete and continuous,
depending on your visualization needs5.

Summary Table: Key Steps

Step Action

1. Select Right-click measure in Data pane


Measure

2. Create Bin Choose Create > Bins

3. Name Bin Accept or enter a field name

4. Set Bin Size Enter value or click Suggest Bin Size

5. Use Bin Drag bin to worksheet, use in visualizations (e.g., histograms)

By following these steps, you can easily convert any continuous measure into bins in Tableau,
allowing for deeper data analysis and clearer visualizations.
2.6.3. Hierarchies

Creating Hierarchies in Tableau (Cloud, Desktop, Server)

Tableau allows you to organize related fields into hierarchies, making it easy to drill down or roll up
data in your visualizations. This is particularly helpful for geographic, product, or organizational data
structures.

How to Create a Hierarchy

 In the Data pane, drag a field and drop it directly on top of another field you want grouped
together. For example, drag "State" onto "Region" to start a geographic hierarchy216.

 If the field is inside a folder, right-click (or control-click on Mac) the field and select Create
Hierarchy2.

 When prompted, enter a name for the hierarchy and click OK256.

 Add more fields by dragging them into the hierarchy, and reorder fields as needed by
dragging them to new positions2156.

Example:
To create a hierarchy of Region > State > County:

 Drag "State" onto "Region" to create the hierarchy.

 Name it (e.g., "Geography").

 Drag "County" into the new hierarchy under "State"216.

Drilling Up and Down in a Hierarchy

 Add the top-level field from your hierarchy to the visualization.

 Click the + icon next to the field label to drill down to the next level (e.g., from Region to
State)2158.

 Click the – icon to drill back up to a higher level2158.

Removing a Hierarchy

 In the Data pane, right-click (control-click on Mac) the hierarchy and select Remove
Hierarchy.

 The fields return to their original positions, and the hierarchy disappears from the Data
pane2.

Summary Table: Key Actions for Tableau Hierarchies

Action How-To

Create Hierarchy Drag a field onto another in the Data pane, name the hierarchy, add/reorder
fields

Drill Up/Down Use the + or – icons next to the field label in the viz
Remove Right-click the hierarchy in the Data pane, select Remove Hierarchy
Hierarchy

Hierarchies in Tableau make it simple to explore data at multiple levels of detail, improving both
analysis and presentation.

2.6.4. Groups

Grouping Data in Tableau: Simple Steps

Grouping in Tableau lets you combine related items in your data to simplify analysis, fix data
inconsistencies, or answer "what if" questions. For example, you can group similar majors into
categories like "Liberal Arts Majors" or combine different spellings of a state into one group157.

How to Create a Group

You have two main ways to create a group in Tableau:

1. Group by Selecting Data in the View

 Select one or more data points directly in your chart or visualization.

 In the tooltip that appears, click the group icon (looks like a paperclip or chain link).

 Alternatively, use the group icon in the toolbar at the top.

 If your view has multiple detail levels, choose which level to group.

 The selected items are grouped together, and a new grouped field appears14.

2. Group from the Data Pane

 In the Data pane (left side), right-click a field (like "Category" or "State").

 Choose Create > Group.

 In the Create Group dialog box, select the members you want to group and click Group.

 Tableau creates a new group with a default name (you can rename it).

 You can use the Find option to search for specific members (Desktop only)157.

Including an "Other" Group

 Tableau can automatically group all leftover (non-grouped) members into a group called
"Other".

 This is useful for highlighting specific groups and comparing them to everything else.

 To include "Other":

o Right-click the group field in the Data pane and select Edit Group.

o In the dialog box, check Include 'Other'14.

Editing Groups

You can change groups after creating them:


 Add Members: Right-click the group field, choose Edit Group, then drag new members into
an existing group.

 Remove Members: In the Edit Group dialog, select members and click Ungroup. They move
to "Other" if it exists.

 Create New Groups: Select members in the Edit Group dialog and click Group.

 Rename Groups: Select a group in the Edit Group dialog and click Rename.

Summary Table: Grouping Actions

Action How to Do It

Create group in view Select data points, click group icon

Create group in Data Right-click field, Create > Group, select members, click Group
pane

Edit group Right-click group field, Edit Group, add/remove/rename as needed

Include "Other" group Edit Group dialog, check "Include 'Other'"

Grouping makes your Tableau dashboards cleaner and your analysis more focused, especially when
dealing with many categories or inconsistent data.

2.7. Map data geographically

2.7.1. Create symbol maps

How to Create Maps That Show Quantitative Values in Tableau (Proportional Symbol Maps)

Proportional symbol maps in Tableau Desktop are an effective way to visualize quantitative values at
specific geographic locations. Each symbol’s size (and optionally, color) represents the value of a
measure at that location, making it easy to compare data across a map.

Step-by-Step Guide to Creating a Proportional Symbol Map in Tableau

1. Prepare Your Data Source

Your data should include:

 At least one quantitative value (e.g., sales, magnitude, population)

 Geographic information: latitude and longitude coordinates or recognizable location names

 A wide range of values for the quantitative field is recommended, so symbol sizes are visually
distinct1.

Example Data Columns:

 Earthquake ID

 Date and Time

 Magnitude

 Magnitude to the power of ten (for greater


 Latitude

 Longitude1

2. Build the Map View

 Open a new worksheet in Tableau Desktop.

 In the Data pane, double-click Latitude and Longitude.

o Tableau adds Latitude to the Rows shelf and Longitude to the Columns shelf, creating
a basic map with one data point1.

 Drag a unique identifier (e.g., ID) to Detail on the Marks card.

o This adds detail, showing each individual location on the map1.

3. Encode Quantitative Values with Symbol Size

 Drag your quantitative measure (e.g., Magnitude^10) to Size on the Marks card.

o Using a field with a wide value range (like Magnitude^10 instead of Magnitude)
ensures size differences are visually clear1.

 The map now displays proportional symbols: larger symbols for higher values, smaller for
lower1.

4. (Optional) Add Color for a Second Quantitative Value

 Drag a measure (e.g., Magnitude) to Color on the Marks card.

 Click Color > Edit Colors to customize:

o Select a color palette (e.g., Orange-Blue Diverging).

o Use Stepped Color and set the number of steps (e.g., 8).

o Optionally, reverse the palette so higher values are a specific color (e.g., orange for
high, blue for low).

o Adjust the center point (e.g., set center at 7 for earthquake magnitude)1.

5. Refine the Map Appearance

 Set Opacity to 70% so overlapping symbols are visible.

 Add a border color (e.g., dark blue) for better symbol distinction1.

 Right-click the ID field on the Marks card and select Sort:

o Sort by your quantitative field (e.g., Magnitude), in descending order, so larger


symbols appear on top.

6. Interpret and Present Your Map

 Your proportional symbol map is now complete. Larger and/or darker symbols represent
higher values.
 Always clarify what the symbol size means. For example, if symbol size represents crater
diameter, clarify that it does not represent the area covered on the ground, to avoid
misinterpretation.

Key Tips for Effective Proportional Symbol Maps

 Use area, not diameter, to represent values-this ensures accurate perception of differences.

 Avoid overcrowding-too many overlapping symbols can obscure data; consider filtering or
aggregating as needed.

 Provide a legend and clear explanations-make sure your audience understands what the
sizes and colors mean.

 Don’t mix too many variables-stick to one or two measures per map to keep it readable.

Summary Table: Proportional Symbol Map Workflow in Tableau

STEP ACTION

DATA PREPARATION Ensure data has quantitative values and geographic info

CREATE MAP Double-click Latitude & Longitude in Tableau

ADD DETAIL Drag unique ID to Detail on Marks card

ENCODE SIZE Drag quantitative measure (e.g., Magnitude^10) to Size on Marks card

ENCODE COLOR (Optional) Drag the second measure (e.g., Magnitude) to Color on Marks
card

REFINE Adjust color palette, opacity, and borders


APPEARANCE

SORT SYMBOLS Sort by measure so larger values are on top

CLARIFY MEANING Add legend/explanation to avoid misinterpretation

Proportional symbol maps are a powerful way to visualize and compare quantitative data across
locations in Tableau Desktop. By following these steps and best practices, you can create clear,
effective maps that help your audience quickly understand the data story.

2.7.2. Create heat maps

How to Create Heatmaps (Density Maps) in Tableau

Heatmaps, or density maps, in Tableau are powerful for visualizing trends and concentrations in
dense datasets, especially those with overlapping data points such as geographic locations or high-
frequency events. Here’s a clear, step-by-step guide to creating and customizing density maps in
Tableau:

1. Prepare Your Data Source

 Your data should include point geometry, latitude and


longitude coordinates, or recognized location names.
 Density maps are most effective with precise location data (e.g., exact coordinates) rather
than broad categories like city or neighborhood45.

2. Build the Basic Map View

 Open a new worksheet and connect to your data source.

 Assign geographic roles:

o Ensure your latitude and longitude fields are correctly set as Latitude and Longitude
geographic roles4.

 Drag Latitude and Longitude:

o Drag your latitude field to the Rows shelf.

o Drag your longitude field to the Columns shelf.

o Tableau will generate a map with points for each data record46.

3. Add Detail to the Map

 Increase granularity:

o Drag a unique identifier (like ID or event number) to the Detail shelf on the Marks
card. This ensures each data point is represented individually, which is crucial for
accurate density calculations4.

o If prompted about exceeding the recommended number of marks, choose to add all
members.

4. Convert to a Density Map

 Change the mark type:

o On the Marks card, use the drop-down menu (next to “Automatic”) and select
“Density.” Tableau will now compute and display a density surface, color-coding
areas by the concentration of overlapping marks3456.

5. Customize the Appearance

 Adjust Color:

o Click “Color” on the Marks card to select from density-specific color palettes or any
available color scheme. Density palettes are optimized for both light and dark
backgrounds41.

o If your data includes negative values, use a diverging palette for clarity.

 Adjust Intensity:

o Use the Intensity slider (found in the Color options) to control the vividness of the
density effect. Higher intensity makes more “hot spots” visible, while lower intensity
highlights only the most concentrated areas412.

 Adjust Size:
o Click “Size” on the Marks card to change the radius of the density marks. Increasing
size makes the density effect more pronounced; decreasing size makes it more
granular412.

6. Explore and Interact

 Zoom and Pan:

o As you zoom or filter, Tableau recalculates the density surface for the visible area,
allowing you to explore trends at different scales4.

 Tooltips and Selection:

o Hover over areas to see details, or select specific regions to analyze underlying data
points4.

Summary Table: Key Steps to Create a Density Map in Tableau

Step Action

Data Use data with latitude/longitude or recognized locations


Preparation

Build Map Place Longitude (Columns) and Latitude (Rows)

Add Detail Drag a unique identifier to the Detail shelf

Set Mark Type Change mark type to “Density” on the Marks card

Customize Adjust color, intensity, and size using the Marks card options

Explore Zoom, pan, and use tooltips to analyze density trends

Tips:

 Density maps are best for large datasets with overlapping points.

 Use precise location data for the most meaningful results.

 Adjust color and intensity to highlight the trends or concentrations you want to analyze.

This workflow will help you create clear, insightful heatmaps in Tableau to reveal hidden patterns and
data concentrations.

2.7.3. Create density maps – note that “heat maps” and “density maps” are interchangeable terms

Heat maps and density maps in Tableau are essentially the same thing-they both use color to show
where data points are more concentrated or less concentrated12358. The terms are often used
interchangeably in Tableau documentation and by users.

In simple terms:

 Heat maps/density maps show where there are more or fewer data points by blending
colors: areas with more points are shown in darker or more intense colors, while areas with
fewer points are lighter.
 These maps are especially useful when you have lots of overlapping data, such as many sales
in the same city or many events in a small area128.

How to create a heat map (density map) in Tableau:

1. Open a new worksheet and connect to your data source.

2. Place your geographic dimension (like Postal Code, City, or Latitude/Longitude) on the view
to create a map.

3. On the Marks card, change the mark type to Density (sometimes called Heatmap).

4. Tableau will automatically group overlapping marks and color them based on how many are
in each area-the more marks, the "hotter" (darker) the color1278.

5. You can adjust the color scheme and intensity to highlight the patterns you want to see.

What does this show?

 Areas with the most data points (like customers, sales, or events) will appear as the darkest
or most intense spots on the map.

 Areas with fewer points will be lighter or more transparent.

Summary Table:

Term Also Called What It Shows How It Works in Tableau

Heat Map Density Data Uses color to show where data


Map concentration/patterns clusters

Density Heat Map Data Same as above


Map concentration/patterns

Key Point:
In Tableau, "heat map" and "density map" mean the same thing: a visual way to quickly see where
your data is concentrated using color.

2.7.4. Create choropleth maps (filled maps)

What Are Choropleth (Filled) Maps?

Choropleth maps, also known as filled maps in Tableau, are


thematic maps where geographic regions (such as countries,
states, or counties) are shaded or colored in proportion to a
data variable. The color intensity or gradient represents the
value of a specific metric, making it easy to visualize spatial
patterns, trends, and regional differences1312.

When to Use Choropleth Maps

Choropleth maps are ideal for displaying:

 Ratio or aggregated data (e.g., rates, percentages, averages) rather than raw counts1611.
 Geographic patterns or trends, such as obesity rates by county, unemployment rates by
district, or profit by state369.

 Comparisons between regions, highlighting areas with higher or lower values relative to
others611.

Tip: Always use standardized data (like rates or ratios) rather than absolute counts to avoid
misleading interpretations, especially when regions differ significantly in size or population6711.

How to Create a Choropleth Map in Tableau

Creating a choropleth map in Tableau is straightforward and involves a few key steps:

1. Prepare Your Data

o Ensure your dataset includes geographic information (e.g., country, state, county)
and a quantitative value (e.g., percentage, rate)15.

o Geographic fields should be recognized by Tableau or provided via custom


polygons15.

2. Build the Map View

o Open a new worksheet in Tableau.

o Drag the geographic field (like State or Country) onto the view. Tableau automatically
generates a map145.

o On the Marks card, select "Map" to switch from a point map to a filled (choropleth)
map4.

o Drag your quantitative measure (e.g., Profit, Obesity Rate) to the Color shelf on the
Marks card.

o Adjust the color palette as needed for clarity and emphasis4.

3. Customize and Refine

o Optionally, add labels or tooltips for more detail.

o Drill down to finer geographic detail (e.g., from State to County) if your data supports
it.

o Exclude irrelevant regions (e.g., Alaska and Hawaii for contiguous US maps) as
needed.

Example Use Cases

 Visualizing obesity rates by county across the United States to identify regional health trends.

 Showing unemployment rates by district to support policy decisions.

 Displaying profit or sales by state for business analysis.

Key Advantages

 Easy pattern recognition: Quickly spot geographic trends and outliers.


 Effective comparison: Compare standardized values across regions.

 Customizable: Adjust color schemes and data intervals for clarity and impact.

Summary Table: Choropleth Map Features

Feature Description

Data Type Ratio, percentage, or aggregated data

Geographic Unit Country, state, county, district, or custom polygons

Visualization Color gradient or pattern fills

Best Use Comparing regions, spotting trends, showing variability

Tool Support (Tableau) Built-in, easy to create and customize

Choropleth maps in Tableau provide a simple and effective way to visualize how a measurement
varies across a geographic area, making them a go-to choice for spatial data analysis.

2.8. Summarize, model, and customize data by using the Analytics feature

2.8.1. Totals and subtotals

Show Totals in a Tableau Visualization

1. Show Grand Totals

To show grand totals:

1. Click the Analytics pane.

2. In the Analytics pane, under Summarize, drag Totals into the Add Totals dialog.

3. Drop it over either Row Grand Totals or Column Grand Totals.

o Row grand totals appear on the right side.

o Column grand totals appear at the bottom.

Requirements:

 The view must have at least one header (a dimension on Rows or Columns).

 Measures must be aggregated (like SUM, AVG, etc.).

 Grand totals cannot be applied to continuous dimensions.

Note:

 For graphical views (like bar charts), only column totals are calculated if there are only
column headers.

Data Source Note:

 Totals are computed on the server if connected to Microsoft Analysis Services.

 Totals are computed locally if connected to Essbase, using the cube’s aggregation.
2. Options for Calculating Grand Totals

 By default, grand totals use disaggregated data from the data source.

 Sometimes, the total you see is not just the sum/average of visible numbers, but is calculated
from all underlying data.

 To make totals match the numbers you see in the view:

1. Go to Analysis > Totals > Total All Using > [Aggregation] (e.g., Average).

2. Now, the total is calculated based on the displayed values, not all underlying data.

This is called a "two-pass total":

 First, values are aggregated for each cell.

 Then, those results are aggregated again for the total.

3. Grand Totals and Aggregations

 When you turn on grand totals, they use the current aggregation for each field.

 For SUM, the total is the sum of sums.

 For other aggregations (like custom ones), results may be unexpected.

 You can always check calculations by viewing the underlying data.

Default aggregations:

Aggregation Description

Sum Sum of the values in the row/column

Average Average of the values in the row/column

Median Median of the values in the row/column

Count Number of values in the row/column

Count Distinct Number of unique values in the row/column

Minimum Minimum value in the row/column

Maximum Maximum value in the row/column

Percentile Average percentile for all values in the row/column

Standard Standard deviation of the values in the row/column


Deviation

Variance Variance of the underlying data behind the row/column

Note:

 Only "Automatic" totals are available for table calculations and fields from a secondary data
source.

4. Show Subtotals
To show subtotals:

1. Click the Analytics pane.

2. Under Summarize, drag Totals into the Add Totals dialog.

3. Drop it over Subtotals.

5. Move Totals

 By default:

o Row grand totals and subtotals appear on the right.

o Column grand totals and subtotals appear at the bottom.

To move totals:

 To move row totals to the left:


Go to Analysis > Totals > Row Totals to Left.

 To move column totals to the top:


Go to Analysis > Totals > Column Totals to Top.

6. Configure Total Aggregation

To choose how totals are calculated:

 For all totals:


Go to Analysis > Totals > Total All Using, then pick an aggregation (Sum, Average, etc.).

 For a specific field:


Right-click (or Control-click on Mac) the field in the view, select Total using, and pick the
aggregation.

Notes:

 "Automatic" uses disaggregated underlying data.

 Other options (Sum, Average, etc.) use the aggregated data you see in the view.

Server Option:

 "Server" aggregation is only available for ASO cubes.

 Not available for dynamic hierarchies or some calculated fields (may show blanks).

7. More Information

 For table calculations or blended data, see Tableau Knowledge Base articles:

o “Showing Grand Totals with Blended Data”

o “Grand Totals and Subtotals Do Not Show Expected Numbers With Table
Calculations”

Summary:

 Use the Analytics pane to add grand totals and subtotals.


 Move totals as needed from the Analysis menu.

 Choose how totals are calculated (sum, average, etc.).

 Understand that totals may use underlying data or just what you see, depending on your
settings.

2.8.2. Reference lines

Reference Lines, Bands, Distributions, and Boxes in Tableau

You can add reference lines, bands, distributions, and box plots to any continuous axis in a Tableau
view to highlight specific values, ranges, or statistical distributions. These tools help you understand
how your data compares to averages, ranges, or statistical measures.

1. What Are They?

 Reference Lines: A straight line on a continuous axis at a specific value. This value can be a
constant or calculated from your data (like average sales). You can also add confidence
intervals around the line.

 Reference Bands: A shaded area between two values on the axis. It highlights a range of
values, such as between minimum and maximum sales or between two percentiles.

 Reference Distributions: A gradient shading that shows the distribution of values along the
axis. You can define it by percentiles, quantiles, standard deviations, or percentages. Useful
for showing data spread.

 Box Plots: A standardized chart showing data distribution with quartiles (hinges) and
whiskers (range or outliers). Box plots are available only in Tableau Desktop, not on the web.

2. How to Add a Reference Line (Step-by-Step)

 Step 1: Open your Tableau workbook and make sure you have a continuous axis, like sales or
profit over time.

 Step 2: Open the Analytics pane (usually on the left side).

 Step 3: Drag Reference Line from the Analytics pane onto your view. Tableau will highlight
possible drop targets.

 Step 4: Drop the reference line on the axis or in the area where you want it. Depending on
your view, Tableau gives you options:

o Table: The line applies to the whole table.

o Pane: The line applies to a section or pane of the view.

o Cell: The line applies to each individual cell.

 Step 5: Tableau opens the Edit Reference Line dialog box.

3. Configuring the Reference Line

 Value Field: Choose the continuous field or parameter to base the line on. If the field is not
in the view, drag it to the Details on the Marks card first.

 Aggregation: Choose how Tableau calculates the line’s value:


o Total: Aggregate of all values in the scope.

o Sum: Sum of values.

o Constant: A fixed number you enter.

o Minimum: The smallest value.

o Maximum: The largest value.

o Average: The mean value.

o Median: The middle value.

 Label: Choose how the line is labeled:

o None: No label.

o Value: Show the numeric value.

o Computation: Show the field name and aggregation.

o Custom: Create your own label with text and dynamic values.

 Tooltip: Choose whether to show a tooltip when hovering over the line:

o None: No tooltip.

o Automatic: Default tooltip.

o Custom: Create your own tooltip text.

 Confidence Interval: You can add a confidence interval around the reference line:

o Choose to show the line with confidence interval, just the line, or just the confidence
interval.

o Select the confidence level (e.g., 95%) or use a parameter.

o The higher the confidence level, the wider the shaded band.

 Formatting: (Tableau Desktop only) Customize the line’s color, style, and thickness.

 Fill Colors: You can fill the area above and below the line with colors to highlight regions.

 Recalculated Lines: Optionally, you can choose to recalculate the line based on highlighted
or selected data points for dynamic comparison.

Summary

Feature What It Does Key Options & Uses Available In

Reference Line Adds a line at a specific Aggregation, label, tooltip, All Tableau
value or statistic confidence intervals platforms

Reference Band Shades an area between Start/end values, label, All Tableau
two values on an axis tooltip, fill color platforms

Reference Adds gradient shading to Percentiles, quantiles, std All Tableau


Distribution show data spread deviation, percentages platforms

Box Plot Visualizes data distribution Whiskers, outliers, styles Tableau


with quartiles Desktop only

Reference Box Highlights intersecting Combination of bands/lines, All Tableau


ranges on two axes fill colors platforms

By using these tools, you can add rich statistical context and visual cues to your Tableau dashboards,
making your data easier to interpret and compare.

2.8.3. Reference bands

Adding Reference Bands in Tableau: Simple Steps

Reference bands are shaded areas behind the marks in your Tableau view, highlighting a range
between two values on a continuous axis. They help you visually emphasize important ranges or
thresholds in your data.

How to Add a Reference Band

1. Open the Analytics Pane

o Click the Analytics tab on the top-left of your Tableau workspace.

2. Drag Reference Band into the View

o Find Reference Band in the Analytics pane.

o Drag it onto your chart. Tableau will highlight possible drop areas, typically labeled as
Table, Pane, or Cell.

 Table: Band covers the entire table.

 Pane: Band covers each pane (section) separately.

 Cell: Band covers each cell individually12.

3. Drop the Reference Band

o Drop the band in your chosen scope (Table, Pane, or Cell). A dialog box appears for
configuration.

4. Configure the Band Range

o In the dialog, set:

 Value (From): The starting point of the band (e.g., Minimum, Average, a
specific field, or constant).

 Value (To): The end point of the band (e.g., Maximum, Median, another
field, or constant).

o You can use parameters or different fields, but don’t select the same field and
aggregation for both12.

5. Label and Tooltip Options


o Label: Choose what appears on the band (None, Value, Computation, or Custom).

o Tooltip: Set what appears when hovering over the band (None, Automatic, or
Custom)1.

6. Format the Band

o Choose shading color and whether to mark the band edges with a line.

o In Tableau Desktop, you can also specify if the band should recalculate for
highlighted or selected data1.

7. Click OK

o The reference band appears in your view, shading the specified range.

Quick Example

Suppose you want to highlight the area between the minimum and average sales for each product
category:

 Drag Reference Band to Pane.

 Set Band From to Minimum Sales and Band To to Average Sales.

 Format and label as desired, then click OK.

Tips

 If you want to use a continuous field not in the view, drag it to the Details target on the
Marks card first1.

 You can edit or remove the reference band by right-clicking it in the view.

Summary Table

Step Action

1. Analytics Pane Drag Reference Band into the view

2. Choose Scope Table, Pane, or Cell

3. Set Range Select Value (From) and Value (To)

4. Label/Tooltip Choose how to label and what tooltip to show

5. Format Set color, lines, and recalculation options

6. Apply Click OK to add the band

Reference bands are a simple but powerful way to add context and highlight important ranges in
your Tableau visualizations.

2.8.4. Average lines

Average Line in Tableau (Short)

 What: A line showing the average value of a measure on your chart.


 How to add: Drag Average Line from the Analytics pane onto your view.

 Customize: Click the line to change aggregation (Average, Sum, Total), edit, remove, or
format it.

 Shortcut: Right-click the axis and choose Edit Reference Line to modify the line.

 Purpose: Helps quickly compare data points to the average and spot trends or outliers.

2.8.5. Trend lines

How to Add Trend Lines to a Visualization in Tableau

Adding trend lines in Tableau helps you visually highlight patterns and relationships in your data,
such as the correlation between the ease of doing business index and GDP per capita. Here’s a
simple, step-by-step guide to adding and customizing trend lines in Tableau Cloud, Desktop, Public,
or Server.

Steps to Add a Trend Line:

 Switch to the Analytics pane from the Data pane148.

 In the Analytics pane, find the Trend Line option under the Model section148.

 Drag the Trend Line into your view (for example, onto a scatter plot)148.

 When prompted, drop it onto one of the available model types:

o Linear

o Logarithmic

o Exponential

o Polynomial

o Power1468

Customizing and Editing Trend Lines:

 After adding a trend line, you can right-click the line (or click it in web editing mode) and
select Edit Trend Lines to change its type, factors, or appearance248.

 You can also format the trend line’s color and style via the Format menu8.

 Hovering over the trend line will show key statistics, such as R-squared and p-value, which
help you assess how well the model fits your data68.

Understanding Trend Line Types:

Model Type When to Use

Linear For simple, straight-line relationships between variables

Logarithmic When data increases or decreases quickly and then levels out

Exponential For data with rapid growth or decline


Model Type When to Use

Polynomial For data with multiple peaks and valleys

Power When one variable varies as a power of another

Example:
To visualize the relationship between the ease of doing business index and GDP per capita, create a
scatter plot with these variables and add a logarithmic trend line to best fit the data’s pattern.

Tips:

 You can add multiple trend lines by segmenting your data (e.g., by year or region), assigning
each a different color for clarity.

 Use the Describe Trend Line or Describe Trend Model options for detailed statistical
summaries.

Adding and customizing trend lines in Tableau is straightforward and provides immediate insight into
data trends, making your visualizations more informative and actionable.

2.8.6. Distribution bands

How to Add Reference Distributions in Tableau

Adding reference distributions in Tableau allows you to visually highlight statistical ranges (like
percentiles, quantiles, or standard deviations) within your data, making it easier to interpret and
compare values. Here’s a simple, step-by-step guide:

1. Open the Analytics Pane

 Go to the Analytics pane in Tableau.

2. Drag Distribution Band into the View

 Drag the Distribution Band option from the Analytics pane and drop it onto your chart.

 Tableau will highlight possible destinations-choose where you want the distribution to apply:
Table, Pane, or Cell.

o Table: Applies to the entire view.

o Pane: Applies to each pane (subsection) in your view.

o Cell: Applies to each individual cell12.

3. Choose the Computation Type

 In the dialog box that appears, select how you want to define your distribution:

o Percentages: Shades between specified percentage values (e.g., 60, 80). Enter values
separated by commas and specify the measure and aggregation2.

o Percentiles: Shades between specified percentiles (e.g., 25, 50, 75). Enter values
separated by commas12.

o Quantiles: Breaks the view into equal-sized tiles (e.g., terciles, quartiles). Specify the
number of tiles (3–10)2.
o Standard Deviation: Shades areas within a specified number of standard deviations
from the mean. Specify the factor (number of standard deviations) and whether to
use sample or population23.

4. Set Labeling Options

 Choose how to label your distribution bands:

o None: No label.

o Value: Show the value for each band.

o Computation: Show the name of the field and computation.

o Custom: Enter your own label, using dynamic values if desired2.

5. (Optional) Show Recalculated Bands

 You can choose to show recalculated bands for highlighted or selected data points for
interactive analysis2.

6. Format the Bands

 Adjust colors, shading, and fill options to make the bands visually clear. For example, you can
use different colors for different percentile ranges (e.g., 25th, 50th, 75th percentiles)1.

7. Finish and Review

 Click OK or Apply. Your chart will now display the reference distribution bands, visually
highlighting the specified statistical ranges.

Example: Adding Percentile Bands

Suppose you want to add bands at the 25th, 50th, and 75th percentiles:

 Drag Distribution Band to the view.

 Select Pane as the scope.

 Choose Percentiles as the computation.

 Enter 25, 50, 75 as the values.

 Customize labeling and formatting as desired.

 The result will be bands showing where data falls below the 25th, 50th, and 75th percentiles,
each shaded differently.

2.8.7. Forecast by using default settings

How to Create a Forecast in Tableau

Requirements

 You need at least one date dimension and one measure in your view to create a forecast125.
Steps to Turn On Forecasting

 Right-click (or control-click on Mac) on your visualization and choose Forecast > Show
Forecast.

 Or, go to the menu and select Analysis > Forecast > Show Forecast125.

Supported View Structures


You can create a forecast if your view is set up in any of these ways:

 The field you want to forecast is on the Rows shelf, and a continuous date field is on the
Columns shelf.

 The field you want to forecast is on the Columns shelf, and a continuous date field is on the
Rows shelf.

 The field you want to forecast is on either the Rows or Columns shelf, and discrete dates
(with at least one Year level) are on either shelf.

 The field you want to forecast is on the Marks card, and a continuous or discrete date set is
on Rows, Columns, or Marks1.

Note: You can also forecast without a date dimension if you have a dimension with integer values in
the view12.

How Forecasts Are Displayed

 Tableau shows estimated future values (the forecast) in a lighter shade than historical values.

 The forecasted data appears alongside your actual data on the chart125.

Prediction Intervals

 Forecasts include a shaded area (for line charts) or whiskers (for shapes, bars, circles, etc.) to
show the prediction interval.

 By default, Tableau uses a 95% prediction interval, meaning there’s a 95% chance the actual
value will fall within this range.

 You can change the prediction interval (90%, 95%, or 99%) or turn off prediction bands in the
Forecast Options dialog13.

Forecast Mark Type Prediction Interval Displayed As

Line Bands (shaded area)

Shape, bar, circle Whiskers (lines)

Enhancing and Customizing Forecasts

 You can check the quality of your forecast by dragging another instance of the forecast
measure to the Detail shelf on the Marks card.

 Right-click the field to access options for editing the forecast formula, viewing results, or
controlling the tooltip.
 Add multiple result types (like upper/lower prediction intervals) to tooltips for deeper
insight15.

Summary of Steps

1. Build a view with a date dimension and a measure.

2. Right-click the viz or use the Analysis menu to turn on forecasting.

3. Adjust forecast options (length, prediction interval, model type) as needed.

4. Use additional fields on Detail to show more forecast information in tooltips15.

Tip: Forecasting is not supported for multidimensional (cube) data sources, and you cannot add a
forecast if your view includes table calculations, disaggregated measures, percent calculations, or
grand totals/subtotals.

2.8.8. Customize a data forecasting model

Tableau Forecast Options: Simple Guide

How to Open:
Go to Analysis > Forecast > Forecast Options in Tableau Desktop or Tableau Public18.

Forecast Options Explained:

1. Forecast Length

 Automatic: Tableau decides how far to forecast based on your data.

 Exactly: You set the number of periods (e.g., 12 months).

 Until: You set a specific end date or time point1610.

2. Source Data

 Aggregate by: Choose how data is grouped (e.g., by month, week, day). Default is usually the
same as your chart, but you can change it1610.

 Ignore last: Skip a set number of recent periods (e.g., last month) to avoid using incomplete
data in the forecast1610.

 Fill in missing values with zeros: If your data has gaps, Tableau can fill them with zeroes110.

3. Forecast Model

 Automatic: Tableau picks the best model for your data.

 Automatic without seasonality: Ignores seasonal patterns.

 Custom: You pick the type of trend and seasonality:

o None: No trend/seasonality.

o Additive: Changes add up over time.

o Multiplicative: Changes multiply over time.

o Note: Multiplicative models can’t be used if your data has zero or negative values.
4. Prediction Interval

 Sets the confidence level for the forecast range (e.g., 90%, 95%, 99%). Higher values mean a
wider shaded area (more uncertainty).

5. Forecast Summary

 Shows a text summary of your current forecast settings and any errors1.

Extra Tips:

 You can right-click the forecasted field to see more results like actual vs. forecast, trend,
prediction intervals, and forecast quality.

 Adjusting these options helps you fine-tune forecasts for better business planning and
analysis.

2.9. Create Level of Detail (LOD) calculations


2.9.1. Write FIXED LOD calculations

FIXED Level of Detail (LOD) expressions in Tableau enable calculations at a specified granularity,
independent of the visualization's dimensions. These expressions use the syntax {FIXED [Dimension] :
Calculation} and are particularly useful for creating consistent metrics across varying levels of data
aggregation.

Key Features of FIXED LODs

 Granularity Control: Compute values using explicitly defined dimensions, ignoring those in
the view.

 Filter Behavior: Ignore all filters except context, data source, and extract filters.

 Use Cases:

o Calculating customer acquisition dates.

o Aggregating metrics (e.g., sales, profit) at regional or category levels.

o Comparing performance across fixed time intervals.

Example 1: Customer Purchase Intervals

To analyze sales patterns relative to a customer’s first purchase:

1. Create Calculated Fields:

o First Purchase Date: {FIXED [Customer Name] : MIN([Order Date])}.

o Days Since First Purchase: DATETRUNC('day', [Order Date]) - DATETRUNC('day', [First


Purchase Date])1.

2. Build the Visualization:

o Drag Days Since First Purchase (converted


to a dimension) to Columns.
o Place AVG(Sales) with a running total table calculation on Rows.

o Add First Purchase Date to Color, breaking it into yearly/quarterly components.

Insight: Customers acquired earlier (e.g., 2013) show higher sustained spending, visible as upward-
trending lines in the visualization.

Example 2: Regional Sales Aggregation

To compute total sales per region, regardless of state-level details:

1. Create a Calculated Field:

o Sales by Region: {FIXED [Region] : SUM([Sales])}.

2. Build the View:

o Add Region and State to Rows, then place Sales by


Region on Text.

Result: Each state within a region displays the same sales value
because the calculation ignores the State dimension in the view. Using INCLUDE instead would yield
state-specific values.

Comparison with Other LOD Types

Type Behavior Example Use Case

FIXED Ignores view dimensions Regional sales totals

INCLUDE Adds granularity Segment-level profit within regions

EXCLUD Reduces granularity National sales excluding regional filters


E

FIXED LODs are essential for scenarios requiring consistent aggregation, such as cohort analysis or
performance benchmarking. By decoupling calculations from the visualization’s structure, they
provide flexibility in deriving insights across diverse data hierarchies.

2.9.2. Write INCLUDE LOD calculations

INCLUDE Level of Detail (LOD) Expressions in Tableau

INCLUDE level of detail expressions in Tableau allow you to compute values using specified
dimensions in addition to whatever dimensions are already in your view. This means you can
calculate metrics at a more granular level and then re-aggregate those results at a higher level,
depending on how your visualization is set up. The results of INCLUDE LOD expressions will
automatically update as you add or remove dimensions from your view127.

Key Points:

 INCLUDE LOD expressions are useful when you want to perform calculations at a finer level
of detail than the current view, but still want to display results at a coarser level.

 The syntax is:

text
{ INCLUDE [Dimension] : AGG([Measure]) }

 As you change the dimensions in your view, the INCLUDE LOD calculation dynamically
adjusts.

Examples

Example 1: Total Sales Per Customer

To compute total sales per customer, use:

text

{ INCLUDE [Customer Name] : SUM([Sales]) }

 Place this calculation on the Rows shelf and aggregate it as AVG.

 Add [Region] to the Columns shelf.

 The resulting view shows the average sales per customer for each region.

 If you also add the [Sales] measure to the Rows shelf, you can compare total sales per region
to the average sales per customer per region.

Example 2: Sum of Sales Per State

To calculate the sum of sales for each state:

text

{ INCLUDE [State] : SUM([Sales]) }

 Place this calculation on the Rows shelf and set the aggregation to AVG.

 Add [Category] to the Columns shelf.

 The view now displays the average sum of sales per state across categories.

 You can further break down the view by adding [Segment] to Columns and using color to
distinguish segments, revealing how the average sum of sales per state varies by category
and segment.

When to Use INCLUDE LOD Expressions

 When you need to calculate a metric at a more detailed level than your current visualization,
but want to display or aggregate it at a higher level.

 For example, finding average sales per order (using [Order ID]) when your view is at the
region level.

 INCLUDE is especially helpful when you want to include a dimension in your calculation that
isn’t present in the view.

Comparison with Other LOD Types

LOD What It Does Syntax Example Use Case Example


Type

FIXED Ignores view’s dimensions, {FIXED [State] : SUM([Sales])} Always sum sales
uses only specified ones per state,
regardless of view

INCLUDE Adds specified dimensions to {INCLUDE [Customer Name] : Avg sales per
those in the view SUM([Sales])} customer,
aggregated by
region

EXCLUDE Removes specified dimensions {EXCLUDE [Category] : Total sales by


from the view’s granularity SUM([Sales])} region, ignoring
category

Summary:
INCLUDE LOD expressions in Tableau are powerful for calculating metrics at a more granular level and
then aggregating them as needed for your analysis. They adjust automatically as you change your
view, making them flexible for dynamic dashboards and exploratory analysis.

2.9.3. Write EXCLUDE LOD calculations

EXCLUDE Level of Detail (LOD) Expressions in Tableau

What Are EXCLUDE LOD Expressions?

EXCLUDE LOD expressions in Tableau allow you to remove one or more dimensions present in your
view from the context of a calculation. This means the calculation will ignore these dimensions, even
if they are displayed in your visualization, and aggregate data at a higher level (less granular).

Why Use EXCLUDE LOD Expressions?

 To calculate values like "percent of total" or "difference from overall average" where you
want to ignore certain breakdowns in your view.

 To compare detailed data against higher-level aggregates without changing your visualization
structure.

 To simplify calculations that would otherwise require complex table calculations or manual
data manipulation.

Syntax

The syntax for an EXCLUDE LOD expression is:

text

{EXCLUDE [Dimension1], [Dimension2], ... : AGG([Measure])}

 Replace [Dimension1], [Dimension2] with the dimensions you want to remove from the
calculation.

 Replace AGG([Measure]) with the aggregation you want (e.g., SUM, AVG).

How EXCLUDE Works

 EXCLUDE removes the specified dimension(s) from the calculation, even if those dimensions
are present in the view.

 The result is aggregated at a higher level than the view, ignoring the excluded dimensions.
 The calculation's result can change depending on the structure of your view (unlike FIXED
LOD, which is always the same regardless of the view).

Examples

1. Average Blood Pressure by Country (Ignoring Sex):

o View: Blood pressure over time by country and sex.

o EXCLUDE calculation: {EXCLUDE [Sex] : AVG([Average blood pressure])}

o Effect: Shows the average blood pressure for each country over time, ignoring the
breakdown by sex, even if sex is in the view.

2. Total Sales by Month (Ignoring Region):

o View: Bar chart with sales broken out by region and month.

o EXCLUDE calculation: {EXCLUDE [Region]: SUM([Sales])}

o Effect: Shades the chart to show total sales by month, ignoring the regional
breakdown.

3. Difference from Average Monthly Sales:

o Nested EXCLUDE example:

text

{EXCLUDE [Order Date (Month / Year)] : AVG({FIXED [Order Date (Month / Year)] : SUM([Sales])})}

o Effect: Calculates the average sales per month, then excludes the month to compare
each month's sales to the overall monthly average.

Key Points to Remember

 EXCLUDE LOD expressions cannot be used for row-level calculations (since there are no
dimensions to omit at the row level).

 They are most useful for view-level or intermediate calculations.

 The result of an EXCLUDE LOD can change if you change the dimensions in your view, since it
always works relative to what's shown.

 EXCLUDE is especially helpful for creating custom totals, averages, or comparisons without
altering the visualization's structure.

Summary Table: LOD Expression Types

Type What It Does Example Syntax Result


Changes with
View?
FIXED Ignores view, uses only {FIXED [Field] : AGG([Measure])} No
specified fields

INCLUDE Adds dimensions to {INCLUDE [Field] : AGG([Measure])} Yes


calculation

EXCLUDE Removes dimensions from {EXCLUDE [Field] : AGG([Measure])} Yes


calculation

In summary:
EXCLUDE LOD expressions in Tableau are powerful tools for removing specific dimensions from your
calculations, allowing you to control the granularity of your analysis and create advanced
comparisons and summaries within your dashboards.

2.9.4. Write nested LOD calculations

Nested LOD Calculations in Tableau (Short Example)

Nested LODs in Tableau are Level of Detail expressions placed inside another LOD. This allows you to
perform multi-step aggregations at different granularities in a single calculation.

Syntax Example

Suppose you want to calculate the average of monthly sales totals, then aggregate that average at a
higher level (e.g., by year):

text

{ EXCLUDE [Order Date (Month/Year)] : AVG(

{ FIXED [Order Date (Month/Year)] : SUM([Sales]) }

)}

 The inner LOD { FIXED [Order Date (Month/Year)] : SUM([Sales]) } calculates total sales per
month.

 The outer LOD { EXCLUDE [Order Date (Month/Year)] : AVG(...) } then averages those monthly
totals, excluding the month granularity1.

Key Points

 Nesting is done by placing one LOD inside another.

 Inner LODs are evaluated first, then aggregated by the outer LOD.

 Common use cases: comparing aggregates across different dimensions, advanced cohort
analysis, or recreating complex table calculations.

 Syntax must always include an aggregation inside each LOD.

Quick Example

Find the average monthly sales per region:

text

{ EXCLUDE [Month] : AVG(


{ FIXED [Month] : SUM([Sales]) }

)}

This computes total sales per month, then averages those monthly totals at the region level.

Tip: Nested LODs can be performance-intensive, so use them judiciously.

Domain 3: Create Content

3.1. Create charts

3.1.1. Create basic charts from scratch (bar, line, pie, highlight table, scatter plot, histogram, tree
map, bubbles, data tables, Gantt, box plots, area, dual axis, combo)

This section includes detailed exercises that guide you through the steps involved in building some
common chart types in data views. All exercises use the Sample - Superstore data source, which is
included with Tableau Desktop. This collection of topics is just a sample of the many types of data
views that you can create in Tableau. For details on options for building views from scratch, see Build
Data Views from Scratch and Build a Basic View to Explore Your Data.

Other articles in this section

 Build an Area Chart

 Build a Bar Chart

 Build a Box Plot

 Build a Bullet Graph

 Build with Density Marks (Heatmap)

 Build a Gantt Chart

 Build a Highlight Table

 Build a Histogram

 Build a Line Chart

 Build a Packed Bubble Chart

 Build a Pie Chart

 Build a Scatter Plot

 Build a Text Table

 Build a Treemap

 Build Combination Charts

3.1.2. Sort data (including custom sort)

Quick Ways to Sort Data

1. Sort from an Axis


 Hover over a numerical axis (like a bar chart’s numbers).

 Click the sort icon that appears.

 1 click = descending, 2 clicks = ascending, 3 clicks = clear sort.

 Sorting happens for the innermost dimension (e.g., Color within Hue).

2. Sort from a Header

 Hover over a header (like a column or row label).

 Click the sort icon.

 Sorts the items in that header (e.g., sorts Materials for a specific color).

 You can also sort from the header’s tooltip.

3. Sort from a Field Label

 Hover over a field label (like a category name).

 Click the A-Z sort icon to sort alphabetically.

 Or open the menu to sort by a specific field (e.g., by sales amount).

Extra Sorting Options (in Authoring)

4. Sort from the Toolbar

 Select the field you want to sort.

 Click the sort button (ascending or descending) in the toolbar.

 If nothing is selected, it sorts the deepest dimension by the leftmost measure.

5. Drag and Drop to Sort

 Click and drag headers or legend items to rearrange them.

 The order in the legend matches the order in the chart.

6. Sort Specific Fields (Right-click Menu)

 Right-click (Windows) or control-click (Mac) a field and choose Sort.

 Choose how to sort:

o Data Source Order: Uses the order from your data source.

o Alphabetic: Sorts alphabetically (case sensitive).

o Field: Sorts by a field’s values (you can pick how to aggregate).

o Manual: Drag items up or down in the list.

o Nested: Sorts within groups/panes.

Nested vs. Non-Nested Sorts


 Nested Sort: Sorts values within each pane/group (e.g., each Material shows Hues sorted
independently).

 Non-Nested Sort: Sorts values across all panes the same way (e.g., Hues sorted the same for
all Materials).

Troubleshooting

 Missing Sort Icons: Not all charts support sorting (e.g., scatterplots). Icons may be disabled.

 Clear Sorts: Right-click a field and choose Clear Sort, or use the Worksheet menu to clear all
sorts.

 Remove Sort Controls: Authors can hide sort icons from viewers in the Worksheet menu.

Tips

 Hover over sort icons to see what they do.

 Simplify your view if you’re unsure how it’s being sorted.

 Use calculated fields (like UPPER() or LOWER()) for case-insensitive sorting.

3.2. Create dashboards and stories

3.2.1. Combine sheets into a dashboard by using containers and layout options

Simple Guide to Sizing and Laying Out Your Tableau Dashboard

Control Overall Dashboard Size

 Fixed Size: The dashboard stays the same size no matter what window it’s in. If the window
is too small, scroll bars appear. You can pick a preset or set your own size. Fixed size is good
for exact placement and can make dashboards load faster1.

 Range: The dashboard can grow or shrink between a minimum and maximum size you set. If
the window is smaller than the minimum, scroll bars show up. If it’s bigger than the
maximum, there’s extra white space. Use this if you want your dashboard to work on two
different screen sizes, like small and medium browser windows, or for mobile dashboards1.

 Automatic: The dashboard always fills the window it’s in. Tableau does the resizing for you.
This is easy but can look unpredictable on different screens. Best used with tiled layouts1.

Set Dashboard Size

 Go to the Size section in the Dashboard pane.

 Choose a preset size (like Desktop Browser) or pick a sizing behavior (Fixed, Range, or
Automatic)1.

Group Items Using Layout Containers

 Layout containers let you group items together so you can move and size them as a group.

 Horizontal container: Arranges items side by side. Adjusts width1.


 Vertical container: Stacks items on top of each other. Adjusts height1.

 To add: Under Objects, select Horizontal or Vertical and drag to your dashboard. Add your
views or objects into the container1.

 To evenly space items, select the container, right-click, and choose "Distribute Evenly"1.

Automatically Resize Sheets in Layout Containers

 If you have related sheets in a container, you can set them to resize automatically depending
on what’s selected.

 Use "Use as Filter" on one sheet, then set up actions to control how other sheets resize
when nothing is selected (show all data, or collapse)1.

Remove a Layout Container

 Select the container (on the dashboard or in the Layout pane).

 Use the drop-down menu to select "Remove Container." This lets you edit items inside
separately1.

Tile or Float Dashboard Items

 Tiled: Items don’t overlap; they fit into a grid and resize with the dashboard1.

 Floating: Items can overlap and be placed anywhere, even over other objects. Good for
fixed-size dashboards1.

 To add: Under Objects, pick Tiled or Floating, then drag to the dashboard1.

 To switch: Select an item, right-click, and choose Floating or Tiled1.

Size, Position, Reorder, and Rename Items

 Select an item, then in the Layout pane, set its exact size and position (x/y in pixels)1.

 Drag to move or resize items directly on the dashboard.

 Use arrow keys for fine adjustments (Shift for bigger jumps)1.

 To rename: Right-click in the Layout pane and choose Rename Dashboard Item1.

 To reorder: Drag items in the Item hierarchy in the Layout pane. Top items are in front1.

Align Items with a Grid

 Go to Dashboard > Show Grid to turn on a grid for easier alignment.

 Change grid size with Dashboard > Grid Options1.

Add Padding, Borders, and Background Colors

 Select an item or the whole dashboard.

 In the Layout tab, set border style, color, background color, and padding (inside or outside
spacing)1.

 Tip: Turn off "All sides equal" to adjust padding on just one side.
Make Elements Transparent

 For transparent backgrounds, select the sheet, go to Format > Shading, and choose None.

 For transparent maps, turn off the Base layer and adjust other map layers as needed.

 To make a sheet partially transparent, set the background color and opacity in the Layout
pane.

 Floating filters, legends, and parameters are transparent by default. If not, set their
background to None in the Layout tab.

This covers the main points for sizing and laying out your Tableau dashboard in a simple, easy-to-
understand way.

3.2.2. Add objects

How to Create and Customize a Dashboard in Tableau

Follow these simple steps to create and enhance a dashboard in Tableau. Each point is explained
clearly so you don’t miss anything.

1. Create a Dashboard

 At the bottom of your Tableau workbook, click the New Dashboard icon (it looks like a small
window).

 On the left, you’ll see a list of your sheets. Drag the sheets you want from this list into the
dashboard area on the right1.

2. Add or Replace Sheets

 To add a sheet: Drag it from the left panel into your dashboard.

 To replace a sheet: Select the sheet in the dashboard, hover over the replacement sheet in
the left panel, and click the Swap Sheets button.

o Note: When you replace a sheet, Tableau keeps the old sheet’s padding, border, or
background color, but you might need to adjust the size or remove filters that no
longer apply1.

3. Add Interactivity

 Use as Filter: In the upper corner of a sheet, enable the Use as Filter option. Now, when you
select something in that sheet, it filters other sheets in the dashboard.

 Add Actions: In Tableau Desktop, you can add actions to:

o Use multiple sheets as filters

o Navigate between sheets


o Display web pages, and more1

4. Add Dashboard Objects

You can add different objects to make your dashboard more interactive and visually appealing:

 Horizontal/Vertical Containers: Group related items together and control how your
dashboard resizes.

 Text: Add headers or explanations.

 Image: Insert images or link images to URLs.

 Web Page: Show a web page directly in your dashboard (note: some pages like Google may
not work).

 Blank: Add space between items.

 Navigation: Create buttons to move between dashboards or sheets.

 Download: Let users export the dashboard as PDF, PowerPoint, PNG, or crosstab (after
publishing).

 Extension: Add custom features or connect to other apps.

 Pulse Metric: Embed metric cards from your data1.

To add an object: Drag it from the Objects section (left side) into your dashboard (right side).

5. Copy and Paste Objects

 Select the object, open its menu, and choose Copy Dashboard Item.

 Go to the dashboard where you want to paste, then use Paste from the menu or keyboard
shortcut.

 The object appears slightly offset from the top-left; drag it to move1.

Note: You cannot copy sheets, filters, parameters, legends, or layout containers with uncopyable
items inside.

6. Set Options for Objects

 Click an object, then the arrow in its upper corner to open its menu.

 Options depend on the object type. For example, for images, you can:

o Insert an image file or link to a web-based image (use HTTPS for web images).

o Set fitting, URL, and alt text for accessibility1.

7. Navigation and Download Buttons


 Click the object menu in the upper corner, choose Edit Button.

 For navigation: Select where the button goes.

 For download: Choose the file format.

 Customize the button’s text/image and tooltip1.

8. Show/Hide Objects with a Button

 Select the object, open its menu, and choose Add Show/Hide Button.

 Edit the button to set:

o Which item it shows/hides

o The button’s style and appearance for shown/hidden states

o Tooltip text1

Tip: Place objects you want to hide in a horizontal or vertical container for better layout control.

9. Web Page Security

 Use HTTPS URLs for web pages and images for better security.

 In Tableau Desktop, adjust web view security settings via Help > Settings and Performance >
Set Dashboard Web View Security (if allowed by your admin)1.

Summary Table: Common Dashboard Objects and Their Uses

Object Type Purpose

Sheet Show your data visualizations

Text Add titles, descriptions, or instructions

Image Add logos or pictures (can link to web pages)

Web Page Embed a website in your dashboard

Navigation Button to move between dashboards/sheets

Download Button to export dashboard as PDF, PNG, etc.

Blank Add space between objects

Extension Add custom features or integrations

Pulse Show metric cards from your data


Metric
Tips:

 Drag and drop to arrange everything.

 Use containers (horizontal/vertical) for better layout control.

 Use tooltips and show/hide buttons to make dashboards cleaner and more interactive.

You now have a clear, step-by-step guide to creating and customizing dashboards in Tableau, with all
major points explained simply and directly.

3.2.3. Create stories

Certainly! Here’s an easy-to-understand explanation of a Tableau Story:

What is a Tableau Story?

A Tableau Story is a special feature in Tableau (Cloud, Desktop, and Server) that lets you combine
multiple visualizations-like charts, maps, and dashboards-into a single, interactive sequence. Think of
it as creating a slideshow where each slide is a different view or insight from your data.

Key Points

 Story Sheet: In Tableau, a story is a type of sheet, just like a worksheet or dashboard.

 Story Points: Each "page" or "slide" in your story is called a story point. Each story point can
show a different visualization or dashboard.

 Sequence: Story points are arranged in a sequence to guide your audience through your data
narrative step by step.

 Interactive: When you share your story (on Tableau Public, Tableau Server, or Tableau Cloud),
viewers can click through the story points, interact with filters, and explore the data
themselves.

Why Use a Tableau Story?

 Tell a Data Narrative: Guide your audience through your findings, step by step.

 Provide Context: Show how different visualizations are connected.

 Demonstrate Impact: Explain how decisions or changes affect outcomes.

 Engage Your Audience: Make your data more compelling and easier to understand.

How to Create a Tableau Story (Simplified Steps)

1. Open Tableau and your workbook.

2. Click the New Story button (looks like a book icon).


3. Add story points by dragging in worksheets or dashboards.

4. Add titles or descriptions to each story point to explain what’s happening.

5. Arrange your story points in the order you want.

6. Share your story by publishing it to Tableau Public, Server, or Cloud.

Example

Imagine you’re analyzing sales data:

 Story Point 1: Show total sales by region.

 Story Point 2: Zoom in on the best-performing region.

 Story Point 3: Highlight what products are driving sales.

 Story Point 4: Show recommendations for next steps.

Each point builds on the last, making your insights clear and easy to follow.

3.3. Add interactivity to dashboards

3.3.1. Apply a filter to a view

Absolutely! Here’s a clear, step-by-step guide to adding filters to Tableau dashboards, using your
screenshots for reference.

How to Add Filters to Tableau Dashboards

Step 1: Select the Worksheet in the Dashboard

 Click on the worksheet you want to filter (see the gray outline around the chart in the first
image).

Step 2: Open the Worksheet Options

 In the top right corner of the worksheet, you’ll see four icons (highlighted in red in the first
image).

 Click the down arrow icon (▼) to open the options menu.

Step 3: Add a Filter

 In the menu, hover over Filters (as shown in the first image).

 A list of available fields will appear (e.g., “Order Date”, “State/Province”, “Region”, etc.).

 Click the field you want to use as a filter.


 The filter card will now appear on your dashboard, letting users filter the data.

Step 4: Filters for Device Layouts (Tablet/Phone)

 In the Dashboard pane on the left (see the second image), you can see the device layouts
(Default, Tablet, Phone).

 If you want the filter to appear on a specific device layout:

o Make sure you’re on the right device layout tab (e.g., Tablet).

o If your layout is set to Default, filters added will show on all device layouts.

o If you want a filter only for a custom layout, set the layout to Custom.

o Drag the filter (e.g., “Sales” filter in the second image) into the view for that device.

Extra Tips

 You can clear all filters for a layout by clicking the “Clear all” button in the Dashboard pane.

 Filters can be added or removed at any time by repeating these steps.

Summary Table

Step What to Do Where to Look (Image)

1. Select Sheet Click worksheet (gray outline appears) First image

2. Options Click ▼ icon (top right of worksheet) First image

3. Add Filter Hover “Filters”, select field to filter by First image

4. Device Layout Use Dashboard pane to manage filters for each device Second image

3.3.2. Add filter, URL, and highlight actions

Filter Actions in Tableau: Simple Steps and Key Points

What are Filter Actions?

 Filter actions in Tableau allow you to send information between worksheets or dashboard
sheets.

 When you select (or hover over) a mark in one view, a filter action can display related data in
another view.

 For example, selecting a house in a sales view can show all comparable houses in another
sheet .
How to Create or Edit a Filter Action

 On a worksheet: Go to Worksheet > Actions.

 On a dashboard: Go to Dashboard > Actions.

 Or, from a dashboard sheet’s drop-down menu, select Use as Filter for a quick setup.

Steps in the Actions Dialog Box

1. Add or Edit Action

o Click Add Action and select Filter.

o Or, select an existing action and choose Edit.

2. Name the Action

o Give your filter action a clear, descriptive name.

o You can insert variables from selected fields to make the name dynamic.

3. Choose the Source

o Select the worksheet, dashboard, or data source that will trigger the action.

o You can pick specific sheets within a dashboard12.

4. Decide How the Action Runs

o Hover: Runs when you mouse over marks.

o Select: Runs when you click marks (optionally, limit to single-select).

o Menu: Runs from a right-click (Windows) or Control-click (macOS) and selecting an


option in the tooltip menu129.

5. Set the Target

o Choose the sheet(s) that will be filtered.

o You can select one or more target sheets within a dashboard12.

6. Choose What Happens When the Selection is Cleared

o Leave the filter: Keeps the filter applied.

o Show all values: Removes the filter, showing all data.

o Exclude all values: Hides all data in the target sheet(s) until a selection is made
(useful for dynamic dashboards)17.

7. Select Fields to Filter

o Filter on All Fields or Selected Fields.

o If using Selected Fields, map the source field to the target field (matching data types
required)1.
Tips and Notes

 If you use fields with different names (e.g., "Latitude" vs. "Lat"), you can manually map them
when connecting relational data sources.

 For multidimensional data sources, source and target fields must have the same name and
use the same data source (Windows only)1.

 Filter actions do not work with user functions like USERNAME() due to row-level security1.

Summary Table: Filter Action Options

Step Options/Details

Where to create Worksheet > Actions, Dashboard > Actions, Use as Filter

Trigger type Hover, Select, Menu

Source Worksheet, Dashboard, Data Source

Target One or more sheets

Clear selection action Leave filter, Show all values, Exclude all values

Fields to filter All Fields, Selected Fields (with mapping)

Absolutely! Here’s an easy-to-understand, step-by-step guide to using URL Actions in Tableau, based
on your attached text. I’ll cover all the main points, so you don’t miss anything.

What is a URL Action in Tableau?

A URL Action lets you add clickable links in your Tableau dashboards or worksheets. These links can
open web pages, files, or even create emails. You can also make the links dynamic by inserting field
values from your data.

How to Create a URL Action

1. Open the Actions Menu

 In a worksheet: Go to Worksheet > Actions.

 In a dashboard: Go to Dashboard > Actions.

2. Add a New URL Action

 In the Actions dialog, click Add Action and select Go to URL....

3. Name Your Action


 Enter a descriptive name for your action. This is what users will see in the tooltip, not the
actual URL.

o Example: Use "Show More Details" instead of just "Link".

4. Choose the Source

 Use the dropdown to select which sheet(s) or data source(s) the action applies to.

5. Decide How Users Trigger the Action

 Hover: Action runs when the user moves the mouse over a mark.

 Select: Action runs when the user clicks a mark.

 Menu: Action runs when the user right-clicks (or control-clicks on Mac) and selects from a
tooltip menu. This is best for URL actions.

6. Set Where the Link Opens

 New Tab if No Web Page Object Exists: Opens in a browser tab if there’s no web page object
in the dashboard.

 New Browser Tab: Always opens in a new browser tab.

 Web Page Object: Opens inside a web page object in your dashboard (if you have one).

7. Enter the URL

 The URL must start with one of these: http, https, ftp, mailto, news, gopher, tsc, tsl, sms, or
tel.

 TIP: Always use the full URL (e.g., http://example.com). If you don’t, it may not work when
published to Tableau Server or Tableau Cloud.

 Local files: In Tableau Desktop, you can use paths like C:\Example folder\example.txt.

8. Insert Field Values (Optional)

 Click the Insert menu next to the URL box to add dynamic field, filter, or parameter values.

 Example: http://maps.com/?address=<Address>

 Note: The fields you use must be present in your view.

9. Data Values Options (Optional)

 Encode Data Values: Check this if your data has special characters (like & in "Sales &
Finance").

 Allow Multiple Values via URL Parameters: Use this if your target web page can accept a list
of values (e.g., multiple product IDs). Set a delimiter (like a comma), and a delimiter escape if
needed.

Creating an Email Link

1. Follow steps 1-4 above.


2. In the URL box, type:

o mailto:

o Insert the email field from your data.

o Add ?subject= and your subject text.

o Add &body= and insert any fields you want in the email body.

o Example: mailto:<Email>?subject=City Information&body=<City>, <State>

3. To make a vertical list in the email body:

o Deselect Encode Data Values

o Select Allow Multiple Values via URL Parameters

o In the Value Delimiter box, type %0a (this is the code for a line break).

Tips for Using Field and Filter Values

 When inserting fields into the URL, they appear as <FieldName>.

 For parameters, if you want to send the actual value (not the display value), add ~na after
the parameter name.

o Example: http://<IPAddress~na>/page.htm

 Aggregated fields aren’t available by default. To use them, create a calculated field and add it
to your view (even if it’s just on Detail).

Summary Table

Step Action

1 Open Actions menu

2 Add "Go to URL" action

3 Name the action

4 Select source sheet/data

5 Choose trigger method (hover, select, menu)

6 Set where link opens (tab, browser, web object)

7 Enter the URL (with correct prefix)

8 Insert field/filter values (optional)

9 Set data value options (optional)


Final Notes

 Test your links using the example link provided in the dialog.

 Always use full URLs for published dashboards.

 Fields used in the URL must be present in your view.

Highlight Actions in Tableau

Highlight actions help you focus on important parts of your data by coloring certain marks and
dimming the rest. You can highlight marks in different ways depending on what you want to do.

Here’s a simple explanation of the main ways to highlight marks in Tableau:

1. Select Marks (Pick Them Yourself)

 What it does: You click on the marks you want to highlight.

 When to use:

o When you want to pick specific marks manually.

o Works best if your data or view is small.

2. Legends (Use the Color or Size Box)

 What it does: You click on colors, sizes, or shapes in the legend to highlight those marks.

 When to use:

o When you want to highlight groups based on color, size, or shape.

o Good for small or medium-sized data.

3. Highlighter (Search and Highlight)

 What it does: You type a word or pick from a list to highlight matching marks.

 When to use:

o When you want to quickly find and highlight marks by name or category.

o Works well for large data sets.

4. Actions (Advanced Highlighting in Tableau Desktop)

 What it does: You set up rules to highlight marks when you click or hover on something else.

 When to use:
o When you want interactive dashboards that respond to clicks.

o Great for detailed, custom highlighting.

Quick Summary Table

Method Easy Description Best For

Select Marks Click marks you want to highlight Small data, manual picking

Legends Click colors or sizes in legend Small to medium data, groups

Highlighter Search or pick from a list Large data, quick searching

Actions Set rules for interactive highlight Interactive dashboards

In short:

 Use Select Marks to pick marks yourself.

 Use Legends to highlight by color or size.

 Use Highlighter to search and highlight quickly.

 Use Actions for interactive, custom highlighting in dashboards.

This makes your Tableau views easier to understand and explore!

3.3.3. Create interactivity using dynamic zone visibility

Absolutely! Here’s an easy, clear explanation of set actions in Tableau:

What are Set Actions in Tableau?

Set actions let users interact with a dashboard or chart by clicking, hovering, or using a menu. When
you do this, Tableau changes what’s in a “set” (a group of data points you define), and updates the
visualization right away.

Why Use Set Actions?

 Make dashboards interactive – Users can click on part of a chart to filter or highlight other
charts.

 Show details on demand – Only show more info when a user selects something.

 Compare groups easily – Select a group to compare it with the rest.

How Do Set Actions Work? (Simple Steps)


1. Create a Set
Pick some data points (like certain products or regions) and make a set.

2. Add a Set Action


Go to the menu (Worksheet or Dashboard > Actions) and choose “Change Set Values.”

3. Choose How It Works


Decide if the action happens when a user clicks, hovers, or uses a menu.

4. Pick What Happens

o Replace, add, or remove values in the set when a user interacts.

o Decide what happens when the selection is cleared (keep, add all, or remove all).

5. Use the Set in Your Viz


Use the set to filter, color, or calculate fields in your chart.

6. Test It Out
Interact with your viz and see how it responds!

Example Use Cases

 Proportional Brushing: Click a bar to highlight related data elsewhere.

 Asymmetric Drill Down: Click a category to drill into just that one.

 Dynamic Coloring: Select countries to adjust the color scale for only those.

 Relative Dates: Click a date to update all related time-based charts.

In short:
Set actions let you make dashboards interactive and dynamic by letting users control what data is
shown, simply by clicking or hovering.

3.3.4. Add navigation buttons

Options for Navigation and Download Objects in Tableau

Navigation and Download objects in Tableau dashboards offer a range of customization options to
enhance interactivity and provide clear visual cues for users. Here’s a detailed breakdown of the
available options and how you can configure them:

Navigation Object Options

 Destination Selection:
Choose where the button navigates by selecting a sheet outside the current dashboard from
the "Navigate to" menu39.

 Button Style:
Select between Text or Image for the button appearance.

o Text: Customize the button label, font, color, size, and formatting349.
o Image: Upload a custom image (e.g., icon or logo) to serve as the button349.

 Tooltip Text:
Add optional explanatory text that appears when users hover over the button. This is
especially helpful for image buttons to clarify their purpose (e.g., “Go to Sales Overview”)34.

 Formatting Options:
Adjust background color, border, and layout (floating or tiled). You can also change the
button’s position and size within the dashboard49.

 Interactivity Note:
When authoring a dashboard, you must Alt-click (Windows) or Option-click (macOS) to
activate the button. In published dashboards, a regular click suffices34.

Download Object Options

 Export Format Selection:


From the "Export to" menu, select the desired file format for download:

o PDF: Export the current view or dashboard as a PDF file123.

o Image: Download the view as a PNG image, reflecting current filters and
selections23.

o PowerPoint: Export selected sheets as images on individual slides in a PowerPoint


file23.

o Crosstab: Export data as a CSV or Excel file, with options to select specific sheets and
columns1235.

 Button Style:
Similar to navigation buttons, choose between Text or Image for the button’s appearance
and customize accordingly35.

 Tooltip Text:
Optionally add a tooltip to clarify the download action (e.g., “Download as PDF”)345.

 Formatting Options:
Customize font, color, background, border, and button layout. You can also adjust the
button’s size and placement on the dashboard45.

 Sheet and Data Selection:


For certain formats (like Crosstab or PowerPoint), specify which sheets and columns to
include in the export. You can also relabel and reorder columns as needed12.

 Interactivity Note:
Download buttons for Crosstab exports are only active after publishing the dashboard; they
may appear grayed out in Tableau Desktop15.

Summary Table: Navigation vs. Download Object Options

Option Type Navigation Object Download Object

Destination/Action Navigate to another sheet/dashboard Export to PDF, Image, PowerPoint,


Option Type Navigation Object Download Object

Crosstab, etc.

Button Style Text or Image (customizable) Text or Image (customizable)

Tooltip Optional explanatory text Optional explanatory text

Font, color, background, border, layout, Font, color, background, border,


Formatting
size layout, size

Data/Sheet
N/A Select sheets/columns for export
Selection

Alt/Option-click in authoring; click when Some formats only active when


Interactivity
published published

Best Practices

 Use clear, descriptive tooltips to guide users, especially for image-based buttons.

 Match button style and placement to your dashboard’s design for a cohesive user
experience.

 Test button functionality after publishing, especially for download actions like Crosstab,
which may not be active in Tableau Desktop.

These options allow you to create intuitive, visually distinct buttons that streamline navigation and
exporting within your Tableau dashboards.

3.3.5. Create interactivity using set and parameter actions

Same as 3.3.3 sets

What Are Parameter Actions in Tableau?

Parameter actions let users interact directly with your Tableau visualizations (like clicking or hovering)
to change the value of a parameter. This makes your dashboards much more interactive and
dynamic.

Why Use Parameter Actions?

 Make dashboards interactive: Users can click on charts to filter or change what they see.

 Display summary statistics: Show things like the average or total for selected data.

 Control reference lines: Let users move a reference line by clicking on the chart.

 Customize views: Users can choose what data or calculation they want to see.

How Do Parameter Actions Work?


1. Create a Parameter: Think of a parameter as a variable or input that can change.

2. (Optional) Use Parameter in a Calculation: You can create a formula that uses the
parameter.

3. Build Your Visualization: Add your chart or table to the dashboard.

4. Add a Parameter Action:

o Go to Worksheet > Actions or Dashboard > Actions.

o Click Add Action > Change Parameter.

o Choose:

 The sheet (chart/table) that triggers the action.

 How the action is triggered (hover, select, or menu).

 The parameter to change and the field to use.

 Aggregation (like sum or average) if users select multiple data points.

5. Test and Adjust: Try it out and tweak settings as needed.

Example Scenarios

 Dynamic Reference Line: Click a point on a line chart and the reference line moves to that
value.

 Selective Hierarchy: Click a fruit type and see only the varieties for that fruit.

 Summary Data: Select several data points and instantly see their average or total.

Key Tips

 The parameter must be used somewhere in your visualization (like in a calculation or


reference line).

 If users can select multiple items, you must choose an aggregation (like sum or average).

 You can control what happens when the selection is cleared (keep the value or reset it).

In Short

Parameter actions make Tableau dashboards much more interactive and user-friendly. They allow
users to control what they see and how they see it, just by clicking or hovering on the data.

3.3.6. Create show/hide buttons for dashboard objects

Show and Hide Objects by Clicking a Button in Dashboards


Show/Hide buttons in dashboard tools like Tableau allow users to toggle the visibility of dashboard
objects-such as filters, charts, or containers-by clicking a button. This feature helps keep dashboards
clean, maximizes space, and makes it easier for viewers to focus on the most important information.

How It Works:

 You can add a Show/Hide button to any dashboard object (like a filter container, chart, or
text box).

 Clicking the button will either reveal or hide the selected object, depending on its current
state.

 The button itself can be customized with different images, text, colors, and tooltips for both
the "shown" and "hidden" states156.

Step-by-Step: Adding a Show/Hide Button

1. Select the Object: Click on the dashboard object you want to show or hide (e.g., a floating
container with filters).

2. Add the Button: From the object’s menu (usually a small dropdown arrow in the corner),
select "Add Show/Hide Button"356.

3. Edit the Button: Customize the button’s appearance for both states (shown/hidden). You can
use images (like an “X” or hamburger icon) or text, and set tooltips for clarity56.

4. Move and Resize: Drag the button to your preferred location and resize it as needed.

5. Test the Button: In dashboard editing mode, you may need to Alt-click (Windows) or Option-
click (Mac) to test the toggle. In published dashboards, a regular click works35.

How Hidden Objects Affect Layouts:

 Floating Objects: When hidden, they simply disappear, revealing whatever is beneath
them16.

 Tiled Objects: Behavior depends on layout:

o If the object is inside a horizontal or vertical container, hidden objects’ space is filled
by the remaining objects, so the layout adjusts smoothly.

o If the object is in the main tiled layout (not inside a container), hiding it leaves a
blank space behind16.

Best Practices:

 Place objects you plan to hide in horizontal or vertical containers for smoother layout
adjustments.

 Use clear tooltips and button labels so viewers know what the button does.

 Name your dashboard objects in the layout pane for easier management when setting up
buttons7.

Common Uses:

 Hide filter panels to free up space for visualizations.


 Toggle between different views (e.g., a bar chart and a detailed table) without cluttering the
dashboard19.

 Show additional information or help text only when needed.

Example:

You have a bar chart and a detailed text table. Instead of showing both at once, you add a Show/Hide
button to the text table. When the button is clicked, the table appears; click again, and it hides,
letting the bar chart take centre stage.

This feature is a simple but powerful way to make dashboards interactive, flexible, and user-friendly.

3.4. Format dashboards

3.4.1. Apply color, font, shapes, styling

: Color Palettes and Effects in Tableau

1. Default Colors

 Every chart or mark in Tableau starts with a default color (usually blue for marks, black for
text).

2. Types of Color Palettes

 Categorical Palettes: Used for fields with distinct categories (like departments). Each
category gets a different color.

 Ordinal Palettes: Used for fields with an order (like dates or numbers). Colors show
progression.

 Quantitative Palettes: Used for continuous values (like sales numbers). Shows a gradient of
colors.

3. How to Change Colors

 Click the color legend or use the "Edit Colors" option.

 Select the item (category or value) you want to change, then pick a new color from the
palette.

 You can also switch to a different palette entirely.

4. Special Color Options

 Diverging Palette: Used for fields with both negative and positive values (e.g., profit/loss).
Shows two color ranges.

 Sequential Palette: Used for fields with only positive or negative values. Shows one color
range.

 Stepped Color: Groups values into bins, each with its own color.

 Reversed: Flips the color order.

 Full Color Range: Makes sure both ends of the value range use the full intensity of colors.
5. Extra Effects

 Opacity: Adjust how transparent the marks are.

 Borders: Add or remove borders around marks for clarity.

 Halos: Add a colored outline to marks to make them stand out on maps.

 Markers: (For line charts) Show or hide points along the line.

6. Resetting Colors

 You can always reset back to the default color settings if needed.

Formatting Fonts in Tableau: Quick Guide

Tableau offers flexible font and text formatting options across Tableau Desktop, Server, and Cloud.
Here’s how you can easily format fonts and text elements:

Tableau Desktop

 To format fonts:

o Go to Format > Font to open the Format Font pane.

o Customize fonts for different text areas:

 Worksheet (overall)

 Pane (data cells)

 Header (row/column headers)

 Tooltip

 Title

 Total Pane / Header

 Grand Total Pane / Header14

 To format text alignment:

o Go to Format > Alignment.

o Options include:

 Horizontal: Left, center, right

 Vertical: Top, middle, bottom

 Direction: Horizontal (default), top-to-bottom, bottom-to-top

 Wrap: Enable/disable header text wrapping14

 To format tooltips:
o Select Worksheet > Tooltip.

o Use the formatting toolbar in the dialog to adjust font, size, style, color, and add
dynamic text via the Insert menu1.

 To edit titles, captions, and legend titles:

o Right-click (or control-click on Mac) the item and select Edit <item>.

o Use the dialog to change font, size, style, color, and alignment. Use the Insert menu
for dynamic text1.

Tableau Server or Tableau Cloud

 To format fonts:

o Select Format and choose the element (Title, Caption, Legends, Filters, Sets,
Highlighters, Parameters).

o You can also clear all worksheet formatting from the Format menu1.

 To edit titles or captions:

o Double-click the item to open the edit dialog and adjust font and style1.

Workbook-Level Formatting

 To apply font changes across the entire workbook:

o Go to Format > Workbook.

o Use the Format Workbook pane to set default fonts for all views, titles, and
dashboards.

o Note: Workbook-level font changes override worksheet-level font settings2.

Font Recommendations

 Default Tableau font: Benton Sans (12pt on Mac, 10pt on Windows)

 Recommended alternatives: Helvetica, Arial, Open Sans, Segoe UI, San Francisco, Helvetica
Neue, Lucida Grande8.

Additional Tips

 Formatting individual controls: Right-click the control (e.g., filter or parameter), select
Format, and adjust font, style, color, and background5.

 Resetting to default: Use the Reset option in the title or caption dialog to revert to default
formatting1.
Summary:
Tableau provides intuitive menus for formatting fonts and alignment in both Desktop and
Server/Cloud environments. You can target specific worksheet elements or apply changes across the
entire workbook, ensuring your visualizations are both clear and visually appealing124.

To change the shape of marks in Tableau, follow these simple steps:

1. Drag a field (usually a dimension) from the Data pane to the Shape button on the Marks
card. This assigns different shapes to each member of that field.

2. To change the shapes, click Shape on the Marks card or the shape legend, then choose new
shapes from the palette. You can pick from default shapes or select a different palette.

3. To use your own shapes, add image files (like PNG or JPG) to a new folder inside the Shapes
folder in your Tableau Repository (Documents folder). Then, in Tableau, select your custom
palette from the Shape menu.

4. You can assign shapes manually or click Assign Palette to apply shapes automatically.

5. Adjust the size of shapes using the Size option on the Marks card.

styling in Tableau:

 Change fonts, colors, and sizes to make your dashboard clear and attractive.

 Use consistent colors and fonts throughout your dashboard for a professional look,

 Add borders, background colors, and padding to separate and highlight items.

 Keep your dashboard simple-show only the most important information and avoid clutter.

 Use containers to neatly arrange charts and filters on your dashboard.

 Add clear titles and labels to help users understand your visuals.

 Turn off unnecessary gridlines and dividers for a cleaner appearance.

 Use tooltips to give extra information when users hover over data points

 Stick to intuitive colors (like red for down, green for up) to make trends easy to spot.

 Create and follow a style guide or template to save time and keep everything consistent.

3.4.2. Add custom shapes and color palettes

How to Use Custom Shapes in Tableau

Adding custom shapes in Tableau allows you to enhance your data visualizations with icons or images
that are meaningful to your analysis. Here’s a straightforward, step-by-step guide:

1. Prepare Your Shape Image Files

 Create or download the images you want to use as shapes.

 Each shape should be saved as its own file.

 Supported formats include: .png, .gif, .jpg, .bmp, and .tiff (note: .emf is not supported)76.
 For best results, use images with transparent backgrounds (PNG is preferred for smooth
transparency)67.

2. Add Shape Files to Your Tableau Repository

 Navigate to your Documents folder and open “My Tableau Repository.”

 Inside, find the “Shapes” folder.

 Create a new subfolder (e.g., “My Custom Shapes”). The folder name will become the palette
name in Tableau769.

 Copy your shape files into this new folder.

3. Use Custom Shapes in Tableau

 In Tableau, build your visualization and set the Mark type to “Shape.”

 Click on the Shape legend, then select “Edit Shape.”

 In the dialog, choose your custom palette (the folder you created).

 If your shapes don’t appear, click “Reload Shapes” or restart Tableau456.

 Assign shapes to your data categories either one by one or by clicking “Assign Palette” to
automatically assign them7.

4. Tips for Best Results

 Suggested image size: around 32x32 pixels, unless you plan to use larger icons7.

 Minimize extra transparent space around your image to improve hover/click behavior7.

 Use transparent backgrounds if you plan to use color encoding in Tableau76.

 You can resize shapes in Tableau using the Size slider on the Marks card76.

5. Sharing and Compatibility

 When you use custom shapes, they are saved with the workbook, so your visualizations can
be shared and viewed by others even if they don’t have your custom shapes installed7.

Summary Table: Key Steps

Step Action

Prepare images Create/download, save each as .png, .gif, .jpg, .bmp, or .tiff

Add to repository Copy images to a new folder in Documents\My Tableau Repository\Shapes

Use in Tableau Set Mark type to Shape, Edit Shape, select your custom palette, assign shapes

Troubleshooting Click Reload Shapes or restart Tableau if shapes don’t appear

Types of Color Palettes


 Categorical Palettes: Used for fields with distinct categories (like departments). Each
category gets a different color.

 Ordinal Palettes: Used for fields with an order (like dates or numbers). Colors show
progression.

 Quantitative Palettes: Used for continuous values (like sales numbers). Shows a gradient of
colors.

3. How to Change Colors

 Click the color legend or use the "Edit Colors" option.

 Select the item (category or value) you want to change, then pick a new color from the
palette.

 You can also switch to a different palette entirely.

4. Special Color Options

 Diverging Palette: Used for fields with both negative and positive values (e.g., profit/loss).
Shows two color ranges.

 Sequential Palette: Used for fields with only positive or negative values. Shows one color
range.

 Stepped Color: Groups values into bins, each with its own color.

 Reversed: Flips the color order.

 Full Color Range: Makes sure both ends of the value range use the full intensity of colors.

5. Extra Effects

 Opacity: Adjust how transparent the marks are.

 Borders: Add or remove borders around marks for clarity.

 Halos: Add a colored outline to marks to make them stand out on maps.

 Markers: (For line charts) Show or hide points along the line.

6. Resetting Colors

 You can always reset back to the default color settings if needed.

3.4.3. Add annotations

Adding Annotations in Tableau Desktop

Annotations in Tableau Desktop are used to highlight or explain specific data points, areas, or trends
in your visualizations. Here’s how you can add, edit, format, and remove annotations:

Types of Annotations

Tableau offers three types of annotations:


 Mark Annotation: Tied to a specific data mark (e.g., a bar, point, or line on your chart). This
option is only available when a data point is selected.

 Point Annotation: Used to annotate a specific point in the view, not necessarily tied to a data
mark.

 Area Annotation: Used to annotate a broader area, such as a cluster of marks or a region on
a map18910.

How to Add an Annotation

1. Right-click (or Control-click on Mac) a data point or area in your worksheet where you want
to add the annotation.

2. Select Annotate, then choose the annotation type: Mark, Point, or Area.

3. In the Edit Annotation dialog box, enter your annotation text.

o Use the Insert menu to add dynamic variables (e.g., data values that update with
changes in the underlying data).

4. Click OK. The annotation will appear on your visualization1810.

Editing and Rearranging Annotations

 To edit an annotation, right-click (Control-click on Mac) the annotation and select Edit.
Update the text as needed and click OK1810.

 To move or resize an annotation, simply click and drag the annotation or its handles. You can
also adjust the annotation line or text box as needed18.

Formatting Annotations

 Right-click (Control-click on Mac) the annotation and select Format.

 The Format pane will open, allowing you to adjust:

o Font properties

o Text alignment

o Line style (e.g., arrow, dot, or line)

o Shading and borders

 You can format multiple annotations at once by selecting them together and using the
Format pane179.

Removing Annotations

 Select the annotation(s), right-click (Control-click on Mac), and choose Remove1810.


Simple Steps Summary

 Right-click on your viz → Annotate → Choose type (Mark, Point, Area)

 Edit the annotation text and insert dynamic values if needed

 Format and move annotations for clarity and emphasis

 Remove annotations as needed

3.4.4. Add tooltips

You might also like