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

Learn the New Tableau Set Control (Workout Wednesday 2020 Week 20 Solution)

Tableau 2020.2 introduced a handy new feature called set control. According to Tableau:

“The set control allows users to dynamically change the members of a set using a familiar, quick filter-like interface. End users can change set membership with both a single and multi-select dropdown, and the set control automatically refreshes its domain so that the data stays fresh.”

As with all new features I had to figure out what this new capability entailed and how best to learn it. Luckily, the hardworking crew over at Workout Wednesday had the perfect challenge.

Sean Miller (@HipsterVizNinja) created a dashboard that enables the user to select a US state, which then adds that state to a set. Three proportional bar charts update at the top of the viz. A right side bar area displays all of the selected states and selecting a state will remove the state from the set, side bar and the map.

Observe the following gif from my solution:

WOW 2020 Wk 20 GIF

  1. Take a look at the challenge here.
  2. Attempt to re-create the dashboard.
  3. If you give up, (or after you complete your solution), take a look at how I approached the dashboard in this solution video, or take a look at the Tableau Public interactive version here.
  4. Don’t just recopy the steps from this solution and post a viz to LinkedIn and/or Tableau Public. You’re better than that, but if you do, make sure to definitely credit Sean Miller and optionally credit me if you used my approach.

Remember, this is just my approach, there are multiple ways to solve any problem.

This was the first Workout Wednesday challenge that I’ve ever done and I’m sure I’ll tackle a few more.

Do some great things with your data!

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.

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.

 

How to Drill Through in Power BI

One of the great options available in Power BI is the capability to “drill through” to another report page. In this manner you can focus on a particular entity such as a customer, internal division, supplier or any other dimension of importance.

Different users have different data needs. When designing a dashboard typically the Key Performance Indicators (KPIs) are aggregated at a high level on the initial visualization. This offers executives and management types a “bird’s eye view” of performance.

Personally, I am a fan of BANs (look up the term in a dashboard design context if you are not familiar) when I want to highlight key takeaways.

BANs

Subsequent lower level dashboard pages can offer analysts and others the ability to either explore data with additional interactivity or simply display a static detailed report. The point is to start at a high level and allow your user to drill to a more granular level of data.

In this video I demonstrate the use of the drill through functionality in Power BI. In this scenario, you are the Chief Supply Chain officer trying to gauge your Perfect Order Percentage KPI for several internal divisions. When it’s time to sit down with your four division mangers to discuss their performance on this metric, you want the ability to start at a high level and then drill through to a static report based upon their respective internal divisions or on a specific shipping error.

DrillThrough

Drill through on “In Full Delivery” error category

Do not try and cram every visualization, chart, table or gauge under the sun into a dashboard! Take advantage of drill through functionality and tailor your data presentation for specific user groups. This general concept applies to any data visualization tool, but if you’re using Power BI then this video will help you understand the specific steps required to enable drill through functionality.

I’m frequently questioned where I obtain mock data for my scenarios. My secret source is mockaroo.com which is a great starting point for developing test data.

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.

Build a Tableau Parameter Action Dashboard

This video is inspired by Filippos Lymperopoulos who has a great article on parameter action concatenation. Definitely check out his article here. I am a hands on person who learns from building and sharing, therefore I put together this video to explore, tweak and hammer home the concept.

In this video we’ll build a Sales Analysis dashboard in Tableau using Parameter Actions and the Concatenation Aggregation functionality. The great thing about this tip is that you can use it across multiple data sources. This is a must see!

This approach relies upon the use of two different data connections. In this manner our data tables are completely un-joined without an established relationship. We have a data-set comprised of a customer list and one comprised of customer transactions across three years.

The key to linking the data sets together relies upon the following calculated field which creates a de-facto set that we can use to highlight customer purchases:

Tableau Concat Calc Field

When we setup a concatenation parameter action on our dashboard, the very act of selecting a [Customer Name] will add that Customer Name to the parameter named [Selected Customer]. This will cause all selected customers to resolve to TRUE, which allows highlighting of the sales bar charts related to the user selected customers.

Tableau Concat Parameter Action Thumb1

In the screenshot above, notice the selected [Customer Name] values on the left hand side are also concatenated together at the bottom of the dashboard (i.e., Franciso Hernandez, Jose Garcia, and Terrye Marchi). All of their respective purchases are also highlighted in the middle of the dashboard.

Tableau Concat Calc Field Label

The above calculated field is used to only show the [QTY] purchased for the user selected customer and is placed on the bar chart label.

Feel free to interact with the viz and download the workbook 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.

Top and Bottom 10 Products by Sales Using RANKX in Power BI

In this video we’ll venture outside of the default Power BI TOPN functionality used to isolate the top and bottom N values in a visual. Because you’re an astute follower of my blog and YouTube channel, you want to know more than default functionality. The key to pulling off this feat lies with the RANKX function. By using RANKX to provide a ranking to each row in our data set, we can then determine the TOP and BOTTOM 10 values.

Of course watch the video for further breakdown, but they key to using RANKX effectively in Power BI is to use the ALL function as a parameter. In this way the contents of the entire table are considered for appropriate ranking.

The DESC or ASC parameters will enable the calculation of a rank in either descending or ascending sort order.

And finally the DENSE parameter tells RANKX how ties should be handled in the data. For example if you provide DENSE as a parameter, if 10 values are tied with a rank of 1 then the next value will receive a rank of 2.

Power BI Top 10 and Bottom 10 Thumbnail

Here is an example use of RANKX that will return a ranking of Sales Price by Product, that ranks the results in descending order (highest Sales receive the lowest ranks) and ties are in contiguous order. Watch the video to determine how to calculate the BOTTOM 10 ranking and to use RANKX to enable the top or bottom 10 values in a visualization.

ProductRank = RANKX(ALL('Company Sales Data'[Product]), calculate(sum('Company Sales Data'[Sales Price])),,DESC,dense)

As a refresher, check out this popular video to build the calendar table referenced in this video: Power BI Dashboard Tutorial: Year over Year Difference Analysis

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.

Create an Interactive Stacked Bar Chart in Tableau

In this post we’ll use the new parameter action functionality in Tableau to create an interactive stacked bar chart. When we select a dimension from the viz, we can drill down into a sub-dimension. Parameter actions are new to Tableau as of version 2019.2. In the video we use an NBA data set which you can download in a workbook if you visit my Tableau Public viz.

This neat little trick relies upon the creation of a parameter named [Team Name Parameter] and two dimensions.

  • Dimension #1 is the [Team Name]
  • Dimension #2 is the [Player Name]

There is an implied hierarchical relationship between [Team Name] and [Player Name] as teams are naturally comprised of players.

We will also create a calculated field named [Player Drill] that is defined as such:

IF [Team Name Parameter] = [Team Name] THEN [Player Name]
ELSE [Team Name]
END

When we place the [Player Drill] calculated field on color on the marks card and setup our parameter actions (watch the video for instruction), the user selection of a [Team Name] on the bar chart will feed the [Team Name Parameter]. This causes all of the players on the selected team to be displayed with their respective breakdown of points scored.

Bonus: There is a FIXED LOD lesson in this video as well as a Star Wars reference which I’m sure you’ll have no issue finding. Here’s a hint:

It’s really not complicated so don’t let all the words here confuse you. Just watch the video and do some great things with your data! Interact with the viz below:

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.

This video was definitely inspired by Kevin Flerlage who has a great blog post on the uses of parameter actions in Tableau. Check it out here.