Innovative Tableau 100 More Tips, Tutorials, and Strategies Ryan Sleeper Innovative Tableau 100 More Tips, Tutorials, and Strategies Ryan Sleeper BBeeiijjiinngg BBoossttoonn FFaarrnnhhaamm SSeebbaassttooppooll TTookkyyoo Innovative Tableau by Ryan Sleeper Copyright © 2020 Playfair Data. All rights reserved. Printed in the United States of America. Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472. O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions are also available for most titles (http://oreilly.com). For more information, contact our corporate/institutional sales department: 800-998-9938 or [email protected]. Acquisitions Editor: Jonathan Hassell Indexer: Judith McConville Development Editor: Angela Rufino Interior Designer: David Futato Production Editor: Katherine Tozer Cover Designer: Karen Montgomery Copyeditor: Octal Publishing, LLC Illustrator: Rebecca Demarest Proofreader: Piper Editorial May 2020: First Edition Revision History for the First Edition 2020-04-24: First Release 2021-05-14: Second Release See http://oreilly.com/catalog/errata.csp?isbn=9781492075653 for release details. The O’Reilly logo is a registered trademark of O’Reilly Media, Inc. Innovative Tableau, the cover image, and related trade dress are trademarks of O’Reilly Media, Inc. The views expressed in this work are those of the author, and do not represent the publisher’s views. While the publisher and the author have used good faith efforts to ensure that the information and instructions contained in this work are accurate, the publisher and the author disclaim all responsibility for errors or omissions, including without limitation responsibility for damages resulting from the use of or reliance on this work. Use of the information and instructions contained in this work is at your own risk. If any code samples or other technology this work contains or describes is subject to open source licenses or the intellectual property rights of others, it is your responsibility to ensure that your use thereof complies with such licenses and/or rights. 978-1-492-07565-3 [MBP] Table of Contents Preface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii Part I. Introduction/What’s New 1. How to Learn Tableau. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Read 1 Introducing Playfair Data TV 1 Jump into the Community 2 Attend a Live Training 3 Practice with Tableau Public 3 2. Parameter Actions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 How to Use Tableau Parameter Actions 4 3. Set Actions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 How to Use Tableau Set Actions 9 4. Button Dashboard Object. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 How to Use the Button Dashboard Object in Tableau 19 5. Transparent Sheets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 How to Make Worksheet Backgrounds Transparent 25 How to Make Map Backgrounds Transparent 29 6. Show/Hide Button on Layout Containers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 How to Toggle Layout Containers On and Off 31 7. New Mapping Capabilities. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 8. Explain Data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 iii 9. Viz in Tooltip. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 How to Add a Visualization to a Tooltip 48 10. Tableau Extensions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 Part II. More Chart Types 11. Chart Types Introduction: Going Beyond Show Me. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 Going Beyond Show Me with the Authoring Interface Canvas and Chart Type Categories 55 12. The Data-Ink Ratio and How to Apply It in Tableau. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 Ideas for Improving the Data-Ink Ratio of Tableau Visualizations 57 Step 1: Erase Non-Data Ink 58 Step 2: Erase Redundant Data Ink 61 Step 3: Revise and Edit 62 13. 3 Ways to Make Charming Crosstabs: Tip 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 How to Make Flexible Text Tables with Limitless Columns 63 14. 3 Ways to Make Charming Crosstabs: Tip 2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 How to Make Custom Tableau Table Headers 66 15. 3 Ways to Make Charming Crosstabs: Tip 3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 How to Align Text with Precision 70 16. 3 Ways to Make Handsome Highlight Tables: Tip 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 How to Make a Highlight Table in Tableau 72 How to Format Marks for a Highlight Table 74 17. 3 Ways to Make Handsome Highlight Tables: Tip 2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 Use Colors in Moderation 75 18. 3 Ways to Make Handsome Highlight Tables: Tip 3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 Color Cells Based on a Discrete Segmentation 77 19. 3 Ways to Use Dual-Axis Combination Charts: Tip 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 Two Ways to Make Dual-Axis Combo Charts 82 20. 3 Ways to Use Dual-Axis Combination Charts: Tip 2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 Use a Dual-Axis Combination Chart to Make Your User Part of the Story 87 iv | Table of Contents 21. 3 Ways to Use Dual-Axis Combination Charts: Tip 3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 Improving the Design of a Line Graph 90 22. 3 Ways to Make Stunning Scatter Plots: Tip 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 How to Make a Scatter Plot in Tableau 92 A Formatting Trick for Better Mark Borders 94 23. 3 Ways to Make Stunning Scatter Plots: Tip 2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 How to Automate Scatter Plot Segmentation 97 24. 3 Ways to Make Stunning Scatter Plots: Tip 3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 How to Make Connected Scatter Plots 103 25. 3 Ways to Make Splendid Slope Graphs: Tip 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 How to Make Slope Graphs in Tableau 111 How to Make Slope Graphs Dynamic Based on a Date Range Filter 114 26. 3 Ways to Make Splendid Slope Graphs: Tip 2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 How to Add a Slope Graph/Line Graph Toggle 116 27. 3 Ways to Make Splendid Slope Graphs: Tip 3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119 How to Add Vertical Lines to Connect Slope Graphs 119 28. 3 Ways to Make Magnificent Maps: Tip 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125 How to Make Hub-and-Spoke Maps in Tableau 125 29. 3 Ways to Make Magnificent Maps: Tip 2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132 How to Make Maps with Custom Territories 132 30. 3 Ways to Make Magnificent Maps: Tip 3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137 Combine Generated and Custom Lat-Long Coordinates 137 31. How to Make a Custom Geographic Map. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142 How to Map a Background Image to Create a Custom Geographic Map in Tableau 142 32. How to Make Trellis/Tile/Small Multiple Maps. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149 How to Make Trellis Maps with Automated Grids 150 How to Make Trellis Maps with Manual Grids 155 33. How to Make a Timeline. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161 How to Create a Timeline of Key Events in Tableau 161 Table of Contents | v How to Display a Reference Line for the Current Date 165 34. How to Make a Diverging Bar Chart. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168 How to Make Positive Values Diverge Left 168 Making a Diverging Bar Chart on a Single Sheet 171 35. How to Make Marginal Histograms. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177 How to Add Histograms to the Margins of Scatter Plots 177 How to Make Marginal Bar Charts in Tableau 183 36. How to Make Unit Histograms/Wilkinson Dot Plots. . . . . . . . . . . . . . . . . . . . . . . . . . . . 185 How to Stack Marks to Create Unit Histograms in Tableau 185 37. How to Make a Dual-Axis Waterfall Chart. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193 How to Use Running Total to Create a Waterfall Chart in Tableau 193 38. How to Make Performance Indicator Titles. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203 How to Directly Communicate Performance in Chart Titles 203 39. How to Create Performance Indicator Titles with Comparison Score. . . . . . . . . . . . . . 207 How to Create a Current Versus Comparison Index Callout in Tableau 207 An Alternative Current Versus Comparison Index Callout in Tableau 211 40. How to Highlight a Dimension Member on a Minimalist Dot Plot. . . . . . . . . . . . . . . . 214 How to Make a Minimalist Dot Plot in Tableau 214 How to Highlight a Dimension Member Throughout Dot Plots 217 41. 3 Ways to Make Gorgeous Gauges: Tip 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219 How to Make Rounded Gauges 220 42. 3 Ways to Make Gorgeous Gauges: Tip 2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230 How to Make Gauges with a Custom Background Image 230 43. 3 Ways to Make Gorgeous Gauges: Tip 3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238 How to Make a Stock Ticker Gauge 238 44. How to Make Ranged Dot Plots in Tableau. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245 How to Make a Dot Plot with a Performance Range for Each Dimension Member 245 vi | Table of Contents 45. Introducing Leapfrog Charts in Tableau. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253 How to Combine Dot Plots, Gantt Marks, and Table Calculations to Create Leapfrog Charts 253 46. How to Let Users Choose Between Chart Types. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268 How to Change Charts Using a Parameter Control 268 How to Change Chart Selections with Layout Containers 275 Part III. Author Experience 47. 3 Innovative Ways to Use Text: Tip 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283 How to Install Custom Fonts 283 48. 3 Innovative Ways to Use Text: Tip 2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285 How to Conditionally Format Text 285 49. 3 Innovative Ways to Use Text: Tip 3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288 Format Text Tables Like Finance Reports 288 50. How to Deduplicate Joined Rows. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291 The Challenge of Working with Joined Data Sources in Tableau 291 How to Deduplicate Joined Rows Using Tableau’s LOD Expressions 293 How to Deduplicate Using a Row ID Field 294 How to Deduplicate Using LODs with More Than One Dimension 297 51. How to Pass Parameters and Filters Between Workbooks. . . . . . . . . . . . . . . . . . . . . . 301 How to Pass Fields Between Workbooks Using Query Strings 301 52. 3 Innovative Ways to Use Dates: Tip 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306 How to Equalize Dates Using the MAKEDATE Function 306 The Challenge of Not Having a Month + Day Date Part in Tableau 306 Equalizing Year-Over-Year Dates on the Same Axis Using the MAKEDATE Function 307 53. 3 Innovative Ways to Use Dates: Tip 2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309 How to Normalize Current Dates and Prior Dates on One Axis 309 How to Equalize a Selected Date Range with a Prior Date Range on One Axis in Tableau 309 54. 3 Innovative Ways to Use Dates: Tip 3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317 How to Make Better Relative Date Filters 317 Table of Contents | vii How to Create Flexible and User-Friendly Relative Date Filters in Tableau 317 How to Allow Users to Select the Relative Date Range 320 Combine This Relative Date Filtering with Parameter Actions for a Better User Experience 323 More Ways to Use These Better Relative Date Filters 326 55. 3 Innovative Ways to Use Tooltips: Tip 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329 How to Add an Image to a Tooltip 329 56. 3 Innovative Ways to Use Tooltips: Tip 2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336 How to Add a Tooltip to a Dimension 336 57. 3 Innovative Ways to Use Tooltips: Tip 3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344 How to Make Dynamic Tooltips 344 58. How to Use INDEX() for Easier Top N Filters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348 How to Create More Predictable, Flexible Top N Filters 348 59. How to Dynamically Display the Top N Versus Other. . . . . . . . . . . . . . . . . . . . . . . . . . . 353 How to Group the Top N and Everything Else with Parameters and Sets 353 60. 3 Ways to Use the Describe Feature. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358 Using Describe to Save Processing Time 358 A Method of Reverse-Engineering 359 Calculated Field Writing 361 61. 3 Ways to Use Tableau in the Flow. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363 How to Reverse-Engineer Table Calculations 363 How to Update Calculations on the Fly 366 How to Save Updated Calculations for Future Use 370 62. How to Make a Signature Line with Data Status Alert. . . . . . . . . . . . . . . . . . . . . . . . . . 371 How to Automatically Detect Whether Data Is Up-to-Date 371 63. How to Improve Your Dashboard Design with White Space. . . . . . . . . . . . . . . . . . . . . 376 What Is White Space in Data Visualization? 376 Sketch Out the Dashboard Dimensions in Advance 378 Take Advantage of the Padding Options on the Layout Pane 380 Use a Blank Dashboard Object 381 viii | Table of Contents