Interactive Text Tables with Custom Sort Order

Make your text tables on dashboards shine with an easy, interactive, custom sort order feature. 

The concept is simple: give your dashboard viewers a handy-dandy drop-down menu so they can sort their table with the rows of most importance to them at the top.  I deployed this technique on my Help Desk Dashboard – click here to see it in action.

Begin by building your text table and determining the various ways in which the table can be sorted. For my Help Desk Dashboard, I chose Ticket Priority, # of Days Open, and Ticket Number. I also wanted to be sure the table always defaulted to show the rows by Ticket Number when the workbook is opened. Once you’ve established these values, you can create a calculation to set the default value and a parameter with the list of sort options.

Note the Default Sort Order calculation appears in the “Value when workbook opens” spot in the parameter.

Once the parameter is created, you can show the parameter and take a sneak peak at the appearance of the toggle.  

Looks good! We are now ready for our next step, which requires us to use this parameter in a calculation.  A CASE statement works beautifully in this step. 

With this calculation, we are asking Tableau to do the following:

When the toggle is set to Priority, Tableau will check the Priority ID and sort by this value. For your reference, the Priority ID in this dataset assigns High Priority the value of 20, Medium is 30, and Low is 40. For the rows to be listed from High to Low, we will want to use this calculation in Ascending Order: 20-30-40  (Tuck away that thought for later!)

When the toggle is set to # of Days Open, we want Tableau to reference a calculation by the same name that counts the difference in days between Created Date and Closed Date, or in the case of tickets still open, the difference between Created Date and Today. Now, recall that we will be using this calculation in Ascending Order per the note above regarding Priority. This means we must place a negative sign in front of # of Days Open in order for the tickets with the longest # of days open to appear at the top. For example, if a ticket has been opened for 35 days, it will appear above a ticket that has only been opened for 2 days if we assign it a negative value (ascending order is -35 then -2). 

And last but not least, when the toggle is set to Ticket Number, we want Tableau to return a 0. Why? We built our text table with Ticket Number as the first value on the Rows shelf, so Tableau will use this value to sort the orders because our Sort Order calculation assigns a 0 to all rows in this setting.

Last but not least, we need to activate this calculation by accessing the drop-down from the Ticket Number field on the rows shelf > Sort and follow the prompts to select the Sort Order field and Ascending order. 

So there you have it – with a couple of calculations and one parameter, you can add interactivity to your text table and give the dashboard viewer the control to see the rows of data in the order most relevant to them! 

Feel free to download my viz on Tableau Public and take a look under the hood! 

Happy Vizzing! 

Dashboard toggles made easy with Tableau’s Single Checkbox Parameter Dashboard Extension

Toggle buttons are a great way to add interactivity to a dashboard, and Tableau’s Single Checkbox Parameter dashboard extension is a quick & easy way to do so! 

A few months ago, I came across a twitter post by Fredrick Frey that referenced this technique, which inspired me to give it a try. You can check out Fredrick’s ‘Fix the Bruce!, Australia’s most dangerous road’ viz here.

This got me thinking: if this dashboard extension is new to me, it may be new to others as well. And with that idea, a blog post was born! 

Before we jump into the “how-to” part of this blog post, there are two things you should know. 

First, a note about the name. “Single Checkbox Parameter” is slightly misleading. It can be a checkbox, but it can also be displayed as a toggle button as shown in Fredrick’s viz and the method I chose for my viz as well. The key point to emphasize is that this extension allows for single selection only, meaning only one item can be true at any given time.

Second, you may be wondering what exactly are dashboard extensions anyway??? Dashboard extensions allow you to add features to a dashboard as you would add standard objects to a dashboard, and can be found in the left bottom corner of the Dashboard pane, under “Objects’.

When you drag the Extension object on to a dashboard, a dialog box appears. I used the search box to find the Single Checkbox Parameters extension. Click on this item and follow the prompts to add it to your dashboard.  

In the case of the Single Checkbox Parameter, you will need a parameter set up before adding the extension to your dashboard. Let’s take a closer look at how I did this for my Ohtani vs Top Home Run Hitters viz. For this dashboard, I wanted the audience to have the ability to show or hide the Top 40 Club. To do this, I created a parameter [Show 40-40 Club?] with a string data type and a specific List of Allowable Values. You’ll notice in this screenshot the first item in my list is actually a space, instead of ‘Show 40-40’. I used a blank space to accommodate formatting choices later on in the design process. 

Next, I used this parameter in a calculated field, and placed this calculation on the Filter Shelf set to Show.

With these items in place, I was now ready to add this sheet to my dashboard, along with the Single Checkbox Parameter extension object. Following the prompts, Tableau will ask you to confirm the parameter you wish to use.

Tableau also provides you with some options to customize the appearance of the extension. This is where you will find the option to choose between the checkbox or the toggle. I chose to display the parameter name, toggle style, and selected a white background with grey text color.

Presto! A toggle button that adds interactivity without having to create a custom shape or image.

Feel free to download my workbook if you’re interested in reverse engineering this solution. If you are curious to learn more about dashboard extensions, you can check out this page on Tableau’s website or this blog post by Ewald Hofman and Wilson Po.

Happy Vizzing! 

L-Shaped Bars: Fresh take on bar charts

Drumroll, please….! Introducing L-Shaped Bars! 

Inspired by a viz I saw on Tableau’s Exchange (the Salesforce Admin Insights Accelerator), I decided to take a stab at building what has affectionately become known as L-Shaped bars.   It’s a clever way to address the issue of labels overlapping labels, and delivers the same punch as a regular bar chart with less ink. It’s also a great space-saver since you don’t need space on the side or top of the bar for the long string name.

Problem: Labels overlapping labels with long string names

Solution: L-Shaped bars with a measure label at the end of the L, and the string name in the corner of the L

Pretty neat, eh? Feel free to download this solution from my Tableau Public profile and reverse-engineer for your purposes. To get you started, here are a few key tips:

Tips to building L-Shaped Bars:

Tip #1: Use Measure Names and Measure Values!  Also, make sure Measure Names is placed on the row shelf.

Tip #2: Set the Line Path style to Step.

Tip #3: To add the second set of labels, place a copy of Max(0) calculation on the Columns shelf (copy it from the Measure Values Shelf) to generate the dual-axis. Don’t forget to synchronize the axis! This mark type could be a line, circle, or gantt – at a later step you can adjust the size & color so that it looks seamless with the first line.  If you use a new max(0) instead of a copy, it will generate a 3rd measure name and force the label to be placed below the L-Shaped bar. 

Tip #4: Be sure to “shrink up the rows” to tuck the labels into the corner of the L-Shape. This can be done by hovering your cursor on the line between Max(0) and Count of Orders and dragging the line up slightly.

Tip #5: For the blue pills on the row shelf, uncheck Show Header to hide these from the view. 

Happy to answer any questions you may have – you can message me on LinkedIn or X (formerly Twitter). Happy Vizzing! 

Build Your Own Crosstab: from concept to final build

My “Build Your Own Crosstab” Dashboard empowers Tableau Viewers to customize their experience by selecting and arranging the columns in their crosstab, based on their preferences. The inspiration for this dashboard came from hearing a user express frustration over not being able to reorder columns. This feedback made me pause and ask: Could this be possible? Read on to discover how this idea transformed into a fully functional solution.

Step 1: Pen & Paper

This dashboard began with one of my go-to techniques: pen and paper sketching. It’s not only essential for designing the layout but also for working through the technical aspects. In this case, I knew I wanted to incorporate parameters, parameter actions, and dynamic zone visibility. Figuring out how all these elements would interact took some serious brainstorming—and plenty of doodling!  Here are some examples of my early sketches: 

Step 2: Building in Tableau

With my wireframe sketches and notes at hand, I turned to Tableau. Once connected to Superstore data, I began building out the parameters and calculations I would need to run the dashboard. I built the necessary sheets, began the dashboard build (Horizontal and Vertical containers are key for this one!), and got to work on implementing dynamic zone visibility and parameter actions. 

Step 3: Solicit Feedback

With a working prototype ready, it was time to ask for feedback. I published the dashboard to Tableau Public as a hidden viz, and shared the link with trusted colleagues in the #DataFam. I also brought the concept to #VizOfficeHours, held once a week by Michelle Frayman, Nicole Klassen, and Zak Geis. Having a fresh set of eyes helped me gauge the intuitiveness & functionality. With a few minor tweaks I was able to incorporate the feedback and switched the viz’s visibility from hidden to “Show Viz on Profile”. 

If you’d like to take the dashboard for a test drive, you can find it on my Tableau Public profile. When you explore it, you’ll notice two key features: the Date field is mandatory (with no option for “no selection”), and all values appear on every row rather than being nested by column 1, as in a traditional Tableau crosstab. These were intentional design choices I set at the start of the project. Since this is a prototype, not built to spec, I established these requirements to give myself a clear framework to work within.

Happy Vizzing!

The ‘help’ behind the Help Desk Dashboard

As a data visualization consultant, having proof-of-concept dashboards is essential for discussing the types of visualizations we want—or, more importantly, don’t want—when starting a new project. The biggest challenge, however, is finding a clean, anonymized dataset to build these demo dashboards. That’s where Tableau Community Projects, like RealWorldFakeData (RWFD), come in handy. RWFD is a treasure trove of business-related datasets.  A more recent initiative, Adam Mico’s Data Mockstar, is incredibly useful as well. This ChatGPT tool allows you to specify the desired columns and it returns a dataset of randomly generated data. For my Help Desk Dashboard, I decided to take Data Mockstar for a test drive. With just a few clicks and the following prompt, I had a mock dataset in csv format ready to use for my demo dashboard.

Brilliant! I connected Tableau Desktop to the csv file provided by Data Mockstar and began an initial data discovery to determine the best way to visualize the data (hello, bar charts). Early in the process, I realized that the analysis relies heavily on date fields—specifically, Ticket Created Date and Ticket Closed Date. The mock dataset contains two years of daily data (2023 and 2024, per my specifications), which is fine for now. However, to future-proof this dashboard, I needed to shift the rows of data so that it always includes two years up to and including today, rather than a fixed period from January 1, 2023, to December 31, 2024. Shoutout to Andy Kriebel, whose Next-Level Tableau Program inspired the set of calculations needed to perpetually shift the dates. 

The end result? A dynamic dashboard that appears to update “live” even though the data source is a flat file generated once. You can find the dashboard on my Tableau Public profile page—feel free to download it and take a look under the hood!

Happy Vizzing! 

Tableau Tip: Hide the Subtotals

Today’s Tableau Tip comes via WorkoutWednesday – my go-to resource for keeping my Tableau skills topnotch. Without fail, each WOW challenge uncovers a tip or trick, and often there is a practical use-case for those tricks in my daily work.   WOW 2023 Week 39 is the perfect example.  Read on to find out more!

Tables are requested frequently on business dashboards, so I’m always looking for fresh design & format ideas to present the rows of data in a clutter-free way.   In the WOW challenge from Week 39, the requirements called for a column showing $ of sales per subcategory & region with subtotals, and the % of sales by subcategory & region without sub-totals.  Brilliant!  The % subtotal will always be 100%,  so no need to show it every time.  With a little investigating, I found the option to “hide” the subtotals for a single measure in the drop-down menu on the green pill. This allows the subtotal to show for the first measure, and a blank cell to be shown for the second measure.  Here’s a screenshot to illustrate:

The end result is a clean, clutter-free table, with plenty of whitespace to help direct the eye to the numbers of significance.

The tip I’ve outlined in this post is just one of many gems in Week 39’s Challenge. To check out the full solution, see my Tableau Public viz. Shoutout to the WOW Team for continuing to deliver relevant challenges – the #datafam appreciates you!

Happy Vizzing, folks!

Proudly powered by WordPress | Theme: Baskerville 2 by Anders Noren.

Up ↑