Show and Hide Containers in Tableau

In this video I’ll show you how to show and hide containers in Tableau at the push of a button. This makes for a convenient way to increase space for your dashboard while hiding your filters or switching to an additional hidden chart until needed.

If you’re not using at least Tableau 2019.2.0, then you need to run over to your I.T. department and have them set you up. In previous versions of Tableau you could achieve this effect, but you would have to implement a hacky methodology in order to pull it off. Although I love a good hack, we should all strive to work smarter not harder.

The key to pulling off the show/hide container is to add a floating horizontal or floating vertical container to your dashboard. Only once you’ve taken this step can you see the option to “Add Show/Hide Button”.

Once you’ve selected this option, any new sheets, filters or other objects you wish to place in your container are enabled to appear or disappear at the press of a button.

An “X” marks the spot as this default customizable icon will appear. You can replace this image with text or use your own customizable image in its place.

As a reminder, (from the Tableau Knowledge Base) these options “will not be available if the sheet is not on a horizontal or vertical container and that container is not floating.”

In lieu of the default show/hide icons, in the video we will use buttons from a template provided by Kevin Flerlage. Do yourself a favor and head on over to the Flerlage Twins blog and download this handy resource.

Make sure to give your filters and charts the “Personal Space” they need! Rick and Morty aficionados know exactly what I’m talking about.

For the Power BI curious, here is how a similar process is conducted, where the filters (ahem) slicers are hidden at the touch of a button.


If you enjoyed this tip, please like and subscribe on the Anthony B. Smoak YouTube channel.

All views and opinions are solely my own and do not necessarily reflect those my employer

Do Great Things with Your Data!

Anthony B. Smoak, CBIP

In all seriousness, the world lost an icon of baseball and civil rights as of the recording of this video; Mr. Hank Aaron. I live in Atlanta so I have to pay my respects with a shout out to Hammering Hank. Rest in Peace #44.

Drill from Region to State Using Parameter Actions in Tableau

When the data goes high, you can go low; to misquote a common saying. In this video I’ll show you how to start at a region level on your Tableau map and then drill into the State.

If you’re using the Tableau Superstore data set, make sure the Region and State fields are assigned to a geographic role. Most likely you will need to change the Region to a geographic role, which is created from the State field.

At a high level we’ll have a dual axis based upon the latitude, with the top latitude displaying the regions and the bottom latitude displaying the state. When we layer them on top of each other, we begin to create the illusion of the drill.

We’ll use a parameter creatively named [Region Parameter] which contains all of the regions. From there we’ll create a calculated field named [_States to show] as follows:

If [Region]=[Region Parameter]
Then [State]
END

In order to institute the drill, we’ll create a worksheet parameter action that will change the value of the region parameter on user selection. This causes the clause (If [Region]=[Region Parameter]) to evaluate to TRUE which then causes the display to show the states for the selected region.

It sounds more complicated than it is, so just make sure to watch the video for understanding and clarity.

As a bonus, I’ll show you how to achieve this effect where the selected region does not cause the other regions to gray out. Notice on the second map how all the non selected regions do not lose emphasis; this is not the default effect. It’s the little “show-off” details like this that can up your Tableau game. You’re welcome!

You can thank me by watching, liking and subscribing:

All views and opinions are solely my own and do NOT necessarily reflect those my employer.

Do Great Things with Your Data

Anthony B. Smoak

How to Filter your Tableau Viz in Tooltip (Top 10 Values)

Visualizations in tooltips, affectionately know as “Viz in tooltip” is a handy feature available in Tableau that enables “details on demand” functionality. As the user hovers over a specific mark or data point, additional details are revealed that are filtered specifically for that mark from another worksheet.

In the example above, as the user hovers over a bar, they obtain additional details about the three most profitable products associated with the respective bar.

As I learned in a very informative Tableau presentation for tooltip wonks (myself included), the underlying architecture is built upon action commands and shares many commonalities with action filters. For viz in tooltip performance considerations, use smaller and fewer visualizations. Also try to avoid maps and other complex visualizations that have significant mark density.

If your tooltip responsiveness is greater than 2 seconds or the height and or width is greater than 600 pixels, then consider rethinking your approach. According to Tableau best practice, users are not willing to wait more than 2 seconds hovering over a mark for a reveal.

Since the viz in tool tip passes filters between worksheets, this means we can make use of context filters (click this link for a fantastic overview) to limit the number of marks returned and help improve performance.

This is the Section You are Here for

Context filters also help solve the problem of returning the Top N records associated with a mark. When you assign a viz in tooltip on your source sheet, a set filter is applied on the target (i.e., viz in tooltip) worksheet. If you’re a frequent watcher of my videos you know that the Tableau order of operations prevents the default set filter from returning a proper Top N.

By adding the set filter to the context on the Order of Operations skyscraper, the data is pre-filtered by your dimension first (e.g., State) and then the Top N filter is applied. When the set filter turns gray, you know it’s working.

Notice that the Context Filter box is above the Sets entry; which means that the Context filter is evaluated BEFORE the set. Make sure to watch the video to learn how to limit to the Top 10 cities based upon a hovered state.

Check out the video for details and may all your viz in tooltips be context appropriate!

All views and opinions are solely my own and do NOT necessarily reflect those my employer.

Do Great Things With Your Data

-Anthony B. Smoak

Create Tableau KPIs Quick and Easy (Profit vs Budget)

In this video you will learn a quick and easy approach to putting together KPIs that illustrate how profits perform in relation to a budget (i.e., targets vs actuals). Of course the KPIs will be interactive thanks to help from parameters.

Now the dashboard that I built around the KPIs will definitely form the basis of additional videos. There are several techniques here (filtering viz in tooltips, show/hide container, bar in bar chart, reset all filters button, etc.) that form the basis of a good intermediate level dashboard.

Inspiration comes in many forms. I have to give a shoutout to Keith Dykstra for offering his original dashboard for reverse engineering. The idea for the KPIs and bar in bar chart are inspired by Keith. I added additional elements such as the reset all filters button, filtering by states via treemap, parameters in lieu of hover over images.

Shoutout to the Kevin Flerlage for his great PowerPoint button workbook. I modified the on/off toggle button based upon a template from Kevin’s workbook.

Finally, I was watching an Oregon vs UCLA football game one Saturday and was impressed by Oregon’s latest uniform combination. I had to throw that grey and green combination together for use on the dashboard. Inspiration can come from many places! Here’s a little Oregon football and my “Saturday Night Lab” tweet.

Make sure you watch this video to learn and hopefully get inspired yourself!

If you’re interested in KPIs you can check out these other videos:

All views and opinions are solely my own and do NOT necessarily reflect those my employer.

Understanding Tableau Context Filters

Context filters in Tableau are a big mystery right? In this video I will demonstrate two examples that will help shed some light on how context filters in Tableau work.

When I was starting to learn Tableau, I had no idea why I would ever need to add a filter to the context. It just didn’t make sense for me, because most of the time, the filter still operated in a manner I expected. Little did I know, I was moving a filter on up, to a deluxe apartment in the sky!

That is because I did not understand Tableau’s order of operations. This understanding is key. The higher the filter is on the official order of operations skyscraper, the more influence it has on all the other filters below it.

When two dimension filters are applied to a visual, they are working independently with access to all rows in the data source without regard to other filters. Eventually the filters decide what values they have in common (i.e., the intersection), and those values are shown on a visual.

But if you change your dimension filter to a context filter, you’ve ensured that any other filters that you set are defined as dependent filters because they process only the data that passes through the context filter.

This concept will be very handy when trying to compute the Top N values. Notice on the order of operations that Top N is located below context filters. That means that the Top N filter will only receive values that have been “pre-filtered” from the context filter.

What’s in it for You?

Per Tableau, use context filters to:

  • Improve performance – If you set a lot of filters or have a large data source, the queries can be slow. You can set one or more context filters to improve performance.
  • Create a dependent numerical or Top N filter – You can set a context filter to include only the data of interest, and then set a numerical or a top N filter.

To improve performance of context filters, especially on large data sources, follow these general rules.

  • Using a single context filter that significantly reduces the size of the data set is much better than applying many context filters.
  • In fact, if a filter does not reduce the size of the data set by one-tenth or more, it is actually worse to add it to the context because of the performance cost of computing the context.

Still scratching your head? It will all make sense after the video examples. Give it a watch!

Of course, check out the official documentation from Tableau where I sourced these tips.

All views and opinions are solely my own and do NOT necessarily reflect those my employer.

Do Great Things With Your Data

-Anthony B. Smoak

Photo by Andrea Piacquadio from Pexels

Tableau Dynamic Maps with Parameters: A COVID Dashboard Breakdown

Operation “Reverse Engineer” a Tableau Zen Master dashboard is back in full effect. You know the drill by now, I spent weekend hours analyzing an impressive dashboard put together by Tableau Zen Masters Anya A’Hearn, Tamas Foldi, Allan Walker, and Jonathan Drummey.

In this video I will demonstrate to you how they use parameters to dynamically change the measure that is displayed on both a map and bar chart. Accurate data is made possible through the use of a context filter to equalize the data that is displayed between the United States and all other countries (U.S. data lags by one day).

I should mention that we are using the carefully curated data offered at the Tableau’s COVID-19 Data Hub.

What’s in it for You?

You will learn a neat little trick that encapsulates multiple measures into one calculated field. By using two parameters we can update our visuals to display the correct measure based upon user selected options. This even applies to the size of our marks on a map. You have to love the dynamic nature of Tableau!

In order to understand how we work with the current Tableau COVID-19 data file, you should watch the first video as a prerequisite.

Also Make Sure to Watch this Additional Video Series

Make sure to also check out this extremely useful tutorial on building a COVID-19 Dashboard from scratch. It’s perfect for your first Tableau project with step by step instruction.

All views and opinions are solely my own and do NOT necessarily reflect those my employer.

Do Great Things With Your Data

-Anthony B. Smoak

Build Advanced Tableau KPIs: A COVID-19 Dashboard Breakdown

You want to build an advanced Zen Master level KPI BAN using Tableau’s latest COVID-19 data? Well you’re in luck as I spent a lot of weekend hours analyzing an impressive dashboard put together by Tableau Zen Masters Anya A’Hearn, Tamas Foldi, Allan Walker, and Jonathan Drummey.

Specifically I was intrigued how they put together the KPI BAN from the dashboard below that highlights either NEW or CUMULATIVE Positive cases and the percentage difference from the previous day.

Official Tableau COVID Tracker

The official Tableau COVID-19 tracker database can be found here.

In breaking down their approach I renamed some calculations to better help me organize and understand how they come together to create the KPI.

What’s in it for You?

From a learning standpoint, there is a good mix of parameters, filters, context filters and Level of Detail (LOD) calculations that work in concert to deliver the desired outcome.

In the video you’ll learn how I simplified some of the back-end aspects to be a tad more approachable for beginner to moderate Tableau learners. Of course if you want to see the whole dashboard in context with the original back-end naming conventions and layout you can go download the official workbook and deconstruct it for yourself.

It’s all about learning! I encourage you to make use of workbooks that others have shared for bettering yourself and appreciating skills that are at the next level. Of course, always cite your sources and inspirations!!

As always, If you find this type of instruction valuable make sure to subscribe to my Youtube channel.

Make Sure to Watch this Additional Video Series

Make sure to also check out this extremely useful tutorial on building a COVID-19 Dashboard from scratch. It’s perfect for your first Tableau project with step by step instruction.

All views and opinions are solely my own and do NOT necessarily reflect those my employer.

Do Great Things With Your Data

– Anthony B. Smoak

How to Extract Web Data with Power BI

By now you’ve probably heard that the Los Angeles Lakers were a pretty solid dynasty in the latter half of the 90’s. I was never a Michael Jordan and Bulls fan during their reign of terror in the 90’s. It all started with the Bulls first title at the expense of Lakers’ fans back in 1991.

So while I must admit that “The Last Dance” was a well executed documentary focused on a team I didn’t care for, it did evoke nostalgia for the 90’s.

Kobe Shaq

Although we suffering Lakers’ fans had to wait our turn, we did get the last laugh as “The Next Dance” revolved around a young Kobe Bryant and prime era Shaquille O’Neil.

I built a ribbon chart visualization in Power BI showcasing the top scorers from 1995 to the three peat years ending in 2002. Thank you Spencer Baucke for the ingenious web scraping technique!

Lakers Ribbon Chart Thumbnail

Follow along in the video and make a ribbon chart for your favorite NBA team.

 

As always, do great things with your data.

Anthony B. Smoak, CBIP

 

Inspiration ► https://bit.ly/2WZFWCA

If you find this type of instruction valuable make sure to subscribe to my Youtube channel.

Check out other Power BI videos of interest definitely worth your time:

All views and opinions are solely my own and do not necessarily reflect those my employer.

Kobe & Shaq Image: David Sherman / NBAE via Getty Images file

Build a Tableau COVID-19 Dashboard

I hope everyone is safe and staying indoors during this challenging time. Like most of you, I find myself with an abundance of weekend time to spend indoors. I’ve used some of this time crafting a dashboard series leveraging the outstanding COVID-19 data hub provided by Tableau.

I did not expect the series to be as popular as it turned out to be, but it is one of my most viewed lessons on YouTube!

Tableau COVID Dashboard GIF

In this set of videos you will learn how to use Tableau and the Johns Hopkins data set which tracks COVID-19 cases across the globe, to assemble a dashboard. The great part about this dashboard is that it can be put together without reliance on overly complex calculations or the need to be a graphic designer, and it looks amazing if I do say so myself.

This dashboard utilizes the Tableau pages functionality to enable animation; as dates change the dashboard updates to reflect the current number of confirmed cases and deaths at that point in time.

Another cool trick is the use of containers to swap visualizations on the same dashboard. I use this functionality to switch between a linear and logarithmic scale for confirmed cases and deaths. You will need at least Tableau 2019.2 to use the sheet swapping functionality.

The first video provides an overview of the Tableau data-set and touches upon the visualizations required to build out the dashboard.

 

By popular demand, the second video goes more in-depth on the formatting and color scheme of each of the visualizations.

 

In my opinion the best part of the series is the 3rd video. I spend a full 93 minutes demonstrating various topics on dashboard refinement.

  1. Eliminating the hard-coding and manual sorts using a level of detail calculated field
  2. Detailed formatting with containers (applicable to all dashboards)
  3. Tableau sheet swapping using containers
  4. Making a Tableau Data Connection

 

When you get through with the first three videos you can opt for bonus material that teaches you how to implement a “bar chart race” aspect to the countries.

Instead of the same countries remaining static, they will move up and down depending upon the number of cases or deaths associated with a particular date.

Tableau COVID Dashboard Pt4 Gif Proj

Learn the Tableau “bar chart race” effect in Part 4 here:

 

 

Feel free to interact with the original viz or the Bar Chart Race version on Tableau public:

As always, If you find this type of instruction valuable make sure to subscribe to my Youtube channel.

All views and opinions are solely my own and do NOT necessarily reflect those my employer.

Build a Power BI Pop Out Slicer

Save more screen for your team! The pop out slicer panel is a perfect way to conserve space while building out your dashboard (i.e., reports) in Power BI desktop. It really is a slick feature that allows you to conserve limited reporting space by hiding your slicers until the user presses a button to reveal your data filtering options.

In this video you can watch me build out the slicer panel step by step using bookmarks, selection panel and buttons.

Power BI Pop Out Slicer (Short GIF)

  • Bookmarks are a configured view of a report page, including filters, slicers, and the state of visuals.
  • The selection panel allows you to show and hide current objects on the current report page.
  • Buttons enable users to hover, click, and further interact with Power BI content

The data sample used for this tutorial is here: https://docs.microsoft.com/en-us/power-bi/sample-financial-download

As always, do great things with your data.

Anthony B. Smoak, CBIP

 

If you find this type of instruction valuable make sure to subscribe to my Youtube channel.

Check out other Power BI videos of interest definitely worth your time:

All views and opinions are solely my own and do not necessarily reflect those my employer.