Three Tips to Improve Tableau Dashboard Design

Data drives everything, and it’s invaluable when it comes to making effective and informed decisions in your work. The way that data is communicated is crucial, and the functionality and design of a dashboard can either reinforce the data story you’re telling or undermine and complicate it. In this video, InterWorks Experience Consultant David Duncan shares some quick and easy tips for cleaning up the appearance of your Tableau dashboard.

Practical Resources to Boost Dashboard Design

Some resources that can help you further enhance the design of your dashboards are listed below:

Looking for more customized guidance when it comes to making the most of your dashboard design? Reach out to our team, and let’s get started.

Contact Us

The post Three Tips to Improve Tableau Dashboard Design appeared first on InterWorks.

InterWorks

Improving the Sheet-Swapping UX with Parameter Actions in Tableau: Part 1

During a recent Google search for elegant dashboards, I discovered a great example from Sharon Faber. I really like how Sharon incorporated icons that users can select to change the chart type. This gives users options without wasting space. Rather than burying alternative displays further down the page or on another tab, all the options are right there in the first view. Simple, elegant design.

I wanted to mimic that user experience in Tableau. Thanks to an old technique (sheet-swapping) and a new feature (parameter actions), it’s now possible. In this post, I’ll walk you through the steps I used to do it, but first, here’s a look at where we’re going:

Before I dive into steps, let me give you some background on the two techniques we’ll be using. Sheet swapping involves using a parameter to let users pick which sheet they want to display. If you’ve never done sheet swapping, the Data School has an excellent step-by-step guide. While the basic method of interacting with a parameter (picking something from a drop-down menu) is fine, sometimes users overlook drop-down filters, and you don’t have much control over the way they display. So, we’ll take things a bit further and replace the traditional drop-down with selectable icons.

Elevating Sheet Swapping with Parameter Actions

In order to make that magic happen, we’ll need to use a parameter action as well. At the most basic level, parameter actions allow users to change the value of a parameter by selecting something in a dashboard. Kevin Flerlage has an excellent article exploring many ways to use parameter actions, including this chart-changing use case, but I’ll go into a little more detail about formatting it for a good user experience.

In order to execute this slightly more polished form of sheet swapping, you’ll just need a parameter with the options for your different sheets and a field with values that match the options in your parameter. In my case, I’m using the parameter to show three different views of the same data, so I set up a parameter with my three chart types, though you can certainly add more options if you’d like:

Then I created a separate data source in Excel with a Chart Value field that matched my parameter values (the values are case sensitive, so be sure to match your capitalization). The Chart Title column is just there to add some formatting to the label:

If you’re thinking, “Separate data source?! This is getting complicated,” no need to fear. The great thing about parameter actions is that they work across data sources, so we won’t need to worry about blending or joining to the rest of our data. So, add that Excel sheet as a separate data source. Now that we’ve got data values that connect to our parameter, we just need to build a few sheets before we can set up our parameter action.

First, build a sheet with icons (I found mine on Flaticon) for each chart type. Set your rows with your Chart Value field, sort them in the order you want, change your mark type to Shape, and add that same field to Shape on your Marks card. Assuming you’ve already added your icons to your Tableau repository, you can assign them to your different chart type values:

I duplicated this sheet and swapped in my Chart Title field because I was having trouble aligning the text with the icons when I tried to put them on the same sheet. If you’re not a formatting freak—which, if you’re reading this article, you probably are—you can ignore this and just add a label to your previous sheet:

Next, create a field to add color to indicate which chart type the user has selected. Here’s where we start to connect our data with our parameter. This field just distinguishes whichever chart is selected from the two non-selected charts:

Drop that field on Color and pick your colors. I also put that field on Size for the chart title sheet to give the selected chart text a little extra emphasis. Here’s what we’ve got so far:

Now, let’s get to what we set out to do in the first place: getting rid of that drop-down menu. We can set up a dashboard action to control our parameter when we click on a chart icon. From the Dashboard menu, select Actions, click the Add Action button, then choose Change Parameter. On the next screen, choose the sheets you want to click on to change the chart type (I’m including both the Chart Icons and Chart Titles sheets so that users can click on either one), and target your Chart Type Parameter with your Chart Value field:

Now when users click on, for example, the Bar Chart icon or title, it will pass the value Bar Chart to our parameter, changing our parameter selection to Bar Chart and swapping in the bar chart view:

Although it’s a little extra work to set this up, I think the icons provide a more intuitive user experience. Feel free to explore this dashboard on Tableau Public, and if you want to take things a step further and add a side bar to further emphasize your selection and eliminate the black outline Tableau adds to your selected icon, stay tuned for the second part of this blog.

The post Improving the Sheet-Swapping UX with Parameter Actions in Tableau: Part 1 appeared first on InterWorks.

InterWorks

Portals for Tableau New Feature Spotlight: Localization Support

While InterWorks started in the heart of the United States of America, we’ve long since become an international company. Until now, the portal has been very US-centric. With English being the de facto language of business around the world, maybe it’s not overly apparent. However, it does become more noticeable when you see so-called freedom-words like “color” and “favorite” instead of the metric system’s “colour” and “favourite” variants popular in other regions of the globe.

Altering the Default Locale

With a simple setting, the portal can now easily be switched into un-American mode. Navigate to Backend > Settings > Portal Settings > General tab, change the Locale setting to English (United Kingdom), and click on the save button at the bottom of the screen. Next, clear your portal’s cache by clicking on the respective icon at the top-right corner of your portal’s backend. After that, all references to colors or favorites will be decorated an extra “u”:

Currently, the portal’s built-in localization support is still limited to these two variants of the English language. However, this is only the first step in global domination language support. Expect to see the ability to switch the portal into other languages in the future.

The post Portals for Tableau New Feature Spotlight: Localization Support appeared first on InterWorks.

InterWorks

Demystifying how to Deselect Buttons in Tableau

Tableau’s default behaviour is that when you click a data point, it stays selected. This is intuitive behaviour and makes total sense when a click has driven a filter on a dashboard.

However, given the size and creativity of the Tableau community, clicking a data point has been used in countless other ways. Sometimes, you simply don’t want it to remain selected, i.e. when using a sheet to clear the filters on a dashboard. There have been workarounds for this from the simple “Please double-click” to the brilliant, never-ending pages of Josh Milligan.

New features are constantly included into the Tableau suite—one of the reasons we all love the tool—and a recent (v2019.2) powerful change is the ability to update a parameter using an action. Previously, parameters were static user-driven pieces of information; incredibly powerful but static.  Now, they have been given a new lease on life with the addition of parameter actions.

The Power of Parameter Actions

If you haven’t played with them, I’d highly recommend it. Why not try this simple technique to deselect a button as a starter?

Here’s an example of it in action. I’ve left in the default behaviour, so you can see the difference:

This technique works on the principle that a data point only stays selected if it still exists. If the data point disappears, or (in this case) is replaced by another, it loses its selected status. Here, we build a field which toggles odd to even on each click:

1. Create a parameter called Counter with type integer:

2. Create a calculated field to check whether the counter is odd or even:

Okay, strictly speaking, this doesn’t exactly check to see if it is odd or even. Using modulus %2 does, however, return a 0 when the number is even and 1 when it is odd.

3. Create a calculated field called Counter +1:

4. Add the Counter Even/Odd calculation onto Rows (discrete and to the left), and hide the header if desired. Next, add Counter +1 onto Detail as an average:

Note: You can use the odd/even as a ATTR() if you don’t want it to mess up any table calculations, etc.

6. Create your dashboard parameter action to +1 to the parameter value when clicked:

Now, click away on your dashboard…

There are five steps here, but most of these are simple, and you can copy and paste from one workbook to another. Plus, you can use them on many different sheets within a workbook. Let’s face it: the calcs aren’t too complicated either!

Here’s the above example implemented into a fuller featured dashboard:

The post Demystifying how to Deselect Buttons in Tableau appeared first on InterWorks.

InterWorks

The Ultimate Guide to Year-over-Year Comparisons in Tableau

One of the most frequent tasks you might come across when working with Tableau is comparing data over time. Any KPI that is measured needs to be put into some kind of context to make it more tangible and give a feeling of perspective. “Our sales are at one million euros” is different from “Our sales have increased by 80% from one million to 1.8 million euros.” The latter example tells you whether the number you are looking at is good or bad when considering previous periods.

Although Tableau is great at giving users control over which range of dates they want to see with relative date filters, date range filters and all the other options out there, it lacks out-of-the-box functionality for year-over-year (YoY) comparisons that go further than simply comparing one full year to another full year. This has to be done with the help of some calculations.

More Flexibility with Time Comparisons

There are several ways to do year-over-year comparisons in Tableau, and once you have mastered them all, you will have the right method to apply in any situation. Furthermore, these comparisons can also be applied to different periods, like month-over-month or last month compared to last month in the previous year.

Lastly, I want to reassure you that you won’t have to learn all the formulas mentioned here by heart, as I have built a date comparison repository you can download and from which you can copy and paste calculations into your own data source. Just replace the date field I have used in the calculation with the date field in your workbook, and you are good to go.

All of my examples use the same setup: I will compare the current year’s sales to the previous year’s sales in the Superstore Sample Database by Country. I hope this makes it easy for you to check the results and recreate them in your own copy of Tableau.

Let’s get started.

Year-over-Year Comparisons with Table Calculations

This is probably the easiest way to compare this year’s numbers against those of last year. However, if we want to compare the current year with any year prior, we need to make sure that we are looking at the same time period in both.

If we were just to use a date field and compare the two years, we would not be looking at the same kind of information. Because the previous year has already finished, we are looking at 12 months’ worth of sales, whereas the current year is not yet over (unless you are reading this on December 31st at 23:59 – if so, leave your computer and watch the fireworks). Therefore, we cannot compare the two.

Here are the steps necessary to compare equivalent periods year over year:

1. Create a Year to Date filter calculated field.

The Year to Date filter looks at the Order Date in each row of your data and evaluates whether it is in the Year to Date period, in the Last Year to Date period or in neither of the two:

The functions used to evaluate the dates are DATEDIFF and DATEADD.

2. Hint: In order to check if the date calculations are working, I like to create a table with Month/Year of the date on Rows. Then, I place my date calculation on Text to see which month falls into which category.

3. Drag the Year to Date filter into your view, along with your KPI (in our case, that is Sales):

4. Filter out the null values by right-clicking the Null column header and choosing Exclude.

5. Right-click the measure—for us, SUM(Sales)–and select Quick Table Calculation and then Percent Difference:

6. You can make the view a little prettier and more insightful by showing it as a bar chart, hiding the Last Year to Date column and adding labels to the bars:

7. Lastly, we can use the YoY calculation field (Table Calculation) to colour our bars accordingly – blue for positive change and orange/red for negative change – by placing the YoY calculation measure on Colour. In order to keep this clean, I will use a Stepped Colour range with 2 Steps and 0 as the Centre:

Year-over-Year Calculations with Calculated Fields

In case you’d like to do more advanced or complex calculations, or just store your YoY calculations in a field that can then be used like any other measure, this approach might work quite well for you.

In essence, rather than aggregating measures and then using table calculations to calculate YoY changes, this approach solved everything inside the calculated field, and this is how it is done:

1. Step 1 is the same as in the previous approach: Create a dimension that you can use to filter Year to Date and Last Year to Date:

2. Next, we create a calculated field that will give us the current year’s sales:

3. We repeat step 2 for the previous year to create a second field [Sales (LYTD)].

4. Now, let’s calculate the percent difference between this year’s and last year’s sales. Keep in mind that we haven’t aggregated the measures yet. Hence, we need to make sure we do this in the calculation of percent change. Otherwise, the delta is calculated at Row level and then summarised, which does not make sense in most cases. So, here is how the YoY delta is calculated:

5. Lastly, we can build the visualisation again. However, this time, there is no need for filters and hiding columns:

Year-over-Year Comparisons Next Level: Giving the User the Choice

If we want our YoY comparisons to be less static and give the user a selection of date ranges or periods to choose from, we can make our dashboards way more powerful as they can now serve several purposes: answering questions of how we are doing NOW (e.g. this week), as well as looking into the past to answer the question of how we got here.

In order to create a YoY date filter that is driven by a user selection, three things are needed:

  • A parameter to make a selection
  • A date filter (as has been created in the previous examples)
  • Calculated fields that return the current period’s and previous period’s data, as well as fields to calculate YoY deltas

Let’s get started.

1. We first create a parameter that contains all possible date selectors needed for the dashboard. I generally go with the following, but feel free to add or change as many as you want:

    • Year-to-date
    • Month-to-date
    • Week-to-date
    • Moving Annual Total
    • Last Month

2. Next, a calculated field is created that changes the dates it filters based on the parameter selection. To make this possible, the aforementioned date filter needs to be adjusted slightly.

Because there will be different time period filtered, if they are named, e.g. “Year to date” or “Week to date”, the filter would look different for each parameter selection. This makes it really difficult to use the filter in a calculation since its value changes, and you would need to accommodate for any possible value the date filter might return. Therefore, I will just call the current period 2 and the previous period 1. This has the positive effect of the previous period always being shown first in a list or in columns:

Note: This is how your date calculations should look to be used in the parameter-driven date filter.

The flexible period field:

3. The last step is to include the Flex Period field in the calculations just like before:

You can find the detailed calculations in the attached workbook.

I hope this was a good overview for you on how year-over-year calculations can be done quite easily in Tableau. It doesn’t stop here: you can tweak all the calculations to your liking. Ways to do this include looking only at completed months or making your delta values more visually appealing by applying conditional formatting to them.

The post The Ultimate Guide to Year-over-Year Comparisons in Tableau appeared first on InterWorks.

InterWorks