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.

 

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.

How to Create a Dashboard in Tableau

I took the time to produce a dashboard series that would get a relatively new Tableau user up to speed in very little time. I put together the “Goldilocks” videos I wish I had when I was a novice; not too short but long enough to hammer the concepts home.

In the first video, I dive head first into constructing four basic charts that I believe every data user should know how to put together. You will watch me demonstrate how to put together the following charts:

Line Chart with Forecast

Tableau Dashboard Line Chart

The shaded area is a time series forecast predicting the number of orders for the year 2020.

Map

Tableau Dashboard Map

Heat Map

Tableau Dashboard Heat Map

Bar Chart

Tableau Dashboard Bar Chart

In the second video, I’ll cover the layout and formatting of the dashboard, as well as adding a little interactivity. When the user hovers the cursor over the Line Chart, all of the other charts will update to reflect the number of orders represented since the selected month and year.

Full Dashboard

Tableau Dashboard

Watch Part 1 to Build the Component Charts

Watch Part 2 for Layout and Interactivity

What You need:

  • Either Tableau or Tableau Desktop
  • Data set: Tableau Superstore Data (can be found all over the internet with a simple Google search).

Do some great things with your data!

If you find this type of instruction valuable make sure to subscribe to my Youtube channel. All views and opinions are mine alone, independently researched and do not necessarily represent those of my employer.

Tableau Bar Chart: Combining Small Values

In this video we’ll learn how to build a bar chart visualization that combines values below a certain threshold into an “OTHER” bucket. This technique is very useful when limiting the number of bars to show on your visualization while not losing sight of all the smaller values.

  • Using standard Tableau Superstore data, we’ll calculate the percentage of sales that are generated by each individual state.
  • We’ll then use a parameter to set a percentage threshold where all states below this percentage will be combined.
  • This technique also requires the use of sets and Fixed LODs.

This technique allows us to combine all states below a certain threshold (e.g., 2%) into one single bar chart showing a combined 24%.

Bar Chart Below Threshold Thumb 01

I have to give credit where credit is due to Ann Jackson for sharing this technique at TC19!

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.

 

Build a Stacked Donut Chart in Tableau

Have you ever wanted to stack 4 pie charts on top of each other to build a visual? Let’s have some fun building out a stacked donut chart or a “TrailBlazer” chart as I call it due to its likeness to a particular NBA team’s logo.

Stacked Donut Chart Thumb

Portland Trailblazers anyone?

Stacked Donut vs Trailblazer

In order to build out this chart I used an innovative technique shared by Simon Runc on the Tableau forums. Feel free to check out that post here.

Using Tableau’s Sample Superstore Data, Simon came up with an innovative use of the INDEX() function and the Size functionality to create three different pie charts that each show a respective percentage of a measure (in this case Sales) to the Total amount of the measure.

For example, the chart highlights in red the percentage of Consumer Sales as a percentage of all segment sales (i.e., Consumer + Corporate + Home Office). The grey portions represent all other sales, other than the segment of interest.

The trick to this approach is using the Index function to create a pie chart per segment. For example Consumer is assigned a value of 1, Corporate a value of 2 and Home Office is assigned 3. When the INDEX() value is placed on size, the three different charts are assigned sizes where one is slightly larger than the next.

Stacked Donut Raw 2

With a little division and axis customization, the three segments are placed on top of each other to provide a stacked pie chart effect. The hole is courtesy of the standard methodology for creating a donut chart which involves a dual axis.

It makes much more sense when you see it in action so make sure to watch the video!

Here is an example of the raw stacked donut chart before the “TrailBlazer” formatting.

Stacked Donut Raw

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.

Definitely check out other posts of interest for building donut charts in Tableau:

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

Select Random Sample Values and Rows using Excel

In this video I help you solve the dual problems of selecting a random value from an Excel list and selecting a number of random rows from a range of data in Excel. At times when I am generating a data-set to use in my video tutorials, I want to select a random selection of rows. Typically, because my data values are clumped together and are too similar to the data on preceding and subsequent rows.

SELECTING A RANDOM VALUE FROM A LIST

Enter three Excel formulas to save the day for selecting a random value from a list:

  • ROWS()
    • Returns the number of rows in a reference or array.
  • RANDBETWEEN()
    • Returns a random integer number between the numbers you specify. A new random integer number is returned every time the worksheet is calculated.
  • INDEX()
    • The INDEX function returns a value or the reference to a value from within a table or range.

Randow Row in Excel Blog Screenshot

  1. In the screenshot above notice that the ROWS() function returns the value of 20, which corresponds to the number of names listed in the cell range of A6 to A25.
  2. The RANDBETWEEN() function generated a random number between 1 and the value returned from ROWS() (i.e., 20). In this case, RANDBETWEEN() combined with ROWS() returned a value of 3.
  3. By combining the results from the first 2 functions, the INDEX() function searches our list and returns the value of the 3rd cell in the list  (i.e., Flor McCard) because the RANDBETWEEN() function returned a value of 3.

When we put it all together it looks like the following:

=INDEX($A$6:$A$25,RANDBETWEEN(1,ROWS($A$6:$A$25)))

I choose to use the absolute cell reference notation with dollar signs although in this case it is not necessary since we are not copying our results to other cells.

SELECTING RANDOM ROWS FROM A LIST

We’ll only use 1 Excel formula to save the day for selecting random rows from a range:

  • RAND()
    • RAND() returns an evenly distributed random real number greater than or equal to 0 and less than 1. A new random real number is returned every time the worksheet is calculated.

By placing the RAND() function in a column co-located with your data, you will assign a random number to each row in your data-set or range.

Once that is done, all you have to do is sort your data by the RAND() column and then select however many rows you need. It’s that simple!

If you are like me, you probably need to see it in action to get a better understanding. Check out the video above and if you learned something, please go ahead and like it on my Youtube channel!

Thanks for your support!

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

References:

All Excel function definitions are from https://support.office.com