8 New Tips From TC25

Once again, we presented How to DoCool Stuff in Tableau at this year’s Tableau Conference. In previous years, we’ve already written about the majority of the tips and techniques we share during our presentation. But, this year, we realized that we had lots of tips that we’ve never before written about. So…in this blog I’m going to share some of those cool tips with you. But please don’t use that as an excuse to skip the presentation because you’ll be missing all the fun!!

 

1) Synchronize Your Font Colors

Imagine you have a table like the one below. It may be a little hard to see, but the Customer Name and Segment fonts are a lighter grey than the Customer ID.

 



I would typically solve this by right-clicking the Customer Name, choosing “Format” then selecting the right color for the font.

 



Then I repeat the process for Segment and all other fields on the table. That’s not a ton of work, but it’s a pain when your table has a lot of fields. Plus, as soon as I do something more than once, I immediately start looking for a way to automate the process!!

 

So, here’s how we can make this easier! Select Format then Font to see the sheet’s formatting. Let’s walk through each of the options in the Default section.

 



Changing the Pane option will change anything on the Text card.

 

 

Header will change the column headers and any and the values of the fields on Rows and Columns.

 



Tooltip will change the default color of the tooltip text and Title will change the default color of the title.

 

Want to change everything all at once? Simply change the Worksheet font and the Pane and Header (everything you see on the table itself) will be synchronized.

 



So next time, save all those extra clicks and simply change the worksheet’s default font.

 

2) Fix the Font Color on Highlight Tables

Whenever I create a table, I try to at least use color to highlight the high and low values. That way, we’re using some visual techniques to enable insights. But sometimes after you’ve formatted the highlight table to look exactly like you want, you end up with something like this.

 

 

The black text is very hard to read in contrast to the darker purples. And, if we change the text to white, it would be hard to read on the lighter purples. So, what’s going on here? Well, let’s try a few things…

 

First, let’s check the font settings.

 



The font color is set to Automatic, so Tableau should automatically change the font to be white when on a dark background and black on a light background. But it’s not, so let’s try something else.

 

Sometimes, if the font is too big, it can kind of bleed outside of the colored cell. When that happens, the text might overlap cells of different colors, the background, etc. In this case, Tableau can’t really choose one color that will work on all backgrounds, so it chooses black. Let’s try making the text smaller.

 

 

Nope, that didn’t work.

 

Let’s try clearing the sheet’s formatting. Click Format then Clear Worksheet Formatting.

 

 

That works, but it’s also cleared all my other formatting. My alignment, font colors, grid lines, etc. have all been wiped out. I can add that all back, but I’ll probably just end up breaking the text colors again!

 

So, let’s undo that change. Ultimately, the problem is that I’ve changed the workbook’s default color. Let me show you. Click Format then Workbook to see the workbook default formatting. We’ll change the Worksheets font color to a shade of orange.

 



That overrides all automatic coloring, making everything orange, regardless of the background color. There’s a handy Reset to Defaults option at the bottom, so that should fix it, right? Let’s first undo our previous change (setting it to orange) then click Reset to Defaults.

 



Nope, the text is still black. So let’s undo that.

 

But, let’s change the colors to orange again.

 



And now let’s click Reset to Defaults.

 



For some reason, it works when we change the font color first!

 

Unfortunately, it also changes everything back to the Tableau fonts, even though I was using Poppins. Again, I can change those manually, but I’m lazy and I’m also afraid I’ll end up right back where I started. So, once again, let’s undo that change.

 

If you look at the formatting pane, do you notice the little ● next to the worksheet font?

 



That indicates we’ve overridden that option. We can click the icon and undo that override, so that should fix it, right? Well, let’s click it and see…

 



Argh! The text is still black. Let’s try one more thing…Once again, let’s undo that change, then set the Worksheet font to orange.

 



Now let’s click the ● icon to clear it.

 



And viola!! Like magic, it’s fixed.

 

So, the next time you run into this problem, first change the color of the Worksheet font, then click the icon to clear it and that should fix the problem!!

 

3) Default Color Palette

Tableau has put a lot of time and research into the default palettes that are assigned when you drop a pill on color, but sometimes you just want a different set of defaults. If your company has a style guide then you’re likely to have chosen some defaults that you’d like people to use. Wouldn’t it be nice if you could specify the default palette used in Tableau? Good news—you can!

 

To create custom color palettes for Tableau, we must edit the Preferences.tps file, an XML settings file. I’m not going to go into this in detail, so see Create Custom Color Palettes if you want to learn how to do it.

 

Palettes typically look something like this:

 

<color-palette name="Proportions" type="regular">

    <color>#1a354a</color>

    <color>#e84d2e</color>

    <color>#702a70</color>

</color-palette>

 

<color-palette name="Pink to Purple" type="ordered-sequential">

    <color>#ece1f9</color>

    <color>#37284b</color>

    <color>#241a31</color>

</color-palette>

 

<color-palette name="Red and Teal" type="ordered-diverging">

    <color>#d12124</color>

    <color>#1e4a55</color>

</color-palette>

 

Each palette has a name and a type.

 

But, what if you create a palette with no name and no type?

 

<color-palette>

    <color>#84329B</color>

    <color>#FF6D6A</color>

    <color>#0095C8</color>

    <color>#1E1A34</color>

</color-palette>

 

This palette will now act as your default color palette moving forward!!

 

Just be wary, however, as this will be your default palette for all types of color—categorical, sequential, and diverging—and it’s unlikely to make sense for all three.

 

4) Dotted Lines with Aggregates

Tableau recently added the ability to use “line patterns” on line charts. For example, here I have a dual axis chart showing Sales vs Target and I’ve used a dotted line for Target.

 



But I want to take this chart a little further. I’d like to color the lines based on whether or not the target has been met. So, I created a calculated field like this:

 

Met the Target

// Color dotted line based on whether or not the target was met.

IF SUM([Sales]) >= SUM([Target]) THEN

    1

ELSE

    -1

END

 

Then I drop that calculated field on the color card…

 



Where’d my dotted line go? I click on the path card and the line pattern options are all disabled. When I first encountered this, I thought maybe it was because the field was continuous (green pill), but I found that that was not the case. Eventually, I determined that it was because the field is an aggregate (it uses SUM aggregations in the calc itself). In this case, there’s no easy way for us to make this field a non-aggregate (at least not without breaking the chart), so I guess we’re just out of luck

 

Not so fast! Here’s a cool little trick to create a pseudo dotted line. Instead of a dual axis chart, let’s use Measure Names and Measure Values.

 



Now add Target as a second axis, change to a dual axis, and synchronize.

 



It looks exactly the same because that new axis is right on top of the other one. But here’s where it gets fun!! Drop Met the Target on the color card of the Measure Values axis. Then change the Target axis to a dotted line and make it white. You’ve now created a dotted line!!

 



You can tinker with the size of the line to get different effects as desired.

 

5) No Difference Between Vertical & Horizontal Containers

Did you know that there is no difference between vertical and horizontal containers (at least not at first)? Don’t believe me? Let me prove it to you!!

 

Starting out with a blank dashboard, I’ll float a horizontal container. Then I’ll drop in a blank and color that blank. If we check the Item Hierarchy, we can clearly see that this is a horizontal container.

 

 

Now let’s drag in another blank.

 



What the…???

 

 

It let me tile that blank in the container vertically!!! And that container now shows as a Vertical Container in the Item Hierarchy. The same thing would happen if we started with a Vertical Container—Tableau would allow us to tile the second object horizontally. Weird huh? When we add a third object to the container, we can only tile one way or another.

 

Ultimately, these two objects are exactly the same at first. The type of tiling used is not set until you tile that second object. Once that object is tiled, all subsequent objects must be tiled the same way. Pretty neat, eh?

 

6) Alias Those Null Dates

Before I start this one, I want to be sure to give credit to Mahfooj Khan as I learned this from him on the Tableau Community Forums.

 

Here I have a table with a handful of dimensions, including dates.

 



Not sure about you, but those Null dates drive me crazy and I know that they are going to confuse my users. So, instead of “Null”, I’d like them to just be blank or “NA” (or something like that). With string fields, we can alias the value, but that doesn’t work with dates. So, in the past, I’ve always created string calculated fields. But I don’t like doing that—it’s a date and I want to leave it as a date. Plus, if I format using something like MM/DD/YYYY or DD/MM/YYYY, then those dates will sort by the month or the day first, which I don’t want.

 

So here’s the brilliant technique that Mahfooj shared. Start by changing the data type of the field to a string.

 



Since it’s now a string, we can set an alias. I’ll set it to NA.

 



Now change the data type back to a date. Amazingly, Tableau will keep the NA alias!!

 



7) Update Date Range Filters to Include New Dates

Imagine you have some data that is updated on a daily basis. You may want to allow your users to filter the dates, so you add a date range filter as shown here.

 



But what happens when the data updates? I know that I have data for the rest of March in my data set, so let’s refresh the extract.

 

 

Where’s the new data? If you look at the filter, you’ll notice that there is some more space to the right. If we drag that all the way to the right, we’ll see the rest of the data.

 

 

So, every time your data updates, your users need to manually set the filter to show updated data. That’s not a great user experience.

 

To solve this problem, I typically create start and end date parameters, then use dynamic parameters to populate them with the first and last date in the data using FIXED LOD calculations. This works great as it automatically updates based on the data, while still allowing your users to change them. But, as you may have guessed, there’s an easier way!!

 

Go back to the date range filter and, instead of Range of Dates, choose Special. Then choose “All dates” or “Non-null dates”. 




Now watch what happens when we refresh the data.

 



The range filter automatically updates to the latest date!! And your users can still change the range as desired.

 

Important: Be sure to always change this setting before publishing. If you manually change the filter’s range while testing the workbook, it will revert that filter back to a Range of Dates filter. So, you’ll need to make sure to change it before you publish.

 

8) Removing Filters Applied to Other Sheets

One more tip. I’ve always been a little confused about how to remove a filter that’s been applied to multiple sheets, so here’s a quick rundown of how it works.

 

Let’s start with a filter that is applied to All Using This Data Source.

 



Removing this filter is easy—remove it from one sheet and it will remove it from all of them.

 

But what if the filter is only applied to Selected Sheets? If you remove the filter from one sheet, it will leave the filter on all the other sheets. We could use what we learned above and change the filter to All Using This Data Source, then remove it from one sheet. But that can be problematic. Take the filter on Order we showed above. Let’s imagine that this filter is applied to all sheets except the two related to Measure D, as shown below.

 

 

But, KPI - Measure D also has a filter on Order. This filters to something different than our other Order filter.

 

 

If we change that filter to All Using This Data Source, it will replace the filter on KPI - Measure D, which will almost certainly break something—so we need to be more careful. Instead, here’s the quickest way to remove them. First edit the filter, then select the option Show only selected worksheets. Starting at the top worksheet, click the checkbox. That will remove the filter from that sheet and remove it from the list. Keep your mouse in the same position and keep clicking until everything is unchecked. Then delete the filter from the current sheet.

 

 

 

That’s all I have for you but you can rest assured that we’ll be back with some new tips and tricks very soon! Thanks so much for reading. Feel free to leave your thoughts in the comments below.


Ken Flerlage, April 17, 2025

Twitter | LinkedIn | GitHub | Tableau Public


No comments:

Powered by Blogger.