The Rooney Rule | PowerBI Edition

In 2020 I will be spending most of my non-work time in PowerBI instead of Tableau as I see more and more clients transitioning to PowerBI. In order to get some practice with PBI I wanted to recreate a few of the vizzes that I created in Tableau because of my familiarity with both the data and the charts used to create them. The viz that I am recreating in PowerBI was made to highlight the lack of diversity in NFL head coaches for #BlackHistoryMonth and won a Tableau Public Viz of the Day. Let’s dig into how I recreated this viz!

Getting Started

The data for this dashboard was scraped off of football-reference.com and for every row shows a team, their season results, their head coach, and whether the coach is white or not. You can find the data set here.

If you haven’t already, download PowerBI Desktop for free at this link. Accessing the desktop version of PowerBI for free really allows you to get in and start learning this tool. There are different levels of the tool, PowerBI Pro and PowerBI Premium, that you can read about here.

There are a couple calculations we need to do in order to get the fields we need. In order to get the white coaches showing below the axis and the non-white coaches showing above, we need to assign each value in the Race category a value. First click on the middle icon on the far left pane to get to the Data view. Then go to the top right and click, New Column. We want a New Column and not a New Measure because a New Column is calculated at the row level while a New Measure is an aggregate calculation. You can read more about the different between the two here.

When you click New Column you’ll see a new column to the right appear in the data and a drop down will prompt you for a calculation. See the calculation below for how I assign a -1 to all white coaches and a 1 to all non-white coaches. You can see where this calculation is placed in the screenshot above. This is also where you can name the column by adjust the text to the far left. Click the green check mark to apply this calculation.

Race 1/-1 = IF('NFL Seasonal Records and Coaches'[Race]="White",-1,1)

I also need to calculate coaches winning percentage, so I created another New Column and calculated the winning percentage for each coach and season.

Win Pct = 'NFL Seasonal Records and Coache'[Wins]/('NFL Seasonal Records and Coache'[Wins]+'NFL Seasonal Records and Coache'[Losses]+'NFL Seasonal Records and Coache'[Ties])

I also need to calculate coaches winning percentage, so I created another New Column and calculated the winning percentage for each coach and season.

Visualization

Before I did any of the charts, I filled in the text boxes at the stop. Near the middle of the top ribbon is a Text box and a Shapes option. The Shapes tool is neat. This allows you to just have free floating shapes within the dashboard that are populated by PowerBI, something that doesn’t exist in Tableau.

Let’s start with how I did the chart at the bottom since that is going to take up most of the time. After trying to use DAX and the Scatter Plot chart option I realized that the way the data was structured, I could use the Stacked Column chart.

As you can see to the right, you have three fold out areas that allow you to control all the characteristics of the chart you put into the dashboard. I dragged Season to Axis, Head Coach to legend, and the -1/1 assignment based on Race to the Value. This got me about 90% of the way, except for one very issue, the color of the charts.

Because the amount of fields you’re allowed to drag to each of the section like Axis and Legend are set, this means I wasn’t able to automatically color each coach by the Race field. Instead I had to go in and manually choose the colors for each coach. This limitation was slightly frustrating, but I am hoping I can figure out a work around to this in the future.

To get some of the finer formatting items the way I wanted them, choose the Format section in the Visualizations pane. I turn off the Legend because it shows for every coach in the header in this instance.

I also didn’t want the Y-axis to show because in this case it’s not necessary for the analysis/context of the story.

In order to get the Demographic Dissonance chart I used a chart type that I imported from the Marketplace. This online catalog of chart types allows you to branch out from what is show in the Visualizations pane by default.

If you click on the three dots at the end of the default chart pane you will see some options, one of which is Import from Marketplace. From this area I chose the Tornado 2.1.0 chart and downloaded the chart type. You can see all the ones I was trying out in the screenshot to right (see all the little icons under the default pane).

Finally, I used a Clustered bar chart for the last Minority Head Coaching Stats section. There were no custom calculations or anything special, so hopefully between the first two examples I showed you, hopefully it’s fairly easy to understand how I recreated that part of the dashboard. The text and vertical line showing when the Rooney Rule was implemented was also extremely easy due to the availability of default shapes in PowerBI.

Posting to Web

When you’re done with your dashboard, you are able to publish to PowerBI’s website. You can also create an embed code to enable sharing on the internet if you have the proper rights from your O365 admin. See my embedded dashboard below!

Thanks for reading! This is the first in a series of blogs I will be doing about PowerBI, so if you noticed any errors, or have any feedback/suggestions for me, please feel free to reach out via email at spencer.baucke@tessellationconsulting.com.


One comment

  1. Great visual Spencer. I wish we could hide the 1/-1 or other “helper” fields from tooltips. Power BI users typically would keep things the way you have it or workaround by building a Report Page Tooltip / Viz in Tooltip with only the fields you would want displayed. Also, the division works in this dataset, but for any measure whenever there’s a chance for a blank denominator, use the DIVIDE function to protect against divide by zero errors.

    Waiting for more posts like this!

Leave a Reply to David Eldersveld Cancel reply