July 28, 2020
#TableauTipTuesday - Using Set Actions to Change the Format of the Selected Value in a Dropdown Filter or Parameter
- Using Category as a filter
- Using a Set Action so that the (All) option can also be displayed
November 15, 2017
Workout Wednesday: Top N Customers with a Twist
I learned a bit about calculated sets and mixing them with parameters in calculations. Overall, not too bad. Good luck!
July 12, 2017
Workout Wednesday: Insights & Annotations
- Create a map
- Create a barbell chart
- Have the map interact with the barbell chart
- Include an option for users to add custom annotations
May 3, 2016
Tableau Tip Tuesday: 12 Use Cases for Parameters
Parameters are one of Tableau’s most powerful features. I remember when they were first introduced and it completely changed the Tableau paradigm. This week’s video takes you through 12 simple use cases for parameters. These 12 barely scratch the surface for what’s possible.
NOTE: This video is 50 minutes long.
March 15, 2016
Tableau Tip Tuesday: How to Create a 45 Degree Reference Line
This week, I show you how to build a perfect 45 degree reference line. I used this technique last week when I wrote about female vs. male literacy rates as part of the Data School Gym challenge. In the video, I take you through three examples in different data sets to hopefully give you different ideas for how you may use this.
March 1, 2016
Tableau Tip Tuesday: How to Display the Top N and Retain the % of Total
This week’s tip was sparked by a question that Jules Winceslaus of the Data School asked during a project we worked on last week for a customer. He created a bar chart that showed the percent of total, yet when he filtered the dimension, he wanted the original percent of total to remain. That is, the bars shouldn’t be recalculated based on the filter.
In the video and example below, you’ll learn how the rank function can be used to filter the results in the view without impacting the percent of total calculation.
September 15, 2015
Tableau Tip Tuesday: Creating a Chart with One Measure & Two Number Formats
Note: This logic only works if all of the numbers you are showing are positive.
November 29, 2014
Tableau Tip: Conditional Axis Formatting Using an Axis Selector
Let's say we choose 3 metrics - Mail Volume, Spend, and Response Rate as part of our parameter metrics. That means we now have a regular number, a dollar value, and a percentage as part of our available measures. After building the case statement and building a chart similar to the one you've shown in this post, the best thing we can do to show the correct values (sans label of $ or %) on the y-axis is using the "automatic" number formatting option for the 'Measure chosen' measure. I know Tableau has made it much easier to add the label on the chart itself with the Label mark after v8.0, but what about the actual y-axis value? Is there any way to dynamically update the measure value's axis label to reflect it's true number format?While the direct answer to Dave's question is no, there's isn't a way to dynamically update the format of the Measure Values pill, there is a work around using containers, which will can give the perception of conditional formatting. Here is the final output of the technique I've used. Read farther down for detailed step-by-step instructions, plus a video.
In this example, I've created a simple dashboard with three viz types: Line Chart, Map, and Bar Chart. I created three separate sheets for each type of chart, one for each metric: Sales, Profit Ratio, and Order Quantity, each having a different format for a total of nine worksheets.
Step 1 - Create the lines charts. I started with Sales and then duplicated the sheet and replaced Sales with Profit Ratio and Order Quantity, leaving me with three separate worksheets.

Step 2 - Create a map for each metric. Again, I end up with one worksheet for each metric.

Step 3 - Create a bar chart for each metric, giving us three more worksheets for a total of nine.

Step 4 - Create a parameter with a list of the metrics.

Step 5 - Create a calculated field to get the value selected in the parameter created in Step 4.

Step 6 - Show the parameter control on one of the Sales worksheets and choose Sales from the list.

Step 7 - For each of the worksheets that is using the Sales measure, drag the calculated field created in step 5 onto the Filters shelf and explicitly choose Sales from the list. There should only be one item in the list of available selections. Do NOT choose the "Use All" option or this hack won't work.

Note what happens when you change the selection in the parameter (e.g., choose Profit Ratio); the worksheet will go blank. This is exactly what we want because we want the Sales worksheets to go blank when a different metric is chosen. Go ahead, give it a try.
Step 8 - Change the metric chosen in the parameter to Profit Ratio and then add the calculated field created in step 5 onto the Filters shelf for each of the worksheets that contains Profit Ratio and explicitly choose Profit Ratio from the list.

Again, notice how Profit Ratio is our only available selection in the filter list.
Step 9 - Repeat step 8, but this time choose Order Quantity and add the filter to each of the Order Quantity sheets.
Step 10 - Create a new dashboard.
Step 11 (optional) - Add the title to the dashboard and in the title, include the parameter. This way the title will make the dashboard more intuitive.

Step 12 - Add two horizontal containers to the dashboard, one above the other.


...then hide the titles for each worksheet.

Step 14 - Add all of the maps and bar charts to the bottom container...

...then hide the titles for each worksheet.

Step 15 - A bit of cleanup, like sizing the charts to fit the view, removing the color legends, making it all looks pretty and floating the parameter and you're all done!

Go back to the viz at the top to play with the interactive version. Here's a video recording of how I built this dashboard.
September 18, 2014
The Sleeping Habits of Tableau Zen Masters
I blame Tableau. Clearly the Zens spend too much time playing with Tableau and helping people solve the hardest Tableau problems. Judge for yourself with the viz below.
- Hover over a Zen and a summary of their stats will appear on the right.
- Hover over a Zen for links to their Twitter profile and website.
- Rank the Zens using the parameter on the right: By amount of sleep, when they go to sleep, when they wake up in the morning or look at a simple alphabetical list.
- Use the minimum sleep parameter to determine how much you think a Zen needs to sleep and watch the viz update.
August 25, 2014
Tableau Tip: Month over Month KPI Movers
I'm currently running some monthly data where a list of records is assigned a KPI indicator like G/Y/R. I've been asked to produce a follow-up piece that would show "movers" from the prior month's data, just in a simple text view. So I guess what I need to try and do is figure out how to do a lookback/compare from prior month data to see who went from Y/R to G on the positive change side and who went from G to Y/R on the negative side.What Brian didn't realize was that answer to his question was pretty much in the question itself; he needs to use to LOOKUP() function. I sent Brian a solution, but decided to fancy it up a bit more and add some more functionality using parameters:
Step 1: On a PC, right-click drag Order Date to the Columns shelf. On a Mac, Option+Drag Order Date. Choose the continuous month option.
Step 2: Right-click on the Order Date pill on the Columns shelf and change it to Discrete.
Step 3: Right-click on the Order Date field on the Column shelf and choose Show Missing Values. This is important because it turns on data densification. Months where data does not exist get displayed.
Step 5: Create a calculated field called Last and change the Default Table Calculation to Order Date.
Step 6: Right-click on the Last field you just create in the Measures area of the Data window and choose Convert to Discrete.
Step 7: Drag the Last field to the Filters shelf and choose 0. This will change the view to only show the latest date.
Step 8: Create a calculated field to get the value for the most recent month. Notice that I'm using the LOOKUP function. Change the Default Table Calculation to Order Date.
Step 9: Create a calculated field to get the value for the previous month. The only difference here is we need to offset the LOOKUP by 1. Change the Default Table Calculation to Order Date.
Step 10: Create two parameters: one to determine the lower limit of the top KPI (Great Performers) and one to determine the lower limit of the middle KPI (Average Performers).
Step 11: Create the KPI calculations for the most recent month and the previous month. Notice that I'm using the parameters.
Step 13: Create a calculated field that returns a boolean to compare the values for this month to determine if they are a "Mover". I'm using Brian's definition for this example.
Step 14: Drag the Movers field to the Color shelf. I chose to set the colors to a light gray when True and red when False. This way only the Movers stand out.
Step 15: Optional - Change the Marks type to Shape and drag Movers to the Shape shelf as well, then pick shapes that give the affect your looking for. I chose diamonds for the Movers and circles for everything else.
Lastly I did a few cleanup items before placing the worksheet on the dashboard you see at the top of this post:
- Moved Order Date to the Detail shelf
- Reduced the level of the row divider
- Removed the bold text from Region
- Added a calculated field to the Filters shelf that checks that the value in the Great Performers parameter is larger than the value in the Average Performers parameter.
This method could easily be changed to accommodate many different scenarios like day over day, week over week or year over year.
Download the sample workbook here.
January 24, 2014
Tableau Tip: Showing all dates on a date filter after a Server refresh
I saw on this thread that it’s still an unsolved problem. In a nutshell, here’s a summary of the problem:
- You created a dashboard that has a date slider quick filter and you’ve told Tableau to use all dates.
- The next day when the data source refreshes, the quick filter doesn’t automatically include the new date(s). The slider has to be manually moved to the right to accommodate for the new data.
Let me first explain the problem in a bit more detail. Assume that you have a set of sales data for the first few days of the year.
And you built a cool dashboard with a date slider like this:
You publish the dashboard to Tableau Server and set the data source to refresh each night. But when you look at it a couple of days later, you notice that the chart hasn’t changed.
You can clearly see that four more days should be included, but the slider is still stopped at January 10th. Tableau does not automatically adjust the date slider; it stays at whatever dates were picked when you published the workbook.
That leaves you with two options, both of which are not satisfactory:
- Republish the workbook every day.
- Tell your users that they have to adjust it themselves every day.
Step 1: Create a parameter that allows two options and show the parameter control.
Note from Joe: This allows us to default the view to including all dates, while enabling the interactor to decided to apply a date filter.
Step 2: Duplicate the data source (or alternatively create a data source that has only the dates since that’s all you need to make this work, or you could use custom SQL like “SELECT DISTINCT Date FROM Table”)
Note from Joe: This will give us a data source with a valid date range, a kind of dynamically populated parameter.
Step 3: Unlink the Date field in the secondary data source. Ignore any warnings.
Note from Joe: This way there is no Group By clause sent in the query to the secondary date list data source.
Step 4: Create a calculated field that checks for matching dates.
Step 5: Replace the Date filter on the worksheet from the primary data source with the Date field from the secondary data source and show the quick filter. Again, ignore any warnings.
Note from Joe: The combination of this calculated field in the primary data source, and a filter on the Date field directly from the secondary data source, is where the magic happens. The filter on Date that we just placed will happen in the query to the secondary data source, then the aggregations to get the MIN and MAX Date in the secondary, and then the comparisons that happening the formula will happen after the results are returned from each data source. This is effectively enabling us to get the selection of the filter available to use in the calculated field.
Step 6: Add the date match calculated field that you created in Step 4 to the Filters shelf and set it to At Least 1.
Note from Joe: The INT() in the formula turns the Boolean value into an integer because a Boolean cannot be Continuous and Tableau cannot filter on a Discrete Measure if it is not a table calculation. So by changing the data type, we can make the pill a Continuous Measure and filter on it.
Step 7: Clean up the dashboard – Remove the quick filter that is showing, add the quick filter for the Date slider and show the parameter control.
When you publish the dashboard, be sure to pick All Dates from the parameter created in Step 1 above. The Date slider will still not move, but at least we are now defaulting the dashboard to always show all dates and then the user can filter if they wish.


















