Ten Tips & Techniques (Round 9)
Alright, I am back with 10 more Tableau Tips and Techniques. Be sure to check out the entire series on our website. Note that this blog post includes numerous gifs, please use your browser zoom to get a closer look at them.
1. Force a URL Action to Open in a Brand New Window
You've created a dashboard that uses URL actions. Let's use my Tableau Chart Catalog (published on Tableau Public) as an example. When you click on a chart type, it opens the actual dashboard in your browser. Users note that when they click on a mark it opens it in a browser tab, but when you click on a second mark, it opens in that same browser tab - it replaces the first one you clicked on. This may not seem like a big deal, but what if the user wants to open up separate browser tabs for all the charts they clicked on? Well, this really doesn't appear to be something you can control in Tableau. Well, sort of...if you do URL actions using a Map, then it will always open in a brand new tab with each location you clicked on. But if it's in any other chart type, it will always open in the same tab, replacing the one you clicked previously - weird huh?
However, outside of Tableau, you can force any chart type to open a brand new browser tab every time a new mark it clicked. You can use this by modifying the URL of the dashboard itself. This will only work if people click this link (via something you shared, a bookmark, etc.).
So the URL for the Tableau Chart Catalog is https://public.tableau.com/app/profile/kevin.flerlage/viz/TheTableauChartCatalog/TableauChartExamples. Give it a try...open the dashboard and click on a chart, then click on another, you'll see it replaces the tab with each click.
To fix it, add ?:linktarget=_blank to the end of the URL. Our original URL becomes https://public.tableau.com/app/profile/kevin.flerlage/viz/TheTableauChartCatalog/TableauChartExamples?:linktarget=_blank. Now give that a try. See it opens in a brand new tab each time.
2. Sort Fields as the Data Source Shows Them
Ken and I recently ran a Beginner Tableau Bootcamp and Ken was talking about connecting to data. He showed the Data Source tab. He then pointed out the bottom left, which showed the field names as they came in from the original data source (Orders related to People and Returns). Note that the fields are listed in the order they are in that data source, not alphabetical (Order ID, Order Date, Ship Date, etc.)
Ken then showed the following and talked about how all the fields are shown here on the left. You'll notice that these are in alphabetical order.
When you do that, it will change the listing (from alphabetical) to the same order on the Data Source tab (notice that Order ID is first just like on the Data Source tab).
Thanks, Caleb for this great tip!
3. Table Calculations Relative to...
In the below example, I'm showing sales by Quarter and have color-coded the bar based on the percent change from the previous quarter. As you can see, when the values go up from the previous quarter, the bar is blue. When values go down from the previous quarter, he bar is red.
Well, we can actually change the table calculation to be relative to something other than previous. If you click on the little triangle on that table calculation, you'll see an option for Relative To. This will default to Previous, but you can change it to Next, First or Last. This will cause your table calculation to change the way it is being calculated.
For the example above, I changed it to Next. Check out how the color-coding changes. It is now looking at the change from the next bar versus from the previous bar.
4. Date Range Parameter Without a Slider
You want to create a date parameter that only allows a user to select a certain range of values. For example, assume you are using parameters for filtering a date range, so you have a start date parameter and end date parameter. You wouldn't want your users to choose some date that isn't even available in your data. So when you create the parameter, you may change it to a Date type, change it to Range, then feed in the range dynamically - in this case, we feed in the Order Date to create that range of values:

When you show that parameter (as we did above), you'll see that you get a date slider option for your parameter. It is very difficult to select a specific date using these date range sliders. It would be awesome if we could implement that same range of dates, but using a calendar selector instead.
If we change from a Range to All, it will give us a calendar selector, but it will allow us to choose any date...the date range we selected is no longer in play. So here's the trick to using a range, but allowing users to use the calendar selector instead of the slider.
Create your parameter and choose the All option (not range). Show the parameter. You'll see it uses the calendar selector, but allows you to select ANY date (in this data, the max is 12/30/24 and this allows you to select dates past this). With the parameter still showing on your view, edit your parameter, change it to Range and feed in Order Date. It will remain a calendar selector but will require users to stay within the range (unlike before, it won't allow you to choose past 12/30/24).

5. Tableau Public - Ask Me About My Viz
Recently, Tableau Public introduced functionality to allow users to ask other users about their viz. I love this functionality as it helps continue to expand the datafam community. I actually didn't know this was available and learned it from Andy Holt - check out his post on LinkedIn for more information.
6. Set Syntax
I always thought the syntax for a calculated field using a Set was confusing. For example, assume I wanted to determine if something was in a set then yield some result. I may write a calculation that says
IF [CATEGORY SET] THEN [CATEGORY]
ELSE 'OTHER'
END
This calculation says, in plain language, if the Category is in the Category Set, then yield the Category, otherwise, yield "Other".
For me, this has always been confusing. IF [CATEGORY SET] is saying, if the category is in the set. So why can't we just write it that way? I always wanted to write it like this:
IF [CATEGORY] IN [CATEGORY SET] THEN [CATEGORY]
ELSE 'OTHER'
END
It's a bit more wordy, but it's way easier to understand by the average user. Unfortunately, it doesn't work that way! Just kidding! It used to not work that way, but it does now. You can, in fact, write it either of the ways shown above. I personally think the second option is way better.
I shared this as a bonus tip during our interview with Tableau at TC25. You can watch the video here. Note that this tip starts at the 10 minute mark.
7. Find Field in Data Pane
You have a bunch of pills on your view and you have a pile of fields and calculations in your data....like 100's. If you right-click on a field anywhere on your view, you can choose "Find in Data Pane" and it will take you right to it. It will scroll down the list, it will expand folders, whatever...it will find it and select it for you. Below is a gif showing it with collapsed folders using Superstore data, but again...imagine this with 100's of fields.

8. Different Formatting on Axis & Pill
Let's assume we have the following chart. It shows Sales by Month for the Current (black) and Prior (gray) periods. You see that the axis shows in thousands (i.e. $6k).
If we take a look at the tooltip, you'll see it shows in thousands as well - see the image below:
Showing the axis in thousands makes sense, but I want a bit more precision in my tooltip. So I format the pill on the Tooltip card to be the exact number (not in thousands) and this happens:

You see that changing the formatting on the Pane did nothing...I mean, we got rid of the K, but it still showed in K in the tooltip, what gives?
So here's what happened. I created my chart, I formatted the SUM(Sales), I right-clicked on the axis then formatted the axis (Axis tab on the left) to be in Currency with a K, then right-clicked on SUM(Sales) on the tooltip, then formatted the value (Pane tab on the left) and it did nothing.
The way to fix this is to do it from the start. Instead of doing any formatting on the chart itself, let's set the default number formatting for Sales at the field level to Currency with a K, then we should be able to change the tooltip formatting. Check it out in the gif below:

9. Fixed Value Axis - Hide that Little Pin!
Assume we have this chart showing student grades:
In this chart, I've done a dual axis to get the axis we are interested at the top, then I've chosen to not show any axis tick marks. I've also fixed the axis because these grades will never exceed 100%.
So fixing the axis...that's caused us a problem. The problem?...that pesky pin showing in the axis.
I don't like that pin! I mean, I get why it's there, but I still hate it...and I want to get rid of it. I've never found a way to actually get rid of it, so on occassion, I just blend in with it.
I simply format the headers and change the Shading to match the color of the pin by color-picking it. Then change the font color to white. This is a bit of a silly solution, but I've done it a number of times. Check out the gif below:

10. New Unmentioned Feature - Hide Whatever Axis You Want!
In my Round 3 of tips, I showed a technique that I use in nearly every dashboard. In a chart, all the headers appear at the top, yet when you add a measure to Columns, it shows it's axis at the bottom. So I dual axis it so you have an axis at both the top and bottom. Unfortunately, you can't just hide the bottom axis, so you have to remove the title and remove the headers. This works, but leaves this block of blank space. For a full walkthrough of how to do this, see #10 in the Round 3 Tips blog post.
I was just doing this in a newer version of Tableau Desktop (2024.3) and noticed something great. In older versions of Tableau, I always tried to just hide the bottom axis, but when you did, it hid both the bottom and top...here is a gif showing this (note that I cut off my gif, but it is simply unchecking Show Header in the pop-up menu).

So you'll see how when I try to hide the bottom axis, it removes both axis. This is why you have to follow all those other steps to "pseudo hide" the axis. Unfortunately, the axis is still there, taking up lots of space.
But I stumbled into this in a newer version (again 2024.3) and found this:

When you try to hide the header on the bottom, YOU CAN!!! This seems minor, but I've wanted to do this dozens of times...and now you can! Note that you've always been able to hide the top axis and leave the bottom, so now, you can hide whatever axis you want and leave the other.
Note, I did this in 2024.3 with no issue, but I tried it again in 2025.2 and it didn't work 😔. Try it on your version and let me know.
Okay, that's it for this round of tips! Thanks for reading.











No comments: